rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1087796 [28/37] - in /incubator/rave/donations/mitre-osec: ./ conf/ db/ db/data/ db/sequences/ db/tables/ lib/ lib/apache-commons/ lib/apache-taglibs/ lib/build/ lib/build/cobertura/ lib/eclipselink/ lib/freemarker/ lib/google-collections/...
Date Fri, 01 Apr 2011 16:42:42 GMT
Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/gadget_details_view.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/gadget_details_view.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/gadget_details_view.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/gadget_details_view.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,316 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<#import "/WEB-INF/freemarker/repository/repository_macros.ftl" as repoMacros>
+<#assign userId><@security.authentication property="principal.userId" /></#assign>
+<#-- determin if this user is an APPLICATION_ADMIN -->
+<#assign isApplicationAdmin = false>
+<@security.authorize access="hasAnyRole('APPLICATION_ADMIN')">
+    <#assign isApplicationAdmin = true>
+</@security.authorize>
+<#include "/WEB-INF/freemarker/repository/search_template.ftl">
+<table id="repoMain">
+    <tr>
+        <td class="repoLeft">
+            <div class="repoNavigation">
+                <#include "/WEB-INF/freemarker/repository/repository_list_left.ftl">
+            </div>
+        </td>
+        <td class="repoCenter">
+            <div id="repositoryList">
+                <div id="gadgetDetailAndComments">
+                    <table id="repositoryGadgetDetail">
+                        <tr>
+                            <td class="gadgetDetailLeft">
+                                <#if gadget.thumbnailUrl?? >
+                                    <img class="repoGadgetThumbnail" src="${gadget.thumbnailUrl!""}" title="${gadget.title}" width="120" height="60"/>
+                                </#if>
+                                <div class="gadgetRating-Totals">
+                                    <div class="gadgetRating-Liked" title="Total Useful Ratings"></div><span id="gadgetRatingLikedTotal" class="gadgetRating-Total">${gadgetStatistics.userLike}</span>
+                                    <div class="gadgetRating-Disliked" title="Total Not Useful Ratings"></div><span id="gadgetRatingDislikedTotal" class="gadgetRating-Total">${gadgetStatistics.userDislike}</span>
+                                    <div class="gadgetRating-Comments" title="Total Comments"></div><span class="gadgetRating-Total"><a href="#addcomment">${gadget.gadgetCommentList?size}</a></span>
+                                </div>
+                                <div class="gadgetDetailMeta">
+                                    <div class="gadgetRating-UserTotals">${gadgetStatistics.userCount} users</div>
+                                    <div class="gadgetVersion">Version: ${gadget.version}</div>
+                                    <div class="gadgetLastUpdated">Last Updated: ${gadget.modifiedDate?date?string("MM/d/yyyy")}</div>
+                                </div>
+                            </td>
+                            <td class="gadgetDetailRight" style="vertical-align: top; padding-left: 10px;">
+
+                                    <div class="repoGadgetDetail">
+                                        <div class="secondaryPageItemTitle" style="display: inline-block; vertical-align: top; padding-top: 5px;">${gadget.title?xhtml}</div>
+                                        <#-- if the gadget is hidden display the "hidden" div only to admins.
+                                             normal users can still get to the detail page to comment even if the
+                                             gadget is hidden from the repository
+                                        -->
+                                        <#if gadget.hidden && isApplicationAdmin>
+                                            <div class="hiddenGadget">Hidden</div>
+                                        </#if>
+
+                                        <#-- if the gadget is not hidden, or if it is hidden and user is an admin display
+                                             the add gadget button.  we only want users to be able to add a gadget if
+                                             it is not "hidden" and we want admins to always be able to add a gadget
+                                        -->
+                                        <#if !gadget.hidden || isApplicationAdmin>
+                                            <div id="gadgetAdded_${gadget.gadgetId?c}" style="display: inline-block; margin-left: 20px;">
+                                                <button dojoType="dijit.form.Button" id="addGadget_${gadget.gadgetId?c}" onclick="portal.repository.addGadgetToPage('${gadget.gadgetId?c}','${lastVisitedPageId?c}');">Add</button>
+                                            </div>
+                                        </#if>
+
+                                        <@security.authorize access="hasAnyRole('OFFICIAL_GADGET_DEVELOPER','UNOFFICIAL_GADGET_DEVELOPER')">
+                                            <button dojoType="dijit.form.Button" id="editGadget_${gadget.gadgetId?c}" onclick="portal.repository.getEditGadget('${gadget.gadgetId?c}');">Edit Metadata</button>
+                                        </@security.authorize>
+                                        <@security.authorize access="hasRole('REPOSITORY_ADMIN')">
+                                            <form dojoType="dijit.form.Form" method="post" action="<@c.url value="${.globals.repositoryControllerPath}" />/delete" onSubmit="return portal.repository.admin.deleteGadget();" style="display: inline;" >
+                                                <input type="hidden" id="delGadgetId" name="gadgetId" value="${gadget.gadgetId?c}" />
+                                                <button dojoType="dijit.form.Button" id="deleteGadget_${gadget.gadgetId?c}" type="submit">Delete Gadget</button>
+                                            </form>
+                                        </@security.authorize>
+
+                                        <@repoMacros.renderGadgetAuthor gadget />
+
+                                        <div class="repoGadgetDesc" style="padding-top: 10px;">${gadget.description?xhtml}</div>
+                                        <#if gadget.gadgetAudienceList?size &gt; 0>
+                                             <div style="padding-top: 10px;">
+                                                 Intended Audience:
+                                                 <#list gadget.gadgetAudienceList as gadgetAudience>
+                                                    <#if gadget.gadgetAudienceList?seq_contains(gadgetAudience)>
+                                                        <a href="javascript:portal.repository.getGadgetByAudience('${gadgetAudience.gadgetAudienceId}');">${gadgetAudience.description?xhtml}</a><#if gadgetAudience_has_next>,</#if>
+                                                    </#if>
+                                                 </#list>
+                                              </div>
+                                        </#if>
+                                        <#if gadget.gadgetTagList?size &gt; 0>
+                                            <div style="padding-top: 10px;">
+                                                Tags:
+                                                 <#list gadget.gadgetTagList as gadgetTags>
+                                                    <#if gadget.gadgetTagList?seq_contains(gadgetTags)>
+                                                        <a href="javascript:portal.repository.getGadgetbyTag('${gadgetTags.tagName?xhtml}');">${gadgetTags.tagName?xhtml}</a><#if gadgetTags_has_next>,</#if>
+                                                    </#if>
+                                                 </#list>
+                                            </div>
+                                        </#if>
+                                </div>
+                            </td>
+                            <#if gadget.screenshotUrl?? >
+                                <td>
+                                    <div class="GadgetScreenshotTitle">Gadget Preview</div>
+                                    <div class="GadgetScreenshot">
+                                        <img src="${gadget.screenshotUrl!""}" title="${gadget.title} Screenshot" />
+                                    </div>
+                                </td>
+                            </#if>
+                        </tr>
+                    </table>
+
+                    <div id="gadgetComments">
+                        <a name="addcomment"></a>
+                        <#if gadget.gadgetSupportLinkType.code != "NONE">
+                            <div class="gadgetHelp">Having problems?
+                                <#if gadget.gadgetSupportLinkType.code ="HD" && .globals.helpDeskURL?? >
+                                    Contact the <a href="${.globals.helpDeskURL?xhtml}">Help Desk</a>
+                                <#elseif gadget.gadgetSupportLinkType.code ="URL">
+                                    <a href='${gadget.supportLink!""}'>Click Here</a>
+                                <#else >
+                                    <a href='mailto:${gadget.supportLink!""}'>Email the Author</a>
+                                </#if>
+                            </div>
+                        </#if>
+                        <div id="rateAndCommentHeading">
+                            <span>Rate & Comment</span>
+                            <#-- display comment mode toggle if user is an admin -->
+                            <#if isApplicationAdmin>
+                            <input id="commentModeAdminTrue"
+                                   type="radio"
+                                   dojoType="dijit.form.RadioButton"
+                                   name="commentMode"
+                                   value="false"
+                                   onClick="portal.repository.admin.toggleCommentAsAdmin(true);"
+                                   />
+                            <label for="commentModeAdminTrue">Admin Mode</label>
+                            <input id="commentModeAdminFalse"
+                                   type="radio"
+                                   dojoType="dijit.form.RadioButton"
+                                   name="commentMode"
+                                   value="true"
+                                   checked="checked"
+                                   onClick="portal.repository.admin.toggleCommentAsAdmin(false);"
+                                   />
+                            <label for="commentModeAdminFalse">Comment as myself</label>
+                            </#if>
+                        </div>
+                        <table id="addGadgetComment">
+                            <tr id="yourRating">
+                                <td>
+                                    Rate This Gadget:
+                                </td>
+                                <td>
+                                    <div>
+                                        <#assign userRating = "${gadgetStatistics.userRating}"/>
+                                        <span class="ratingButton">
+                                            <button dojoType="dijit.form.Button" id="gadgetRating.like-${gadget.gadgetId}" onclick="portal.repository.setGadgetRating(${gadget.gadgetId},5,'${userId}');" iconClass="gadgetRating-<#if userRating != "5">not</#if>Liked gadgetRating-Liked-hover" title="<#if userRating != "5">Useful<#else>clear</#if>"></button>
+                                            <br/>
+                                            useful
+                                        </span>
+                                        <span class="ratingButton">
+                                            <button dojoType="dijit.form.Button" id="gadgetRating.dislike-${gadget.gadgetId}" onclick="portal.repository.setGadgetRating(${gadget.gadgetId},0,'${userId}');" iconClass="gadgetRating-<#if userRating != "0">not</#if>Disliked gadgetRating-Disliked-hover" title="<#if userRating != "0">Not Useful<#else>clear</#if>"></button>
+                                             <br/>
+                                            not useful
+                                        </span>
+                                    </div>
+                                </td>
+                            </tr>
+                            <tr id="yourComment">
+                                <td>
+                                    Add a comment:<br/>
+                                    <img id="portalAdminAddLogo" src="${.globals.staticContentImages}/header_logo_mini.png" class="portalHidden"/>
+                                </td>
+                                <td>
+                                    <form id="addCommentForm" dojoType="dijit.form.Form" action="<@c.url value="${.globals.repositoryControllerPath}" />/addComment" method="POST">
+                                        <script type="dojo/method" event="onSubmit">
+                                            // validate that the new comment length is greater than 0 and less than 4000
+                                            var newCommentText = dijit.byId("newCommentText").attr("value");
+                                            if (!portal.repository.validateGadgetCommentText(newCommentText)) {
+                                                return false;
+                                            }
+
+                                            var dialog = new dijit.Dialog({title: "Saving Comment", content: "Saving your comments..."});
+                                            dialog.show();
+
+                                            return true;
+                                        </script>
+                                        <input type="hidden" name="gadgetId" value="${gadget.gadgetId?c}" />
+                                        <input id="addAsAdmin" type="hidden" name="addAsAdmin" value="false" />
+                                        <textarea dojoType="dijit.form.SimpleTextarea"
+                                                  id="newCommentText"
+                                                  name="commentText"
+                                                  cols="100"
+                                                  rows="5"></textarea><br/>
+                                        <button dojoType="dijit.form.Button" type="submit">Submit</button>
+                                    </form>
+                                </td>
+                            </tr>
+                        </table>
+                        <#-- list the gadget comments -->
+                        <#list gadgetComments as gadgetComment>
+                            <#assign person = personsWithCommentsMap[gadgetComment.userId] >
+                            <#if person?? && person.avatarUrl?? >
+                                <#assign photoUrl = person.avatarUrl>
+                            <#else>
+                                <#assign photoUrl = .globals.staticContentImages + "/pictureNotFound.gif">
+                            </#if>
+
+                            <#-- lookup the display names of the commentor and last update user, if applicable -->
+                            <#if gadgetComment.createdByAdmin>
+                                <#assign personDisplayName = "${.globals.appName} Team">
+                            <#else>
+                                <#assign personDisplayName = getDisplayNameFromUserId(gadgetComment.userId)>
+                            </#if>
+                            <#if gadgetComment.lastModifiedByAdmin>
+                                <#assign lastModPersonDisplayName = "${.globals.appName} Team">
+                            <#else>
+                                <#assign lastModPersonDisplayName = getDisplayNameFromUserId(gadgetComment.lastModifiedUserId!"")>
+                            </#if>
+                            <table class="commentRecord<#if gadgetComment.createdByAdmin> portalAdminCommentRecord</#if>">
+                                <tr>
+                                    <td class="commentImage">
+                                        <#if gadgetComment.createdByAdmin>
+                                            <img class="portalAdminCommentLogo" src="${.globals.staticContentImages}/header_logo_mini.png" title="${.globals.appName} Admin Comment"/>
+                                        <#else>
+                                            <img class="employeePhoto" src="${photoUrl}" />
+                                        </#if>
+                                    </td>
+                                    <td class="commentContent">
+                                        <#if gadgetComment.gadgetRating??>
+                                            <#if gadgetComment.gadgetRating == 0>
+                                                <#assign gadgetRatingLike = false>
+                                            <#else>
+                                                <#assign gadgetRatingLike = true>
+                                            </#if>
+                                            <div class="<#if !gadgetRatingLike>gadgetRating-Disliked<#else>gadgetRating-Liked</#if>" title="<#if !gadgetRatingLike>Not Useful<#else>Useful</#if>"></div>&nbsp
+                                        </#if>
+                                        ${personDisplayName?xhtml}
+                                        <span class="gadgetDateAndVersion">${gadgetComment.createdDate?string("M/d/yyyy")} v${gadgetComment.gadgetVersion?xhtml}</span><#if gadgetComment.userId == userId || isApplicationAdmin>&nbsp;&nbsp;<a href="javascript:portal.repository.displayEditCommentsDialog(true, 'commentText_${gadgetComment_index}', ${gadgetComment.gadgetCommentId});"<#if gadgetComment.userId != userId || gadgetComment.createdByAdmin> class="notmyComment"</#if>>edit</a></#if>
+                                        <div id="commentText_${gadgetComment_index}" class="commentText">${gadgetComment.commentText?xhtml}</div>
+                                        <#if gadgetComment.commentModified && !gadgetComment.createdByAdmin>
+                                            <div class="updatedComment">Updated by ${lastModPersonDisplayName?xhtml} ${gadgetComment.lastModifiedDate?string("M/d/yyyy")}</div>
+                                        </#if>
+                                    </td>
+                                </tr>
+                            </table>
+                        </#list>
+                    </div>
+                </div>
+                <#include "/WEB-INF/freemarker/repository/also_by.ftl">
+            </div>
+        </td>
+    </tr>
+</table>
+<div id="editCommentsDialog" dojoType="dijit.Dialog" title="Edit Comment" style="display:none;">
+<form id="editCommentForm" dojoType="dijit.form.Form" action="<@c.url value="${.globals.repositoryControllerPath}" />/editComment" method="POST" style="display:inline;">
+    <script type="dojo/method" event="onSubmit">
+        // validate that the new comment length is greater than 0 and less than 4000
+        var editCommentText = dijit.byId("editCommentText").attr("value");
+        if (!portal.repository.validateGadgetCommentText(editCommentText)) {
+            return false;
+        }
+
+        var dialog = new dijit.Dialog({title: "Saving Comment", content: "Saving your comments..."});
+        dialog.show();
+
+        return true;
+    </script>
+    <input id="hiddenGadgetCommentId" name="gadgetCommentId" type="hidden" value="" />
+    <input id="editAsAdmin" type="hidden" name="editAsAdmin" value="false" />
+    <textarea dojoType="dijit.form.SimpleTextarea"
+              id="editCommentText"
+              name="commentText"
+              cols="100"
+              rows="5"></textarea>
+    <br />
+    <button dojoType="dijit.form.Button" type="submit">Update</button>
+    <button dojoType="dijit.form.Button" type="button" onClick="portal.repository.displayEditCommentsDialog(false);">Cancel</button>
+</form>
+<form id="deleteCommentForm" dojoType="dijit.form.Form" action="<@c.url value="${.globals.repositoryControllerPath}" />/deleteComment" method="POST" style="display:inline;">
+    <script type="dojo/method" event="onSubmit">
+        return confirm("Are you sure?");
+    </script>
+    <input id="hiddenGadgetCommentIdDelete" name="gadgetCommentId" type="hidden" value="" />
+    <button dojoType="dijit.form.Button" type="submit" style="margin-left: 50px;">Delete</button>
+</form>
+</div>
+<#-- display the non-linkable app store image in the left side when displaying the all view-->
+<script type="text/javascript">
+portal.repository.enableLinkedAppStoreImage(true);
+</script>
+
+<#--
+    function getDisplayNameFromUserId: lookup a person's display name given a userId
+        Parameters:
+        1) userId - the userId to search for in the user map
+-->
+<#function getDisplayNameFromUserId userId>
+    <#if personsWithCommentsMap[userId]??>
+        <#assign displayName = personsWithCommentsMap[userId].displayName>
+    <#else>
+        <#assign displayName = "Former Employee">
+    </#if>
+    <#return displayName>
+</#function>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/gadget_details_view.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/list_template.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/list_template.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/list_template.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/list_template.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,94 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<#import "/WEB-INF/freemarker/repository/repository_macros.ftl" as repoMacros>
+<#-- load in the spring security tag library -->
+<#assign security = JspTaglibs["http://www.springframework.org/security/tags"] />
+<#assign hasFeatured = false />
+<#assign seeHidden = false />
+<@security.authorize access="hasAnyRole('OFFICIAL_GADGET_DEVELOPER','UNOFFICIAL_GADGET_DEVELOPER')">
+    <#assign seeHidden = true />
+</@security.authorize>
+<#assign userId><@security.authentication property="principal.userId" /></#assign>
+<#if gadgetSearchType?? >
+    <#if gadgetRepositoryList?size &gt; 0 >
+        <div class="searchResult">
+            <span class="searchResultsHeading">
+                <#if gadgetSearchType == "text">
+                    Results for <span class="searchResultsHeadingHighlight">${gadgetSearchString?xhtml}</span>
+                <#elseif gadgetSearchType == "tagName">
+                    <span class="searchResultsHeadingHighlight">${gadgetSearchTagName?xhtml}</span> apps
+                <#elseif gadgetSearchType == "audience">
+                    <span class="searchResultsHeadingHighlight">${gadgetSearchAudience.description?xhtml}</span> apps
+                </#if>
+            </span>
+            <span class="searchResultsTotal">                
+                <span class="searchResultsHeadingHighlight">${gadgetRepositoryList?size}</span> <#if gadgetRepositoryList?size == 1>gadget<#else>gadgets</#if>
+            </span>
+            <div style="clear:both;"></div>
+        </div>
+    <#else>
+        <form dojoType="dijit.form.Form" name="repoSearch" onsubmit="portal.repository.tryAgain(); return false;">
+            <div class="tryAgain">
+                <span class="tryAgainHighlight">No results</span> for
+                <input type="text" dojoType="dijit.form.TextBox" id="tryAgainText" name="searchText" value="${(gadgetSearchString!"")?xhtml}" />
+                <button dojoType="dijit.form.Button" type="submit" style="margin-left: 10px;">Try Again</button>
+                <div class="tryAgainHint">You can also try the options on the left to browse the latest and most popular gadgets or find gadgets by tag</div>
+            </div>
+        </form>
+    </#if>
+</#if>
+
+<#list gadgetRepositoryList as containerRegistry>
+    <#assign gadget = containerRegistry.gadget>
+    <#-- start the featured wrapper div, only display "featured" styling in ALL view -->
+    <#if gadget.featured && containerRegistry_index == 0 && !gadgetSearchType??>
+        <#assign hasFeatured = true />
+        <div id="repositoryFeatured">
+            <div class="featuredHeading">Featured</div>
+    </#if>
+    <#-- end the featured wrapper div-->
+    <#if hasFeatured && !gadget.featured></div><#assign hasFeatured = false /></#if>
+    <#if !gadget.hidden || seeHidden>
+        <table class="repositoryItem<#if gadget.featured> repositoryFeaturedItem</#if>">
+            <tr>
+                <td class="repositoryItemLeft">
+                    <#if gadget.thumbnailUrl??>
+                    <img class="repoGadgetThumbnail" src="${gadget.thumbnailUrl!""}" title="${gadget.title}" width="120" height="60"/>
+                    </#if>
+                    <div class="gadgetRating-Totals">
+                        <span class="gadgetRating-Liked" title="Total Useful Ratings"></span><span class="gadgetRating-Total">${allGadgetStatistics[gadget.gadgetId?string].userLike}</span>
+                        <span class="gadgetRating-Disliked" title="Total Not Useful Ratings"></span><span class="gadgetRating-Total">${allGadgetStatistics[gadget.gadgetId?string].userDislike}</span>
+                        <span class="gadgetRating-Comments" title="Total Comments"></span><span class="gadgetRating-Total"><a href="javascript:portal.regionGadget.getGadgetDetail(${gadget.gadgetId?c}, true);">${gadget.gadgetCommentList?size}</a></span>
+                    </div>
+                    <div class="gadgetRating-UserTotals">${allGadgetStatistics[gadget.gadgetId?string].userCount} users</div>
+                </td>
+                <td class="repositoryItemCenter">
+                    <div id="gadgetAdded_${gadget.gadgetId?c}" style="float: right;">
+                        <button dojoType="dijit.form.Button" id="addGadget_${gadget.gadgetId?c}" onclick="portal.repository.addGadgetToPage('${gadget.gadgetId?c}', '${lastVisitedPageId?c}');">Add Gadget</button>
+                    </div>
+                    <a class="secondaryPageItemTitle" href="javascript:portal.repository.getGadgetDetail('${gadget.gadgetId?c}');"/>${gadget.title}</a>
+                    <#if gadget.hidden><div class="hiddenGadget">Hidden</div></#if>
+                    <@repoMacros.renderGadgetAuthor gadget />
+                    <div class="repoGadgetDesc">${gadget.description?xhtml}</div>
+                </td>
+            </tr>
+        </table>
+    </#if>
+</#list>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/list_template.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_add.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_add.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_add.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_add.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,353 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#-- TODO: Merge the add and edit pages into one page which handles both -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<div id="repositoryHeader"><a href="<@c.url value="${.globals.repositoryControllerPath}" />/view">${.globals.appName} App Store</a> -> Add Gadget To App Store</div>
+<div id="repositoryAddGadget">
+    <div dojoType="dijit.form.Form"
+        id="gadgetUrlSearchForm"
+        onsubmit="return false;">
+        <label for="searchGadgetUrl">Gadget URL:</label>
+        <input type="text"
+             id="searchGadgetUrl"
+             name="gadgetUrl"
+             style="width: 30em;"
+             dojoType="dijit.form.ValidationTextBox"
+             regExpGen="dojox.validate.regexp.url"
+             trim="true"
+             required="true"
+             maxlength="200"
+             constraints={scheme:true}
+             invalidMessage="Invalid URL - be sure to include http://..."
+             value="<#if (RequestParameters['gadgetUrl'])??>${RequestParameters['gadgetUrl']?xhtml}</#if>"
+        />
+        <button dojoType="dijit.form.Button" onclick="portal.repository.admin.getGadgetFromUrl();">Search for Gadget</button>
+    </div>
+    <div id="newGadgetFormStatus"<#if (RequestParameters['formSuccessStatus']!"false")?string == "false"> class="portalHidden"</#if>>New Gadget Added!!!</div>
+    <div id="newGadgetError" class="portalHidden"></div>
+    <#if (RequestParameters['gadgetAudienceNotFound']!"false")?string == "true">
+    <div style="background-color: red; font-weight: bold; padding: 10px;">
+        ERROR: One or more audience records were removed which you were trying to select.  Please try adding the Gadget Metadata again and save.
+    </div>
+    </#if>
+
+    <div id="newGadgetInfo" class="portalHidden">
+         <span style="font-weight: bold;">Gadget Metadata</span>
+         <div dojoType="dijit.form.Form"
+               id="addGadgetForm"
+               method="post"
+               action="<@c.url value="${.globals.repositoryControllerPath}" />/addGadget"
+               onsubmit="return portal.repository.admin.addGadget();">
+            <input id="gadgetUrl"
+                   name="gadgetUrl"
+                   type="hidden"
+                   dojoType="dijit.form.TextBox" />
+            <table>
+                <tr>
+                    <td class="gadgetMetadataLabel">Title:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="title"
+                             name="title"
+                             style="width: 15em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="true"
+                             maxlength="100"
+                             promptMessage="Enter a Title"
+                             invalidMessage="Enter a Title" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Author Type:</td>
+                    <td class="gadgetMetadata">
+                        <select dojoType="dijit.form.Select"
+                                id="gadgetAuthorTypeId"
+                                name="gadgetAuthorTypeId"
+                                size="1">
+                                <#list gadgetAuthorTypeList as gadgetAuthorType>
+                                    <option value="${gadgetAuthorType.gadgetAuthorTypeId?c}">${gadgetAuthorType.description?xhtml}</option>
+                                </#list>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Author:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="author"
+                             name="author"
+                             style="width: 15em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="true"
+                             maxlength="100
+                             promptMessage="Enter an Author"
+                             invalidMessage="Enter an Author" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Author Id:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="authorUserId"
+                             name="authorUserId"
+                             style="width: 15em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="false"
+                             maxlength="10" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Description:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="true"
+                             maxLength="4000"
+                             style="width: 50em;"
+                             name="description"
+                             promptMessage="Enter a Description"
+                             invalidMessage="Enter a Description"
+                             id="description" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Thumbnail URL:</td>
+                    <td class="gadgetMetadata">
+                      <input type="text"
+                             id="thumbnailUrl"
+                             name="thumbnailUrl"
+                             style="width: 50em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             regExpGen="dojox.validate.regexp.url"
+                             trim="true"
+                             required="false"
+                             maxlength="200"
+                             constraints={scheme:true}
+                             invalidMessage="Invalid URL - be sure to include http://..." />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Screenshot URL:</td>
+                    <td class="gadgetMetadata">
+                      <input type="text"
+                             id="screenshotUrl"
+                             name="screenshotUrl"
+                             style="width: 50em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             regExpGen="dojox.validate.regexp.url"
+                             trim="true"
+                             required="false"
+                             maxlength="200"
+                             constraints={scheme:true}
+                             invalidMessage="Invalid URL - be sure to include http://..." />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Use Custom Edit UI:</td>
+                    <td class="gadgetMetadata">
+                      <input type="checkbox"
+                             id="useCustomEditUi"
+                             name="useCustomEditUi"
+                             value="true"
+                             dojoType="dijit.form.CheckBox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Version:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="version"
+                             name="version"
+                             style="width: 5em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="true"
+                             maxlength="10"
+                             promptMessage="Enter a Version"
+                             invalidMessage="Enter a Version" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Featured:</td>
+                    <td class="gadgetMetadata">
+                      <input type="checkbox"
+                             id="featured"
+                             name="featured"
+                             value="true"
+                             dojoType="dijit.form.CheckBox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Support Link Type:</td>
+                    <td class="gadgetMetadata">
+                        <select dojoType="dijit.form.Select"
+                                id="gadgetSupportLinkTypeId"
+                                name="gadgetSupportLinkTypeId"
+                                size="1">
+                                <#list gadgetSupportLinkTypeList as gadgetSupportLinkType>
+                                    <option value="${gadgetSupportLinkType.gadgetSupportLinkTypeId?c}">${gadgetSupportLinkType.description?xhtml}</option>
+                                </#list>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Support Link:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="supportLink"
+                             name="supportLink"
+                             style="width: 15em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="false"
+                             maxlength="100"
+                             value="" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Tags:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="gadgetTags"
+                             name="gadgetTags"
+                             style="width: 20em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="false"
+                             maxlength="100"
+                             value="" /> (comma separated list)
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Audiences:</td>
+                    <td class="gadgetMetadata">
+                        <select dojoType="dijit.form.MultiSelect"
+                                id="gadgetAudiences"
+                                name="gadgetAudiences"
+                                multiple="true"
+                                size="10">
+                                <#list gadgetAudienceList as gadgetAudience>
+                                    <option value="${gadgetAudience.gadgetAudienceId?c}">${gadgetAudience.description?xhtml}</option>
+                                </#list>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Gadget Height:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                             id="height"
+                             name="height"
+                             style="width: 5em;"
+                             dojoType="dijit.form.ValidationTextBox"
+                             trim="true"
+                             required="false"
+                             regExp="\d{0,5}"
+                             maxlength="5"
+                             value=""
+                             invalidMessage="Invalid Pixel Height" /> (leave empty unless you really want to fix the gadget height)
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">OAuth Service Name:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                               dojoType="dijit.form.ValidationTextBox"
+                               trim="true"
+                               required="false"
+                               maxLength="250"
+                               style="width: 25em;"
+                               name="serviceName"
+                               value=""
+                               id="serviceName"/>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">OAuth Consumer Key:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                               dojoType="dijit.form.ValidationTextBox"
+                               trim="true"
+                               required="false"
+                               maxLength="250"
+                               style="width: 25em;"
+                               name="consumerKey"
+                               value=""
+                               id="consumerKey"/>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">OAuth Consumer Secret:</td>
+                    <td class="gadgetMetadata">
+                        <input type="text"
+                               dojoType="dijit.form.ValidationTextBox"
+                               trim="true"
+                               required="false"
+                               maxLength="2000"
+                               style="width: 25em;"
+                               name="consumerSecret"
+                               value=""
+                               id="consumerSecret"/>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Use Scrollbars:</td>
+                    <td class="gadgetMetadata">
+                      <input type="checkbox"
+                             id="scrolling"
+                             name="scrolling"
+                             value="true"
+                             dojoType="dijit.form.CheckBox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Hide:</td>
+                    <td class="gadgetMetadata">
+                      <input type="checkbox"
+                             id="hidden"
+                             name="hidden"
+                             value="true"
+                             dojoType="dijit.form.CheckBox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td class="gadgetMetadataLabel">Send Comment Email Notifications:</td>
+                    <td class="gadgetMetadata">
+                      <input type="checkbox"
+                             id="sendCommentEmails"
+                             name="sendCommentEmails"
+                             value="true"
+                             dojoType="dijit.form.CheckBox"
+                             checked="checked"/>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <button dojoType="dijit.form.Button" type="submit">Add New Gadget</button>
+                        <button dojoType="dijit.form.Button" type="button" onClick="portal.repository.admin.cancelAddGadget();">Cancel</button>
+                    </td>
+                </tr>
+            </table>
+         </div>
+    </div>
+</div>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_add.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_edit.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_edit.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_edit.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_edit.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,372 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#-- TODO: Merge the add and edit pages into one page which handles both -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<div id="repositoryHeader"><a href="<@c.url value="${.globals.repositoryControllerPath}" />/view">${.globals.appName} App Store</a> -> Edit Gadget Metadata</div>
+<div style="font-weight: bold; padding:5px;">
+    Note: This task is only needed if you have modified any of the gadget metadata in the gadget file such as ModulePrefs or UserPrefs.  If only the gadget code itself has changed you do not need to reload the gadget metadata.
+</div>
+<div id="gadgetInfo">
+     <form dojoType="dijit.form.Form"
+           id="editGadgetForm"
+           method="post"
+           action="<@c.url value="${.globals.repositoryControllerPath}" />/editGadget"
+           onsubmit="return portal.repository.admin.editGadget();">
+        <input id="gadgetId"
+               name="gadgetId"
+               type="hidden"
+               value="${gadget.gadgetId?c}"
+               dojoType="dijit.form.TextBox" />
+        <input id="gadgetUrl"
+               name="url"
+               type="hidden"
+               value="${gadget.url}"
+               dojoType="dijit.form.TextBox" />
+        <table>
+            <tr>
+                <td colspan="2" style="border-bottom: 1px solid #000000; padding-bottom: 5px;">
+                    Current Location - <a href="${gadget.url}" target="_blank">${gadget.url}</a><br />
+                    <button dojoType="dijit.form.Button" type="button" onclick="portal.repository.admin.reloadGadgetMetadata();">Reload Gadget Metadata</button>
+                </td>
+            </tr>
+           <#if (RequestParameters['gadgetAudienceNotFound']!"false")?string == "true">
+           <tr>
+               <td colspan="2" style="background-color: red; font-weight: bold; padding: 10px;">
+                   ERROR: One or more audience records were removed which you were trying to select.  Please try updating the Gadget Metadata again and save.
+               </td>
+           </tr>
+           </#if>
+           <tr>
+                <td class="gadgetMetadataLabel">Title:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="title"
+                         name="title"
+                         style="width: 20em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="true"
+                         maxlength="100"
+                         value="${gadget.title}"
+                         promptMessage="Enter a Title"
+                         invalidMessage="Enter a Title"/>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Author Type:</td>
+                <td class="gadgetMetadata">
+                    <select dojoType="dijit.form.Select"
+                            id="gadgetAuthorTypeId"
+                            name="gadgetAuthorTypeId"
+                            size="1">
+                            <#list gadgetAuthorTypeList as gadgetAuthorType>
+                                <option value="${gadgetAuthorType.gadgetAuthorTypeId?c}"<#if gadget.gadgetAuthorType.gadgetAuthorTypeId == gadgetAuthorType.gadgetAuthorTypeId> selected="selected"</#if>>${gadgetAuthorType.description?xhtml}</option>
+                            </#list>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Author:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="author"
+                         name="author"
+                         style="width: 15em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="true"
+                         maxlength="100"
+                         value="${gadget.author}"
+                         promptMessage="Enter an Author"
+                         invalidMessage="Enter an Author" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Author Id:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="authorUserId"
+                         name="authorUserId"
+                         style="width: 15em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="false"
+                         maxlength="10"
+                         value="${gadget.authorUserId!""}" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Description:</td>
+                <td class="gadgetMetadata">
+                     <input type="text"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="true"
+                         maxLength="4000"
+                         style="width: 50em;"
+                         name="description"
+                         value="${gadget.description}"
+                         promptMessage="Enter a Description"
+                         invalidMessage="Enter a Description"
+                         id="description" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Thumbnail URL:</td>
+                <td class="gadgetMetadata">
+                  <input type="text"
+                         id="thumbnailUrl"
+                         name="thumbnailUrl"
+                         style="width: 50em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         regExpGen="dojox.validate.regexp.url"
+                         trim="true"
+                         required="false"
+                         maxlength="200"
+                         constraints={scheme:true}
+                         value="${gadget.thumbnailUrl!""}"
+                         invalidMessage="Invalid URL - be sure to include http://..." />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Screenshot URL:</td>
+                <td class="gadgetMetadata">
+                  <input type="text"
+                         id="screenshotUrl"
+                         name="screenshotUrl"
+                         style="width: 50em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         regExpGen="dojox.validate.regexp.url"
+                         trim="true"
+                         required="false"
+                         maxlength="200"
+                         constraints={scheme:true}
+                         value="${gadget.screenshotUrl!""}"
+                         invalidMessage="Invalid URL - be sure to include http://..." />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Use Custom Edit UI:</td>
+                <td class="gadgetMetadata">
+                  <input type="checkbox"
+                         id="useCustomEditUi"
+                         name="useCustomEditUi"
+                         value="true"
+                         <#if gadget.useCustomEditUi> checked</#if>
+                         dojoType="dijit.form.CheckBox" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Version:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="version"
+                         name="version"
+                         style="width: 5em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="true"
+                         maxlength="10"
+                         value="${gadget.version}"
+                         promptMessage="Enter a Version"
+                         invalidMessage="Enter a Version" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Featured:</td>
+                <td class="gadgetMetadata">
+                  <input type="checkbox"
+                         id="featured"
+                         name="featured"
+                         value="true"
+                         <#if gadget.featured> checked</#if>
+                         dojoType="dijit.form.CheckBox" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Support Link Type:</td>
+                <td class="gadgetMetadata">
+                    <select dojoType="dijit.form.Select"
+                            id="gadgetSupportLinkTypeId"
+                            name="gadgetSupportLinkTypeId"
+                            size="1">
+                            <#list gadgetSupportLinkTypeList as gadgetSupportLinkType>
+                                <option value="${gadgetSupportLinkType.gadgetSupportLinkTypeId?c}"<#if gadget.gadgetSupportLinkType.gadgetSupportLinkTypeId == gadgetSupportLinkType.gadgetSupportLinkTypeId> selected="selected"</#if>>${gadgetSupportLinkType.description?xhtml}</option>
+                            </#list>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Support Link:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="supportLink"
+                         name="supportLink"
+                         style="width: 15em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="false"
+                         maxlength="100"
+                         value="${gadget.supportLink!""}" />
+                </td>
+            </tr>
+            <#assign tags = "" />
+            <#list gadget.gadgetTagList as gadgetTag>
+                <#assign tags = "${tags}${gadgetTag.tagName}" /><#if gadgetTag_has_next><#assign tags = "${tags}," /></#if>
+            </#list>
+            <tr>
+                <td class="gadgetMetadataLabel">Tags:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="gadgetTags"
+                         name="gadgetTags"
+                         style="width: 20em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="false"
+                         maxlength="100"
+                         value="${tags}" /> (comma separated list)
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Audiences:</td>
+                <td class="gadgetMetadata">
+                    <select dojoType="dijit.form.MultiSelect"
+                            id="gadgetAudiences"
+                            name="gadgetAudiences"
+                            multiple="true"
+                            size="10">
+                            <#list gadgetAudienceList as gadgetAudience>
+                                <option value="${gadgetAudience.gadgetAudienceId?c}"<#if gadget.gadgetAudienceList?seq_contains(gadgetAudience)> selected="selected"</#if>>${gadgetAudience.description?xhtml}</option>
+                            </#list>
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Gadget Height:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                         id="height"
+                         name="height"
+                         style="width: 5em;"
+                         dojoType="dijit.form.ValidationTextBox"
+                         trim="true"
+                         required="false"
+                         regExp="\d{0,5}"
+                         maxlength="5"
+                         value="<#if gadget.height??>${gadget.height?c}</#if>"
+                         invalidMessage="Invalid Pixel Height" /> (leave empty unless you really want to fix the gadget height)
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">OAuth Service Name:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                           dojoType="dijit.form.ValidationTextBox"
+                           trim="true"
+                           required="false"
+                           maxLength="250"
+                           style="width: 25em;"
+                           name="serviceName"
+                           value="<#if gadget.consumerInfoList[0]??>${gadget.consumerInfoList[0].serviceName}</#if>"
+                           id="serviceName"/>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">OAuth Consumer Key:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                           dojoType="dijit.form.ValidationTextBox"
+                           trim="true"
+                           required="false"
+                           maxLength="250"
+                           style="width: 25em;"
+                           name="consumerKey"
+                           value="<#if gadget.consumerInfoList[0]??>${gadget.consumerInfoList[0].consumerKey}</#if>"
+                           id="consumerKey"/>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">OAuth Consumer Secret:</td>
+                <td class="gadgetMetadata">
+                    <input type="text"
+                           dojoType="dijit.form.ValidationTextBox"
+                           trim="true"
+                           required="false"
+                           maxLength="2000"
+                           style="width: 25em;"
+                           name="consumerSecret"
+                           value="<#if gadget.consumerInfoList[0]??>${gadget.consumerInfoList[0].consumerSecret}</#if>"
+                           id="consumerSecret"/>
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Use Scrollbars:</td>
+                <td class="gadgetMetadata">
+                  <input type="checkbox"
+                         id="scrolling"
+                         name="scrolling"
+                         value="true"
+                         <#if gadget.scrolling> checked</#if>
+                         dojoType="dijit.form.CheckBox" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Hidden:</td>
+                <td class="gadgetMetadata">
+                  <input type="checkbox"
+                         id="hidden"
+                         name="hidden"
+                         value="true"
+                         <#if gadget.hidden> checked</#if>
+                         dojoType="dijit.form.CheckBox" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Send Comment Email Notifications:</td>
+                <td class="gadgetMetadata">
+                  <input type="checkbox"
+                         id="sendCommentEmails"
+                         name="sendCommentEmails"
+                         value="true"
+                         <#if gadget.sendCommentEmails> checked</#if>
+                         dojoType="dijit.form.CheckBox" />
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Added:</td>
+                <td class="gadgetMetadata">
+                    ${gadget.createdDate?datetime} by ${gadget.createdBy}
+                </td>
+            </tr>
+            <tr>
+                <td class="gadgetMetadataLabel">Last Updated:</td>
+                <td class="gadgetMetadata">
+                    ${gadget.modifiedDate?datetime} by ${gadget.modifiedBy}
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2">
+                    <button dojoType="dijit.form.Button" type="submit">Save Gadget</button>
+                    <button dojoType="dijit.form.Button" type="button" onClick="portal.repository.admin.cancelEditGadget();">Cancel</button>
+                </td>
+            </tr>
+        </table>
+     </form>
+</div>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_edit.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,41 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<script type="text/javascript">
+    dojo.addOnLoad(dojo.hitch(portal.repository,"init",${lastVisitedPageId?c}));
+    dojo.addOnLoad(portal.repository.createRepositoryList);
+</script>
+
+<#include "/WEB-INF/freemarker/repository/search_template.ftl">
+<table id="repoMain">
+    <tr>
+        <td class="repoLeft">
+            <div class="repoNavigation">
+                <#include "/WEB-INF/freemarker/repository/repository_list_left.ftl">
+            </div>
+        </td>
+        <td class="repoCenter">
+            <div id="repositoryList"></div>
+        </td>
+    </tr>
+</table>
+<#-- display the non-linkable app store image in the left side when displaying the all view-->
+<script type="text/javascript">
+    portal.repository.enableLinkedAppStoreImage(false);
+</script>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list_left.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list_left.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list_left.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list_left.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,58 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#-- LHS side of the repository Listing -->
+<div id="appStoreHeadingBack">
+    <a href="<@c.url value="${.globals.repositoryControllerPath}" />/view">
+        <div class="appStoreHeadingBack" title="App Store"></div>
+    </a>
+</div>
+<div id="appStoreHeading" class="appStoreHeadingimg" title="App Store"></div>
+<div id="repoFilter">
+    <span class="secondaryPageSubHeading">View:</span>
+    <ul class="repoFilter">
+        <a class="repoFilterLink" href="<@c.url value="${.globals.repositoryControllerPath}" />/view">All</a>
+    </ul>
+</div>
+<div>
+    <span class="secondaryPageSubHeading">By Audience:</span>
+    <ul class="repoFilter">
+    	<#list audienceCloud as gadgetAudience>
+      		<a class="repoFilterLink" href="javascript:portal.repository.getGadgetByAudience('${gadgetAudience.gadgetAudienceId}');">${gadgetAudience.description?xhtml}</a><#if gadgetAudience_has_next>,</#if>
+        </#list>
+    </ul>
+</div>
+<br/>
+<div>
+    <span class="secondaryPageSubHeading">By Tags:</span>
+    <ul class="repoFilter">
+    	<#list tagCloud as gadgetTagName>
+      		<a class="repoFilterLink" href="javascript:portal.repository.getGadgetbyTag('${gadgetTagName?xhtml}');">${gadgetTagName?xhtml}</a><#if gadgetTagName_has_next>,</#if>
+    	</#list>
+    </ul>
+</div>
+<@security.authorize access="hasAnyRole('OFFICIAL_GADGET_DEVELOPER','UNOFFICIAL_GADGET_DEVELOPER')">
+<div id="repoAdmin">
+     <span class="secondaryPageSubHeading">Admin</span>
+     <ul>
+        <@security.authorize access="hasAnyRole('OFFICIAL_GADGET_DEVELOPER','UNOFFICIAL_GADGET_DEVELOPER')">
+        <li><a href="<@c.url value="${.globals.repositoryControllerPath}" />/addGadget">Add Gadget to App Store</a>
+        </@security.authorize>
+     </ul>
+</div>
+</@security.authorize>

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_list_left.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_macros.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_macros.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_macros.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_macros.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,33 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<#--
+    renderGadgetAuthor
+        This macro renders the By: Author information for a gadget
+        1) gadget - the gadget to render author information for
+-->
+<#macro renderGadgetAuthor gadget>
+    <div class="repoGadgetAuthor">By:
+        <#if gadget.gadgetAuthorType.code = "EXT" >
+            ${gadget.author?xhtml}<span class="repoExternalGadgetIndicator">External Gadget</span>
+        <#else>
+            ${gadget.author?xhtml}
+        </#if>
+    </div>
+</#macro>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/repository_macros.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/search_template.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/search_template.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/search_template.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/search_template.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,31 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<div class="repoTop">
+    <span class="backtoPortal">
+        <a href="<@c.url value="${.globals.pageControllerPath}" />/view" title="Back to Page"><div class="backtoPortalimg"></div></a>
+    </span>
+
+    <span class="repoSearch">
+        <form dojoType="dijit.form.Form" name="repoSearch" onsubmit="portal.repository.searchGadget(); return false;">
+            <input dojoType="dijit.form.TextBox" type="text" id="gadgetSearchText" name="searchText"/>
+            <button dojoType="dijit.form.Button" type="submit">Find Gadget</button>
+        </form>
+    </span>
+    <div style="clear:both;"></div>
+</div>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/repository/search_template.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_layout.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_layout.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_layout.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_layout.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,64 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<#-- Expose any attributes defined in the tiles-defs.xml to the request scope for use in other tiles -->
+<@tiles.importAttribute scope="request"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
+    <meta http-equiv="x-ua-compatible" content="IE=8"/>
+    <title>${pageTitlePrefix}${(page.name)!pageTitleSuffix}</title>
+    <link rel="stylesheet" type="text/css" href="${.globals.dojoRoot}/dijit/themes/${.globals.dojoTheme}/${.globals.dojoTheme}.css"/>
+    <link rel="stylesheet" type="text/css" href="${.globals.dojoRoot}/dojo/resources/dojo.css"/>
+    <link rel="stylesheet" type="text/css" href="${.globals.staticContentCss}/gadgets-chrome.css"/>
+    <link rel="stylesheet" type="text/css" href="${.globals.staticContentCss}/gadgets-dnd.css"/>
+    <link rel="stylesheet" type="text/css" href="${.globals.staticContentCss}/container.css"/>
+    <link rel="stylesheet" type="text/css" href="${.globals.staticContentJQueryUi}" rel="stylesheet"/>
+
+    <script type="text/javascript" src="${portal_properties["shindig.protocol"]}${.globals.shindigUrl}/js/rpc.js?container=${.globals.containerName}&c=1"></script>
+    <script type="text/javascript">djConfig = {isDebug: false,parseOnLoad: true,dojoBlankHtmlUrl: '<@c.url value="/html/dojoxd_blank.html" />',modulePaths: {"portal": "<@c.url value="/script/dojo/release/portal" />"}};</script>
+    <script type="text/javascript" src="${.globals.dojoRoot}/dojo/dojo.xd.js"></script>
+    <script type="text/javascript" src="<@c.url value="/script/jquery/jquery-${.globals.jQueryVersion}.min.js" />"></script>
+    <script type="text/javascript" src="<@c.url value="/script/jquery/jquery-ui-${.globals.jQueryUiVersion}.custom.min.js" />"></script>
+    <script type="text/javascript" src="<@c.url value="/script/${.globals.portalJS}" />"></script>
+
+    <script type="text/javascript">
+        // define dynamic common properties
+        portal.common.applicationName = "${.globals.appName}";
+        portal.common.contextRoot = "<@c.url value="/" />";
+        portal.common.controller = {
+            "page" : "<@c.url value="${.globals.pageControllerPath}" />",
+            "repository" : "<@c.url value="${.globals.repositoryControllerPath}" />",
+            "regionGadget" : "<@c.url value="${.globals.regionGadgetControllerPath}" />",
+            "admin" : "<@c.url value="${.globals.adminControllerPath}" />",
+            "wizard" : "<@c.url value="${.globals.wizardControllerPath}" />"
+        };
+        portal.common.staticContentImages = "${.globals.staticContentImages}";
+        portal.common.webservice = {"gadgetSearch" : "<@c.url value="${.globals.gadgetSearchPath}" />", "securityToken" : "<@c.url value="${.globals.securityTokenPath}" />"};
+    </script>
+</head>
+<body class="${.globals.dojoTheme}">
+    <@tiles.insertAttribute name="header"/>
+    <div id="pageContent">
+        <@tiles.insertAttribute name="body"/>
+        <@tiles.insertAttribute name="footer"/>
+    </div>
+</body>
+</html>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_layout.ftl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_page.ftl
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_page.ftl?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_page.ftl (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_page.ftl Fri Apr  1 16:42:22 2011
@@ -0,0 +1,57 @@
+<#--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in
+~ compliance with the License.  You may obtain a copy of the License at
+~
+~    http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+  -->
+<#include "/WEB-INF/freemarker/common/globals.ftl">
+<#-- Expose any attributes defined in the tiles-defs.xml to the request scope for use in other tiles -->
+<@tiles.importAttribute scope="request"/>
+<#import "/WEB-INF/freemarker/page/page_macros.ftl" as pageMacros>
+<script type="text/javascript">
+    // register our custom set pref function with shindig
+    // NOTE: this must be executed in the html HEAD tag to ensure the
+    // function is registered before IFRAMES are executed (IE8 specific)
+    // TODO: Try moving this to gadgets.js to see if its still an issue
+    gadgets.rpc.register('set_pref', portal.regionGadget.setUserPref);
+    // TODO - this one too?
+    gadgets.rpc.register('setUserPrefs', portal.regionGadget.setUserPrefs);
+
+    // create gadget/region array to keep track of locations for dnd
+    //indices should match gadget-chrome-X in body
+    var regions = [
+        <#list page.regionList as region>
+             {'name' : '${region.name}', 'gadgets' : [<#list region.regionGadgetList as regionGadget>{'id':${regionGadget.regionGadgetId?c}}<#if regionGadget_has_next>,</#if></#list>]}<#if region_has_next>,</#if>
+        </#list>
+    ];
+
+    <#-- check to see if the user has any wizards they have not yet seen -->
+    <#if nonCompletedWizards??>
+        <#list nonCompletedWizards as wizard>
+            dojo.addOnLoad(dojo.hitch(portal.wizard, "displayWizardDialog", ${wizard.wizardId?c}, '${wizard.name?xhtml}', '${wizard.displayName?xhtml}', '${wizard.url}'));
+        </#list>
+    </#if>
+
+    // initialize the page
+    dojo.addOnLoad(dojo.hitch(portal.page, "init", ${page.pageId?c}, regions));
+</script>
+<#include "/WEB-INF/freemarker/page/edit_page_properties.ftl">
+<#-- render the page tabs -->
+<@pageMacros.renderPageTabs />
+<#-- this is the page menu widget that gets injected into the active tab in the portal.page.init() method -->
+<@pageMacros.renderPageMenu "home" />
+<#-- render the form object used by some of the page features -->
+<@pageMacros.renderPagesForm />
+<@tiles.insertAttribute name="layout"/>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/freemarker/templates/base_page.ftl
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message