Skip to content
Snippets Groups Projects
Commit 3c3d4051 authored by srosse's avatar srosse
Browse files

Merge with 03975922272c6b4671c4da0d56fe2b0454688f9a

parents 112d329d e2165700
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,7 @@ public class GlossaryMainController extends BasicController implements Activatea ...@@ -113,6 +113,7 @@ public class GlossaryMainController extends BasicController implements Activatea
glistVC.contextPut("userAllowToEditEnabled", new Boolean(glossarySecCallback.isUserAllowToEditEnabled())); glistVC.contextPut("userAllowToEditEnabled", new Boolean(glossarySecCallback.isUserAllowToEditEnabled()));
addButton = LinkFactory.createButtonSmall("cmd.add", glistVC, this); addButton = LinkFactory.createButtonSmall("cmd.add", glistVC, this);
addButton.setIconLeftCSS("o_icon o_icon_add o_icon-fw");
initEditView(ureq, glossarySecCallback.canAdd()); initEditView(ureq, glossarySecCallback.canAdd());
updateRegisterAndGlossaryItems(); updateRegisterAndGlossaryItems();
...@@ -295,12 +296,14 @@ public class GlossaryMainController extends BasicController implements Activatea ...@@ -295,12 +296,14 @@ public class GlossaryMainController extends BasicController implements Activatea
for (GlossaryItem gi : gIList) { for (GlossaryItem gi : gIList) {
boolean canEdit = glossarySecCallback.canEdit(gi); boolean canEdit = glossarySecCallback.canEdit(gi);
if(canEdit) { if(canEdit) {
Link tmpEditButton = LinkFactory.createCustomLink(CMD_EDIT + linkNum, CMD_EDIT + linkNum, "cmd.edit", Link.BUTTON_SMALL, glistVC, Link tmpEditButton = LinkFactory.createCustomLink(CMD_EDIT + linkNum, CMD_EDIT + linkNum, "cmd.edit", Link.BUTTON_XSMALL, glistVC,
this); this);
tmpEditButton.setIconLeftCSS("o_icon o_icon_edit o_icon-fw");
tmpEditButton.setUserObject(gi); tmpEditButton.setUserObject(gi);
Link tmpDelButton = LinkFactory.createCustomLink(CMD_DELETE + linkNum, CMD_DELETE + linkNum, "cmd.delete", Link.BUTTON_SMALL, Link tmpDelButton = LinkFactory.createCustomLink(CMD_DELETE + linkNum, CMD_DELETE + linkNum, "cmd.delete", Link.BUTTON_XSMALL,
glistVC, this); glistVC, this);
tmpDelButton.setUserObject(gi); tmpDelButton.setUserObject(gi);
tmpDelButton.setIconLeftCSS("o_icon o_icon_delete_item o_icon-fw");
} }
GlossaryItemWrapper wrapper = new GlossaryItemWrapper(gi, linkNum); GlossaryItemWrapper wrapper = new GlossaryItemWrapper(gi, linkNum);
......
#if ($editModeEnabled) <div class="o_glossary">
<div class="o_glossary_addcommand"> <div class="o_header_with_buttons">
#if($r.available("cmd.add")) <h3>$r.translate("glossary.title")</h3>
$r.render("cmd.add") #if ($editModeEnabled)
<div class="o_button_group">
#if($r.available("cmd.add"))
$r.render("cmd.add")
#end
</div>
#end #end
</div> </div>
#end
<div class="o_glossary">
<h3>$r.translate("glossary.title")</h3><br/>
#if ($registerEnabled) #if ($registerEnabled)
<div class="o_glossary_register"> <div class="o_register o_block">
#foreach( $registerLink in $registerLinkList ) #foreach( $registerLink in $registerLinkList )
#set ( $indexChar = $registerLink.getI18n() ) #set ( $indexChar = $registerLink.getI18n() )
$r.render("register.link.$indexChar") $r.render("register.link.$indexChar")
...@@ -18,24 +21,35 @@ ...@@ -18,24 +21,35 @@
#end #end
<dl> <dl>
#foreach($glossaryItem in $editAndDelButtonList ) #foreach($glossaryItem in $editAndDelButtonList )
<div class="o_entry o_block clearfix">
#set ($glossaryItemIndex = $glossaryItem.getIndex()) #set ($glossaryItemIndex = $glossaryItem.getIndex())
#if ( $filterIndex == $glossaryItemIndex || $filterIndex == "all" ) #if ( $filterIndex == $glossaryItemIndex || $filterIndex == "all" )
## <div class="o_glossary_entry">
#if ($editModeEnabled) #if ($editModeEnabled)
<div class="o_glossary_commands"> <div class="pull-right">
#if($r.available("cmd.edit.$velocityCount")) <div class="btn-group">
$r.render("cmd.edit.$velocityCount") #if($r.available("cmd.edit.$velocityCount"))
#end $r.render("cmd.edit.$velocityCount")
#if($r.available("cmd.delete.$velocityCount")) #end
$r.render("cmd.delete.$velocityCount") #if($r.available("cmd.delete.$velocityCount"))
#end $r.render("cmd.delete.$velocityCount")
#end
</div>
</div> </div>
#end #end
<dt> <dt>
$r.escapeHtml($glossaryItem.glossTerm) $r.escapeHtml($glossaryItem.glossTerm)
#if($userAllowToEditEnabled) #if ( $glossaryItem.getGlossSynonyms().size() > 0)
#foreach ( $glossSynonym in $glossaryItem.getGlossSynonyms() )
<small>
$r.escapeHtml($glossSynonym)
</small>
#end
#end
</dt>
#if($userAllowToEditEnabled && ($glossaryItem.hasAuthor() || $glossaryItem.hasModifier()))
<div class="o_meta">
#if($glossaryItem.hasAuthor()) #if($glossaryItem.hasAuthor())
<span class="o_glossary_author">$r.translate("glossary.item.published.by") <span class="o_author">$r.translate("glossary.item.published.by")
#if($glossaryItem.authorCmd) #if($glossaryItem.authorCmd)
<a href="$r.commandURI($glossaryItem.authorCmd)" target="o_glossary_profil" onclick="return o2cl()">$r.escapeHtml($glossaryItem.authorName)</a> <a href="$r.commandURI($glossaryItem.authorCmd)" target="o_glossary_profil" onclick="return o2cl()">$r.escapeHtml($glossaryItem.authorName)</a>
#else #else
...@@ -44,7 +58,7 @@ ...@@ -44,7 +58,7 @@
#if($glossaryItem.hasModifier()), #end</span> #if($glossaryItem.hasModifier()), #end</span>
#end #end
#if($glossaryItem.hasModifier()) #if($glossaryItem.hasModifier())
<span class="o_glossary_modifier">$r.translate("glossary.item.modified.by.on") <span class="o_modifier">$r.translate("glossary.item.modified.by.on")
#if($glossaryItem.modifierCmd) #if($glossaryItem.modifierCmd)
<a href="$r.commandURI($glossaryItem.modifierCmd)" target="o_glossary_profil" onclick="return o2cl()" >$r.escapeHtml($glossaryItem.modifierName)</a> <a href="$r.commandURI($glossaryItem.modifierCmd)" target="o_glossary_profil" onclick="return o2cl()" >$r.escapeHtml($glossaryItem.modifierName)</a>
#else #else
...@@ -52,26 +66,19 @@ ...@@ -52,26 +66,19 @@
#end #end
$glossaryItem.lastModificationDate</span> $glossaryItem.lastModificationDate</span>
#end #end
</div>
#end #end
#if ( $glossaryItem.getGlossSynonyms().size() > 0)
<div class="o_glossary_synonym">
#foreach ( $glossSynonym in $glossaryItem.getGlossSynonyms() )
$r.escapeHtml($glossSynonym)
#end
</div>
#end
</dt>
<dd> <dd>
$r.xssScan($glossaryItem.getGlossDef()) $r.xssScan($glossaryItem.getGlossDef())
</dd> </dd>
## </div>
#end #end
</div>
#end #end
</dl> </dl>
</div> </div>
#if ($editModeEnabled) #if ($editModeEnabled)
<p /> <p />
<div class="o_glossary_addcommand"> <div class="o_button_group">
#if($r.available("cmd.add")) #if($r.available("cmd.add"))
$r.render("cmd.add") $r.render("cmd.add")
#end #end
......
...@@ -332,6 +332,28 @@ a.o_chelp { ...@@ -332,6 +332,28 @@ a.o_chelp {
} }
} }
/* Glossary */
.o_glossary {
.o_register {
text-align: center;
}
.o_meta {
font-size: 90%;
color: $text-muted;
font-style: italic;
}
dl {
dt {
&:first-letter {
font-size: ceil(($font-size-base * 1.5));;
}
small {
color: $text-muted;
}
}
}
}
/* Segmented view wrapper */ /* Segmented view wrapper */
.o_segments_content { .o_segments_content {
margin-top: $line-height-computed; margin-top: $line-height-computed;
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment