Skip to content
Snippets Groups Projects
Commit 6f4e3fb7 authored by Florian Gnaegi - frentix GmbH's avatar Florian Gnaegi - frentix GmbH
Browse files

OO-1068 booking methods styling

parent 5378209c
No related branches found
No related tags found
No related merge requests found
Showing
with 119 additions and 57 deletions
...@@ -872,7 +872,7 @@ public class CatalogController extends BasicController implements Activateable2 ...@@ -872,7 +872,7 @@ public class CatalogController extends BasicController implements Activateable2
List<PriceMethod> types = new ArrayList<PriceMethod>(); List<PriceMethod> types = new ArrayList<PriceMethod>();
if (entry.getRepositoryEntry().isMembersOnly()) { if (entry.getRepositoryEntry().isMembersOnly()) {
// members only always show lock icon // members only always show lock icon
types.add(new PriceMethod("", "b_access_membersonly_icon")); types.add(new PriceMethod("", "o_ac_membersonly_icon"));
} else { } else {
// collect access control method icons // collect access control method icons
OLATResource resource = entry.getRepositoryEntry().getOlatResource(); OLATResource resource = entry.getRepositoryEntry().getOlatResource();
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<tr class="b_table_odd"> <tr class="b_table_odd">
#end #end
<td> <td>
<div class="b_clearfix"> <div class="clearfix">
#if ($canRemoveAllLinks || $hasOwnedLinks) #if ($canRemoveAllLinks || $hasOwnedLinks)
#if($canRemoveAllLinks || $ownedLinks.contains($child)) #if($canRemoveAllLinks || $ownedLinks.contains($child))
<a href="$r.commandURIbg("edit.leaf$ri")" onclick="return o2cl()" onkeypress="return o2cl()" $r.bgTarget() class="b_float_right">$r.translate("edit")</a> <a href="$r.commandURIbg("edit.leaf$ri")" onclick="return o2cl()" onkeypress="return o2cl()" $r.bgTarget() class="b_float_right">$r.translate("edit")</a>
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
#if($r.get("ac_$ri")) #if($r.get("ac_$ri"))
#foreach($ac_type in $r.get("ac_$ri")) #foreach($ac_type in $r.get("ac_$ri"))
#if($ac_type.price && $ac_type.price.length() > 0) #if($ac_type.price && $ac_type.price.length() > 0)
<span class='b_float_right b_with_small_icon_left $ac_type.type'>$ac_type.price</span> <span class='o_nowrap'><i class='o_icon $ac_type.type o_icon-lg'></i> $ac_type.price</span>
#else #else
<span class='b_float_right b_small_icon $ac_type.type'></span> <i class='o_icon $ac_type.type o_icon-lg'></i>
#end #end
#end #end
#end #end
......
...@@ -86,7 +86,7 @@ class FlexiTableCustomRenderer extends AbstractFlexiTableRenderer implements Com ...@@ -86,7 +86,7 @@ class FlexiTableCustomRenderer extends AbstractFlexiTableRenderer implements Com
@Override @Override
protected void renderRow(Renderer renderer, StringOutput sb, FlexiTableComponent ftC, String rowIdPrefix, protected void renderRow(Renderer renderer, StringOutput sb, FlexiTableComponent ftC, String rowIdPrefix,
int row, int rows, URLBuilder ubu, Translator translator, RenderResult renderResult) { int row, int rows, URLBuilder ubu, Translator translator, RenderResult renderResult) {
sb.append("<div class='row'>"); sb.append("<div class='o_table_row row'>");
FlexiTableElementImpl ftE = ftC.getFlexiTableElement(); FlexiTableElementImpl ftE = ftC.getFlexiTableElement();
VelocityContainer container = ftE.getRowRenderer(); VelocityContainer container = ftE.getRowRenderer();
......
...@@ -49,23 +49,23 @@ public class BGAccessControlledCellRenderer implements CustomCellRenderer { ...@@ -49,23 +49,23 @@ public class BGAccessControlledCellRenderer implements CustomCellRenderer {
for(Object accessType:accessTypes) { for(Object accessType:accessTypes) {
if(accessType instanceof String) { if(accessType instanceof String) {
String type = (String)accessType; String type = (String)accessType;
sb.append("<span class='b_small_icon ").append(type).append("_icon b_access_method'>").append("</span>"); sb.append("<i class='o_icon ").append(type).append("_icon o_icon-lg'></i>");
} else if (accessType instanceof PriceMethodBundle) { } else if (accessType instanceof PriceMethodBundle) {
PriceMethodBundle bundle = (PriceMethodBundle)accessType; PriceMethodBundle bundle = (PriceMethodBundle)accessType;
Price price = bundle.getPrice(); Price price = bundle.getPrice();
String type = bundle.getMethod().getMethodCssClass(); String type = bundle.getMethod().getMethodCssClass();
if(price == null || price.isEmpty()) { if(price == null || price.isEmpty()) {
sb.append("<span class='b_small_icon ").append(type).append("_icon b_access_method'>").append("</span>"); sb.append("<i class='o_icon ").append(type).append("_icon o_icon-lg'></i>");
} else { } else {
String p = PriceFormat.fullFormat(price); String p = PriceFormat.fullFormat(price);
sb.append("<span class='b_with_small_icon_left ").append(type).append("_icon b_access_method'>").append(p).append("</span>"); sb.append("<span class='o_nowrap'><i class='o_icon ").append(type).append("_icon o_icon-lg'></i> ").append(p).append("</span>");
} }
} }
} }
} else if(val instanceof Boolean) { } else if(val instanceof Boolean) {
boolean acessControlled = ((Boolean)val).booleanValue(); boolean acessControlled = ((Boolean)val).booleanValue();
if(acessControlled) { if(acessControlled) {
sb.append("<span class='b_small_icon b_group_accesscontrolled b_access_method'>").append("</span>"); sb.append("<i class='o_icon o_ac_group_icon o_icon-lg'></i>");
} }
} }
} }
......
...@@ -49,13 +49,13 @@ public class RepositoryEntryACColumnDescriptor implements CustomCellRenderer { ...@@ -49,13 +49,13 @@ public class RepositoryEntryACColumnDescriptor implements CustomCellRenderer {
for(Object accessType:accessTypes) { for(Object accessType:accessTypes) {
if(accessType instanceof String) { if(accessType instanceof String) {
String type = (String)accessType; String type = (String)accessType;
sb.append("<span class='b_small_icon ").append(type).append("_icon b_access_method'>").append("</span>"); sb.append("<i class='o_icon ").append(type).append("_icon o_icon-lg'></i>");
} }
} }
} else if(val instanceof Boolean) { } else if(val instanceof Boolean) {
boolean acessControlled = ((Boolean)val).booleanValue(); boolean acessControlled = ((Boolean)val).booleanValue();
if(acessControlled) { if(acessControlled) {
sb.append("<span class='b_small_icon b_group_accesscontrolled b_access_method'>").append("</span>"); sb.append("<i class='o_icon o_ac_group_icon o_icon-lg'></i>");
} }
} else if (val instanceof OLATResourceAccess) { } else if (val instanceof OLATResourceAccess) {
OLATResourceAccess access = (OLATResourceAccess)val; OLATResourceAccess access = (OLATResourceAccess)val;
...@@ -63,10 +63,10 @@ public class RepositoryEntryACColumnDescriptor implements CustomCellRenderer { ...@@ -63,10 +63,10 @@ public class RepositoryEntryACColumnDescriptor implements CustomCellRenderer {
Price price = bundle.getPrice(); Price price = bundle.getPrice();
String type = bundle.getMethod().getMethodCssClass(); String type = bundle.getMethod().getMethodCssClass();
if(price == null || price.isEmpty()) { if(price == null || price.isEmpty()) {
sb.append("<span class='b_small_icon ").append(type).append("_icon b_access_method'>").append("</span>"); sb.append("<i class='o_icon ").append(type).append("_icon o_icon-lg'></i>");
} else { } else {
String p = PriceFormat.fullFormat(price); String p = PriceFormat.fullFormat(price);
sb.append("<span class='b_with_small_icon_left ").append(type).append("_icon b_access_method'>").append(p).append("</span>"); sb.append("<span class='o_nowrap'><i class='o_icon ").append(type).append("_icon o_icon-lg'></i> ").append(p).append("</span>");
} }
} }
} }
......
...@@ -24,6 +24,7 @@ FileResource.XLS=Excel ...@@ -24,6 +24,7 @@ FileResource.XLS=Excel
comments=Kommentar comments=Kommentar
passed.true=$org.olat.course.assessment\:passed.true passed.true=$org.olat.course.assessment\:passed.true
passed.false=$org.olat.course.assessment\:passed.false passed.false=$org.olat.course.assessment\:passed.false
passed.unknown=-
NoImage=Dieses Dateiformat kann nicht als Bild hochgeladen werden. NoImage=Dieses Dateiformat kann nicht als Bild hochgeladen werden.
ULLimitExceeded=Das Bild darf nicht gr\u00F6sser als {0} kByte sein. ULLimitExceeded=Das Bild darf nicht gr\u00F6sser als {0} kByte sein.
add.blog=Blog hinzuf\u00FCgen add.blog=Blog hinzuf\u00FCgen
...@@ -253,6 +254,9 @@ managed.resource=Externe Verwaltung ...@@ -253,6 +254,9 @@ managed.resource=Externe Verwaltung
managed.resource.intro=Dieser Kurs wurde von einem externen Werkzeug erstellt. Einige Einstellungen und Module knnen daher in OpenOLAT nicht verndert und benutzt werden. Folgende Elemente sind in OpenOLAT gesperrt: managed.resource.intro=Dieser Kurs wurde von einem externen Werkzeug erstellt. Einige Einstellungen und Module knnen daher in OpenOLAT nicht verndert und benutzt werden. Folgende Elemente sind in OpenOLAT gesperrt:
details.expenditureOfWork={0} Stunden pro Woche details.expenditureOfWork={0} Stunden pro Woche
details.score=Mit {0} Punkte details.score=Mit {0} Punkte
details.label.status=Status
details.label.score=Punkte
details.label.recent=Besucht
lifecycle.softkey=Bezeichnung lifecycle.softkey=Bezeichnung
lifecycle.label=Name lifecycle.label=Name
lifecycle.validFrom=$\:cif.date.start lifecycle.validFrom=$\:cif.date.start
...@@ -296,7 +300,7 @@ details.members=Mitgliederverwaltung ...@@ -296,7 +300,7 @@ details.members=Mitgliederverwaltung
details.noreferenceinfo=Wird in keinem Kurs verwendet. details.noreferenceinfo=Wird in keinem Kurs verwendet.
details.notypeinfo=Keine typenspezifische Information verf\u00FCgbar. details.notypeinfo=Keine typenspezifische Information verf\u00FCgbar.
details.openeditor=Inhalt editieren details.openeditor=Inhalt editieren
details.orders=Buchungen details.orders=Buchungsmglichkeiten
details.owner=Besitzer der Lernressource details.owner=Besitzer der Lernressource
details.referenceinfo=Referenzen details.referenceinfo=Referenzen
details.referenceinfoheader=Information zur Verwendung details.referenceinfoheader=Information zur Verwendung
......
...@@ -21,6 +21,7 @@ FileResource.SURVEY=Questionnaire ...@@ -21,6 +21,7 @@ FileResource.SURVEY=Questionnaire
FileResource.TEST=Test FileResource.TEST=Test
FileResource.WIKI=Wiki FileResource.WIKI=Wiki
FileResource.XLS=Excel FileResource.XLS=Excel
passed.unknown=-
NoImage=This file format cannot be uploaded as image. NoImage=This file format cannot be uploaded as image.
ULLimitExceeded=Images must not exceed {0} kByte. ULLimitExceeded=Images must not exceed {0} kByte.
add.blog=Add blog add.blog=Add blog
...@@ -279,6 +280,9 @@ details.referenceinfo=References ...@@ -279,6 +280,9 @@ details.referenceinfo=References
details.referenceinfoheader=Information on usage details.referenceinfoheader=Information on usage
details.summaryprop=Summary of settings details.summaryprop=Summary of settings
details.typeinfoheader=Type-specific information details.typeinfoheader=Type-specific information
details.label.status=Status
details.label.score=Score
details.label.recent=Last visit
disabledexportreason=This learning resource must not be exported. disabledexportreason=This learning resource must not be exported.
disabledforwardreason=Please save your entries first. disabledforwardreason=Please save your entries first.
edit.lifecycle=Edit semester edit.lifecycle=Edit semester
......
...@@ -47,13 +47,13 @@ public class ACRenderer implements FlexiCellRenderer { ...@@ -47,13 +47,13 @@ public class ACRenderer implements FlexiCellRenderer {
for(Object accessType:accessTypes) { for(Object accessType:accessTypes) {
if(accessType instanceof String) { if(accessType instanceof String) {
String type = (String)accessType; String type = (String)accessType;
sb.append("<i class='o_icon ").append(type).append("_icon b_access_method'>").append("</i>"); sb.append("<i class='o_icon ").append(type).append("_icon o_icon-lg'></i>");
} }
} }
} else if(val instanceof Boolean) { } else if(val instanceof Boolean) {
boolean acessControlled = ((Boolean)val).booleanValue(); boolean acessControlled = ((Boolean)val).booleanValue();
if(acessControlled) { if(acessControlled) {
sb.append("<i class='o_icon b_group_accesscontrolled b_access_method'>").append("</i>"); sb.append("<i class='o_icon o_ac_group_icon o_icon-lg'></i>");
} }
} else if (val instanceof OLATResourceAccess) { } else if (val instanceof OLATResourceAccess) {
OLATResourceAccess access = (OLATResourceAccess)val; OLATResourceAccess access = (OLATResourceAccess)val;
...@@ -61,10 +61,10 @@ public class ACRenderer implements FlexiCellRenderer { ...@@ -61,10 +61,10 @@ public class ACRenderer implements FlexiCellRenderer {
Price price = bundle.getPrice(); Price price = bundle.getPrice();
String type = bundle.getMethod().getMethodCssClass(); String type = bundle.getMethod().getMethodCssClass();
if(price == null || price.isEmpty()) { if(price == null || price.isEmpty()) {
sb.append("<i class='o_icon ").append(type).append("_icon b_access_method'>").append("</i>"); sb.append("<i class='o_icon ").append(type).append("_icon o_icon-lg'></i>");
} else { } else {
String p = PriceFormat.fullFormat(price); String p = PriceFormat.fullFormat(price);
sb.append("<i class='o_icon ").append(type).append("_icon b_access_method'>").append(p).append("</i>"); sb.append("<span class='o_nowrap'><i class='o_icon ").append(type).append("_icon o_icon-lg'></i> ").append(p).append("</span>");
} }
} }
} }
......
...@@ -134,7 +134,7 @@ public class AuthoringEntryDataSource implements FlexiTableDataSourceDelegate<Au ...@@ -134,7 +134,7 @@ public class AuthoringEntryDataSource implements FlexiTableDataSourceDelegate<Au
List<PriceMethod> types = new ArrayList<PriceMethod>(); List<PriceMethod> types = new ArrayList<PriceMethod>();
if (entry.isMembersOnly()) { if (entry.isMembersOnly()) {
// members only always show lock icon // members only always show lock icon
types.add(new PriceMethod("", "b_access_membersonly_icon")); types.add(new PriceMethod("", "o_ac_membersonly_icon"));
} else { } else {
// collect access control method icons // collect access control method icons
OLATResource resource = entry.getOlatResource(); OLATResource resource = entry.getOlatResource();
......
...@@ -368,7 +368,7 @@ public class AuthoringEntryDetailsController extends FormBasicController impleme ...@@ -368,7 +368,7 @@ public class AuthoringEntryDetailsController extends FormBasicController impleme
List<PriceMethod> types = new ArrayList<PriceMethod>(); List<PriceMethod> types = new ArrayList<PriceMethod>();
if (entry.isMembersOnly()) { if (entry.isMembersOnly()) {
// members only always show lock icon // members only always show lock icon
types.add(new PriceMethod("", "b_access_membersonly_icon")); types.add(new PriceMethod("", "o_ac_membersonly_icon"));
if(isMember) { if(isMember) {
startLink = uifactory.addFormLink("start", "start", "start", null, layoutCont, Link.LINK); startLink = uifactory.addFormLink("start", "start", "start", null, layoutCont, Link.LINK);
} }
......
...@@ -150,7 +150,7 @@ public class DefaultRepositoryEntryDataSource implements FlexiTableDataSourceDel ...@@ -150,7 +150,7 @@ public class DefaultRepositoryEntryDataSource implements FlexiTableDataSourceDel
List<PriceMethod> types = new ArrayList<PriceMethod>(); List<PriceMethod> types = new ArrayList<PriceMethod>();
if (entry.isMembersOnly()) { if (entry.isMembersOnly()) {
// members only always show lock icon // members only always show lock icon
types.add(new PriceMethod("", "b_access_membersonly_icon")); types.add(new PriceMethod("", "o_ac_membersonly_icon"));
} else { } else {
// collect access control method icons // collect access control method icons
OLATResource resource = entry.getOlatResource(); OLATResource resource = entry.getOlatResource();
......
...@@ -203,8 +203,9 @@ public class RepositoryEntryDetailsController extends FormBasicController { ...@@ -203,8 +203,9 @@ public class RepositoryEntryDetailsController extends FormBasicController {
long numOfComments = row.getNumOfComments(); long numOfComments = row.getNumOfComments();
String title = "(" + numOfComments + ")"; String title = "(" + numOfComments + ")";
commentsLink = uifactory.addFormLink("comments", "comments", title, null, layoutCont, Link.NONTRANSLATED); commentsLink = uifactory.addFormLink("comments", "comments", title, null, layoutCont, Link.NONTRANSLATED);
String css = numOfComments > 0 ? "b_comments" : "b_comments b_no_comment"; commentsLink.setCustomEnabledLinkCSS("o_comments");
commentsLink.setCustomEnabledLinkCSS(css); String css = numOfComments > 0 ? "o_icon o_icon_comments o_icon-lg" : "o_icon o_icon_comments_none o_icon-lg";
commentsLink.setIconLeftCSS(css);
//load memberships //load memberships
boolean isMember = repositoryService.isMember(getIdentity(), entry); boolean isMember = repositoryService.isMember(getIdentity(), entry);
...@@ -213,7 +214,7 @@ public class RepositoryEntryDetailsController extends FormBasicController { ...@@ -213,7 +214,7 @@ public class RepositoryEntryDetailsController extends FormBasicController {
List<PriceMethod> types = new ArrayList<PriceMethod>(); List<PriceMethod> types = new ArrayList<PriceMethod>();
if (entry.isMembersOnly()) { if (entry.isMembersOnly()) {
// members only always show lock icon // members only always show lock icon
types.add(new PriceMethod("", "b_access_membersonly_icon")); types.add(new PriceMethod("", "o_ac_membersonly_icon"));
if(isMember) { if(isMember) {
startLink = uifactory.addFormLink("start", "start", "start", null, layoutCont, Link.LINK); startLink = uifactory.addFormLink("start", "start", "start", null, layoutCont, Link.LINK);
} }
......
...@@ -252,6 +252,19 @@ public class RepositoryEntryRow implements RepositoryEntryRef { ...@@ -252,6 +252,19 @@ public class RepositoryEntryRow implements RepositoryEntryRef {
this.lifecycleEnd = lifecycleEnd; this.lifecycleEnd = lifecycleEnd;
} }
public boolean isActive() {
boolean isCurrent = true;
if (lifecycleEnd != null || lifecycleStart != null) {
Date now = new Date();
if (lifecycleStart != null && lifecycleStart.after(now)) {
isCurrent = false;
} else if (lifecycleEnd != null && lifecycleEnd.before(now)) {
isCurrent = false;
}
}
return isCurrent;
}
public List<PriceMethod> getAccessTypes() { public List<PriceMethod> getAccessTypes() {
return accessTypes; return accessTypes;
} }
......
...@@ -7,12 +7,15 @@ ...@@ -7,12 +7,15 @@
#end #end
</div> </div>
<div class="o_meta"> <div class="o_meta">
<div class="o_go_xs visible-xs">
<i class=" o_icon o_icon_start o_icon-lg"></i>
</div>
<h3 class="o_title">$r.render($row.getSelectLinkName())</h3> <h3 class="o_title">$r.render($row.getSelectLinkName())</h3>
#if($row.authors) #if($row.authors)
<div class="o_author"><span class="text-muted">$r.translate("course.made.by")</span> $row.authors</div> <div class="o_author"><span class="text-muted">$r.translate("course.made.by")</span> $row.authors</div>
#end #end
#if($row.lifecycle || $row.lifecycleSoftKey || $row.lifecycleStart || $row.lifecycleEnd) #if($row.lifecycle || $row.lifecycleSoftKey || $row.lifecycleStart || $row.lifecycleEnd)
<div class="o_lifecycle"> <div class="o_lifecycle #if ($row.isActive()) o_active #end">
<i class="o_icon o_icon_lifecycle"></i> <i class="o_icon o_icon_lifecycle"></i>
#if($row.lifecycle) $row.lifecycle #end #if($row.lifecycle) $row.lifecycle #end
#if($row.lifecycleSoftKey) $row.lifecycleSoftKey #end #if($row.lifecycleSoftKey) $row.lifecycleSoftKey #end
...@@ -25,44 +28,81 @@ ...@@ -25,44 +28,81 @@
</div> </div>
<div class="o_bookmark">$r.render($row.markLinkName)</div> <div class="o_bookmark">$r.render($row.markLinkName)</div>
</div> </div>
<div class="o_access"> <div class="o_access container">
<div class=""> ##FIXME:OO10 hidden for now until more CSS is fixed #if($r.get("ac_$row.key"))
#if($r.get("ac_$item.key")) #foreach($ac_type in $r.get("ac_$row.key"))
#foreach($ac_type in $r.get("ac_$item.key")) #if($ac_type.price && $ac_type.price.length() > 0)
#if($ac_type.price && $ac_type.price.length() > 0) <span class="o_nowrap"><i class='o_icon $ac_type.type o_icon-lg'></i> $ac_type.price</span>
<span class='b_float_right b_with_small_icon_left $ac_type.type'>$ac_type.price</span> #else
#else <i class='o_icon $ac_type.type o_icon-lg'></i>
<span class='b_float_right b_small_icon $ac_type.type'></span>
#end
#end #end
$r.render($row.getSelectLinkName())
#end #end
$r.render($row.getSelectLinkName())
#end
#if($row.passed) #if($row.isMember() || $row.getVisit() > 0)
<div class="o_state">$r.translate("passed.true")</div> <div class="o_state row">
#elseif($item.failed) <div class="o_label">
<div class="o_state">$r.translate("passed.false")</div> $r.translate("details.label.status"):
#end </div>
#if($row.passed)
<div class="o_passed">
<i class="o_icon o_icon_passed"></i>
$r.translate("passed.true")
</div>
#elseif($row.failed)
<div class="o_failed">
<i class="o_icon o_icon_failed"></i>
$r.translate("passed.false")
</div>
#else
<div class="o_unknown">$r.translate("passed.unknown")</div>
#end
</div>
#if($row.score) #if($row.score)
<div class="o_score">$row.score</div> <div class="o_score row">
<div class="o_label">
$r.translate("details.label.score"):
</div>
<div class="o_points">
$row.score
</div>
</div>
#end #end
#if($row.recentLaunch) #if($row.recentLaunch)
<div class="o_recent">$r.formatDateAndTime($row.recentLaunch)</div> <div class="o_recent row">
<div class="o_label">
$r.translate("details.label.recent"):
</div>
<div class="o_date">
$r.formatDateAndTime($row.recentLaunch)
</div>
</div>
#end #end
#if($row.accessTypes) #end
#if($row.accessTypes && !$row.isMember())
<div class="o_bookings row">
<div class="o_label">
$r.translate("details.orders"): $r.translate("details.orders"):
</div>
<div class="o_methods">
#foreach($type in $row.accessTypes) #foreach($type in $row.accessTypes)
<span class="$type.type b_access_method">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <i class="o_icon $type.type o_icon-lg"></i>
#end #end
#end </div>
</div>
#end
<div class="o_social row">
$r.render($row.ratingFormItemName) $r.render($row.ratingFormItemName)
$r.render($row.commentsLinkName) $r.render($row.commentsLinkName)
</div> </div>
$r.render($row.getDetailsLinkName()) $r.render($row.getDetailsLinkName())
$r.render($row.getStartLinkName()) $r.render($row.getStartLinkName())
</div> </div>
......
...@@ -56,7 +56,7 @@ import org.olat.resource.accesscontrol.ui.FormController; ...@@ -56,7 +56,7 @@ import org.olat.resource.accesscontrol.ui.FormController;
public class FreeAccessHandler implements AccessMethodHandler { public class FreeAccessHandler implements AccessMethodHandler {
public static final String METHOD_TYPE = "free.method"; public static final String METHOD_TYPE = "free.method";
public static final String METHOD_CSS_CLASS = "b_access_method_free"; public static final String METHOD_CSS_CLASS = "o_ac_free";
@Override @Override
public boolean isPaymentMethod() { public boolean isPaymentMethod() {
......
...@@ -59,7 +59,7 @@ import org.olat.resource.accesscontrol.ui.FormController; ...@@ -59,7 +59,7 @@ import org.olat.resource.accesscontrol.ui.FormController;
public class PaypalAccessHandler implements AccessMethodHandler { public class PaypalAccessHandler implements AccessMethodHandler {
public static final String METHOD_TYPE = "paypal.method"; public static final String METHOD_TYPE = "paypal.method";
public static final String METHOD_CSS_CLASS = "b_access_method_paypal"; public static final String METHOD_CSS_CLASS = "o_ac_paypal";
@Override @Override
public boolean isPaymentMethod() { public boolean isPaymentMethod() {
......
...@@ -37,8 +37,8 @@ import org.olat.resource.accesscontrol.model.AccessMethod; ...@@ -37,8 +37,8 @@ import org.olat.resource.accesscontrol.model.AccessMethod;
import org.olat.resource.accesscontrol.model.AccessMethodSecurityCallback; import org.olat.resource.accesscontrol.model.AccessMethodSecurityCallback;
import org.olat.resource.accesscontrol.model.DefaultACSecurityCallback; import org.olat.resource.accesscontrol.model.DefaultACSecurityCallback;
import org.olat.resource.accesscontrol.model.Offer; import org.olat.resource.accesscontrol.model.Offer;
import org.olat.resource.accesscontrol.model.OfferImpl;
import org.olat.resource.accesscontrol.model.OfferAccess; import org.olat.resource.accesscontrol.model.OfferAccess;
import org.olat.resource.accesscontrol.model.OfferImpl;
import org.olat.resource.accesscontrol.model.Order; import org.olat.resource.accesscontrol.model.Order;
import org.olat.resource.accesscontrol.model.OrderPart; import org.olat.resource.accesscontrol.model.OrderPart;
import org.olat.resource.accesscontrol.model.PSPTransaction; import org.olat.resource.accesscontrol.model.PSPTransaction;
...@@ -58,7 +58,7 @@ import org.olat.resource.accesscontrol.ui.FormController; ...@@ -58,7 +58,7 @@ import org.olat.resource.accesscontrol.ui.FormController;
public class TokenAccessHandler implements AccessMethodHandler { public class TokenAccessHandler implements AccessMethodHandler {
public static final String METHOD_TYPE = "token.method"; public static final String METHOD_TYPE = "token.method";
public static final String METHOD_CSS_CLASS = "b_access_method_token"; public static final String METHOD_CSS_CLASS = "o_ac_token";
@Override @Override
public boolean isPaymentMethod() { public boolean isPaymentMethod() {
......
...@@ -134,7 +134,7 @@ public class AccessConfigurationController extends FormBasicController { ...@@ -134,7 +134,7 @@ public class AccessConfigurationController extends FormBasicController {
String title = handler.getMethodName(getLocale()); String title = handler.getMethodName(getLocale());
FormLink add = uifactory.addFormLink("create." + handler.getType(), title, null, formLayout, Link.LINK | Link.NONTRANSLATED); FormLink add = uifactory.addFormLink("create." + handler.getType(), title, null, formLayout, Link.LINK | Link.NONTRANSLATED);
add.setUserObject(method); add.setUserObject(method);
add.setCustomEnabledLinkCSS(("b_with_small_icon_left " + method.getMethodCssClass() + "_icon").intern()); add.setIconLeftCSS((method.getMethodCssClass() + "_icon").intern());
addMethods.add(add); addMethods.add(add);
formLayout.add(add.getName(), add); formLayout.add(add.getName(), add);
} }
......
...@@ -71,9 +71,9 @@ public class AccessMethodRenderer implements CustomCellRenderer { ...@@ -71,9 +71,9 @@ public class AccessMethodRenderer implements CustomCellRenderer {
uniqueType.add(type); uniqueType.add(type);
AccessMethodHandler handler = acModule.getAccessMethodHandler(type); AccessMethodHandler handler = acModule.getAccessMethodHandler(type);
sb.append("<span class='b_with_small_icon_left "); sb.append("<span class='o_nowrap'><a class='o_icon ");
sb.append(transaction.getMethod().getMethodCssClass()); sb.append(transaction.getMethod().getMethodCssClass());
sb.append("_icon'>"); sb.append("_icon o_icon-lg'>");
sb.append(handler.getMethodName(locale)); sb.append(handler.getMethodName(locale));
sb.append("</span>"); sb.append("</span>");
} }
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
<p>$r.translate("chelp.accesscontrol.methods")</p> <p>$r.translate("chelp.accesscontrol.methods")</p>
<div class="b_access_create"> <div class="b_access_create">
<ul> <ul>
<li><b class="b_with_small_icon_left b_access_method_free_icon">$r.translate("free.method")</b>: $r.translate("chelp.accesscontrol.method.free")</li> <li><b><i class="o_icon o_ac_free_icon o_icon-lg"></i>$r.translate("free.method")</b>: $r.translate("chelp.accesscontrol.method.free")</li>
<li><b class="b_with_small_icon_left b_access_method_token_icon">$r.translate("token.method")</b>: $r.translate("chelp.accesscontrol.method.token")</li> <li><b><i class="o_icon o_ac_token_icon o_icon-lg"></i>$r.translate("token.method")</b>: $r.translate("chelp.accesscontrol.method.token")</li>
<li><b class="b_with_small_icon_left b_access_method_paypal_icon">$r.translateWithPackage("org.olat.resource.accesscontrol.provider.paypal.ui", "paypal.method")</b>: $r.translateWithPackage("org.olat.resource.accesscontrol.provider.paypal.ui", "chelp.accesscontrol_group.method.paypal")</li> <li><b><i class="o_icon o_ac_paypal_icon o_icon-lg"></i>$r.translateWithPackage("org.olat.resource.accesscontrol.provider.paypal.ui", "paypal.method")</b>: $r.translateWithPackage("org.olat.resource.accesscontrol.provider.paypal.ui", "chelp.accesscontrol_group.method.paypal")</li>
</ul> </ul>
</div> </div>
<p>$r.translate("chelp.accesscontrol.dates")</p> <p>$r.translate("chelp.accesscontrol.dates")</p>
......
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