Skip to content

Commit

Permalink
SAK-32729 - Add shopping cart icon to External Tools that support Con…
Browse files Browse the repository at this point in the history
…tent Item (sakaiproject#4648)
  • Loading branch information
csev authored Jul 28, 2017
1 parent d22035d commit 952230c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,10 @@ public List<UrlItem> createNewUrls(SimplePageBean bean, Integer bltiToolId) {
String url = ServerConfigurationService.getToolUrl() + "/" + toolId + "/sakai.basiclti.admin.helper.helper?panel=ContentConfig&tool_id="
+ tool.get(LTIService.LTI_ID) + "&returnUrl=" + URLEncoder.encode(returnUrl);
String fa_icon = (String) tool.get(LTIService.LTI_FA_ICON);
Long ls = getLong(tool.get(LTIService.LTI_PL_LINKSELECTION));
Boolean selector = (new Long(1)).equals(ls);

list.add(new UrlItem(url, (String) tool.get(LTIService.LTI_TITLE), fa_icon));
list.add(new UrlItem(url, (String) tool.get(LTIService.LTI_TITLE), fa_icon, selector));
}

String url = ServerConfigurationService.getToolUrl() + "/" + toolId + "/sakai.basiclti.admin.helper.helper?panel=Main" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,16 @@ public static class UrlItem {
public String Url;
public String label;
public String fa_icon = null;
public Boolean search = Boolean.FALSE;
public UrlItem(String Url, String label) {
this.Url = Url;
this.label = label;
}
public UrlItem(String Url, String label, String fa_icon) {
public UrlItem(String Url, String label, String fa_icon, Boolean search) {
this.Url = Url;
this.label = label;
this.fa_icon = fa_icon;
this.search = search;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ public void fillComponents(UIContainer tofill, ViewParameters viewparams, Compon
.decorate(new UIFreeAttributeDecorator("class", "fa " + createLink.fa_icon));
}

if ( createLink.search ) {
UIOutput.make(link, "blti-search-icon");
}

}

if ( toolcount > 0 ) {
Expand Down
1 change: 1 addition & 0 deletions lessonbuilder/tool/src/webapp/templates/BltiPicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h2 rsf:id="mainhead" id="mainhead"></h2>
<div rsf:id="blti-create:" style="margin-left:2em">
<i class="" rsf:id="blti-create-icon"></i>
<a href="#" target="sakai-basiclti-admin-iframe" onclick="showIframe(this.title);" rsf:id="blti-create-link"></a>
<i class="fa fa-shopping-cart lessons-shopping-cart" rsf:id="blti-search-icon"></i>
</div>

<form action="#" rsf:id="blti-autosubmit" id="blti-autosubmit">
Expand Down

0 comments on commit 952230c

Please sign in to comment.