Skip to content
Snippets Groups Projects
Commit 30c56646 authored by srosse's avatar srosse
Browse files

OO-990: bootstrapify groups

parent 54eb827c
No related branches found
No related tags found
No related merge requests found
Showing
with 89 additions and 124 deletions
<h4 class="b_with_small_icon_left b_group_icon">
$r.translate("menu.group.admin")
</h4>
<h2><i class="o_icon o_icon_group"> </i> $r.translate("menu.group.admin")</h4>
$r.render("searchPanel")
<p />
$r.render("groupList")
#if($r.available("create.group"))
<div class="b_clearfix">
<p>$r.translate("create.group.description")</p>
<div class="clearfix">
<div class="o_info">$r.translate("create.group.description")</div>
$r.render("create.group")
</div>
#end
<div class="b_clearfix">
$r.render("groupList")
</div>
$r.render("groupList")
#if($r.available("create.group"))
<div class="b_clearfix">
<p>$r.translate("create.group.description")</p>
<div class="clearfix">
<div class="o_info">$r.translate("create.group.description")</div>
$r.render("create.group")
</div>
#end
\ No newline at end of file
<h4 class="b_with_small_icon_left b_group_icon">
$r.translate("menu.groups")
</h4>
<div class="b_clearfix">
$r.render("segments")<br/>
<h2><i class="o_icon o_icon_group"> </i>$r.translate("menu.groups")</h2>
$r.render("segments")
<div class="o_segments_content">
$r.render("groupList")
</div>
\ No newline at end of file
</div>
<div class="b_clearfix">
$r.render("search")
$r.render("groupList")
</div>
$r.render("search")
$r.render("groupList")
#if($r.available("create.group"))
<div class="b_clearfix">
<p>$r.translate("create.group.description")</p>
<div class="clearfix">
<div class="o_info">$r.translate("create.group.description")</div>
$r.render("create.group")
</div>
#end
\ No newline at end of file
<div class="b_clearfix">
<div class="row">
<div class="col-md-6">
<div class="b_subcl">
$r.render("left_1")
$r.render("button_layout")
</div>
$r.render("left_1")
$r.render("button_layout")
</div>
<div class="col-md-6">
<div class="b_subcr">
$r.render("right_1")
</div>
$r.render("right_1")
</div>
</div>
\ No newline at end of file
<div class="b_clearfix">
<div class="b_c33l" style="width:110px;">
<div class="pull-right">
$r.render("home")
$r.render("contact")
#if($r.available("assessment"))
$r.render("assessment")
#end
</div>
<h3>$fullname</h3>
<div class="row">
<div class="col-sm-2">
$r.render("image")
</div>
<div class="b_c50l" style="width:45%">
<div class="b_subcl">
<h4>$fullname</h4>
$r.render("userProperties")
</div>
<div class="col-sm-5">
$r.render("userProperties")
</div>
<div class="b_c50r" style="width:45%">
<div class="b_subcr">
$r.render("courseInfos")
</div>
<div class="col-sm-5">
$r.render("courseInfos")
</div>
</div>
$r.render("home")
$r.render("contact")
#if($r.available("assessment"))
$r.render("assessment")
#end
\ No newline at end of file
</div>
\ No newline at end of file
<div class="b_clearfix">
<div class="clearfix">
#if($r.available("search"))
$r.render("search")
#end
......
<h4 class="b_with_small_icon_left b_group_icon">
$r.translate("open.header")
</h4>
$r.translate("open.intro")
<p />
<div class="b_clearfix">
$r.render("segments") <br/>
<h2><i class="o_icon o_icon_group"> </i> $r.translate("open.header")</h2>
<div class="o_info">$r.translate("open.intro")</div>
$r.render("segments")
<div class="o_segments_content clearfix">
$r.render("groupList")
</div>
\ No newline at end of file
</div>
<div class="b_clearfix">
<div class="clearfix">
$r.render("groupList")
</div>
\ No newline at end of file
......@@ -94,6 +94,7 @@ import org.olat.modules.openmeetings.OpenMeetingsModule;
import org.olat.modules.wiki.WikiManager;
import org.olat.portfolio.PortfolioModule;
import org.olat.repository.RepositoryEntry;
import org.olat.repository.RepositoryService;
import org.olat.repository.ui.RepositoryTableModel;
import org.olat.resource.OLATResource;
import org.olat.resource.accesscontrol.ACService;
......@@ -102,6 +103,7 @@ import org.olat.resource.accesscontrol.AccessControlModule;
import org.olat.resource.accesscontrol.AccessResult;
import org.olat.resource.accesscontrol.ui.AccessEvent;
import org.olat.util.logging.activity.LoggingResourceable;
import org.springframework.beans.factory.annotation.Autowired;
/**
......@@ -195,9 +197,12 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
private boolean isAdmin;
private final ACService acService;
private final BaseSecurity securityManager;
private final BusinessGroupService businessGroupService;
@Autowired
private ACService acService;
@Autowired
private BaseSecurity securityManager;
@Autowired
private BusinessGroupService businessGroupService;
private EventBus singleUserEventBus;
private String adminNodeId; // reference to admin menu item
......@@ -232,10 +237,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
* on the group for a very short time. If this is not possible, then the
* lastUsage is already up to date within one-day-precision.
*/
securityManager = CoreSpringFactory.getImpl(BaseSecurity.class);
businessGroupService = CoreSpringFactory.getImpl(BusinessGroupService.class);
businessGroup = businessGroupService.setLastUsageFor(getIdentity(), bGroup);
acService = CoreSpringFactory.getImpl(ACService.class);
if(businessGroup == null) {
VelocityContainer vc = createVelocityContainer("deleted");
vc.contextPut("name", bGroup.getName());
......@@ -265,7 +267,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
// package translator with default group fallback translators and type
// translator
setTranslator(Util.createPackageTranslator(BGControllerFactory.class, getLocale(), getTranslator()));
resourceTrans = Util.createPackageTranslator(RepositoryTableModel.class, getLocale(), getTranslator());
resourceTrans = Util.createPackageTranslator(RepositoryService.class, getLocale(), getTranslator());
// main component layed out in panel
main = createVelocityContainer("bgrun");
......@@ -991,7 +993,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
gtnChild.setTitle(translate("menutree.news"));
gtnChild.setUserObject(ACTIVITY_MENUSELECT_INFORMATION);
gtnChild.setAltText(translate("menutree.news.alt"));
gtnChild.setIconCssClass("o_news_icon");
gtnChild.setIconCssClass("o_icon_news");
root.addChild(gtnChild);
//fxdiff BAKS-7 Resume function
nodeInformation = gtnChild;
......@@ -1013,7 +1015,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
gtnChild.setTitle(translate("menutree.resources"));
gtnChild.setUserObject(ACTIVITY_MENUSELECT_SHOW_RESOURCES);
gtnChild.setAltText(translate("menutree.resources.alt"));
gtnChild.setIconCssClass("o_course_icon");
gtnChild.setIconCssClass("o_CourseModule_icon");
root.addChild(gtnChild);
//fxdiff BAKS-7 Resume function
nodeResources = gtnChild;
......@@ -1026,7 +1028,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
gtnChild.setTitle(translate("menutree.members"));
gtnChild.setUserObject(ACTIVITY_MENUSELECT_MEMBERSLIST);
gtnChild.setAltText(translate("menutree.members.alt"));
gtnChild.setIconCssClass("b_group_icon");
gtnChild.setIconCssClass("o_icon_group");
root.addChild(gtnChild);
//fxdiff BAKS-7 Resume function
nodeGroupOwners = gtnChild;
......@@ -1069,7 +1071,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
gtnChild.setTitle(translate("menutree.chat"));
gtnChild.setUserObject(ACTIVITY_MENUSELECT_CHAT);
gtnChild.setAltText(translate("menutree.chat.alt"));
gtnChild.setIconCssClass("o_chat_icon");
gtnChild.setIconCssClass("o_icon_chat");
root.addChild(gtnChild);
}
......@@ -1112,13 +1114,11 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
gtnChild.setUserObject(ACTIVITY_MENUSELECT_ADMINISTRATION);
gtnChild.setIdent(ACTIVITY_MENUSELECT_ADMINISTRATION);
gtnChild.setAltText(translate("menutree.administration.alt"));
gtnChild.setIconCssClass("o_admin_icon");
gtnChild.setIconCssClass("o_icon_settings");
root.addChild(gtnChild);
adminNodeId = gtnChild.getIdent();
//fxdiff BAKS-7 Resume function
nodeAdmin = gtnChild;
//fxdiff VCRP-1,2: access control of resources
AccessControlModule acModule = (AccessControlModule)CoreSpringFactory.getBean("acModule");
if(acModule.isEnabled() && acService.isResourceAccessControled(businessGroup.getResource(), null)) {
gtnChild = new GenericTreeNode();
......@@ -1126,7 +1126,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
gtnChild.setUserObject(ACTIVITY_MENUSELECT_AC);
gtnChild.setIdent(ACTIVITY_MENUSELECT_AC);
gtnChild.setAltText(translate("menutree.ac.alt"));
gtnChild.setIconCssClass("b_order_icon");
gtnChild.setIconCssClass("o_icon_booking");
root.addChild(gtnChild);
}
}
......
<h4 class="b_with_small_icon_left b_group_icon">$r.translate("grouprun.details.title")</h4>
<h2><i class="o_icon o_icon_group"> </i> $r.translate("grouprun.details.title")</h2>
<h5>$r.translate("grouprun.details.name")</h5>
<p>$r.escapeHtml($BuddyGroup.getName())</p>
#if ($BuddyGroup.getDescription())
......
<div class="b_important">$r.translate("sendtochooser.email.disclaimer")
</div>
<div class="o_warning">$r.translate("sendtochooser.email.disclaimer")</div>
$r.render("vc_sendToChooserForm")
<h4 class="b_with_small_icon_left b_group_icon">
$r.translate("userlist.title")
</h4>
<h2><i class="o_icon o_icon_group"> </i> $r.translate("userlist.title") </h2>
#if ($showOwnerGroups)
<h5>$r.translate("userlist.owners.title")</h5>
<h3>$r.translate("userlist.owners.title")</h3>
<div class="o_sel_group_coaches">
$r.render("owners")
</div>
#else
<br/>
<div class="o_sel_group_coaches_not_visible">
<h5>$r.translate("userlist.show.no.owners.title")</h5>
$r.translate("userlist.show.no.owners.text")
</div><br/><br/>
<h3>$r.translate("userlist.show.no.owners.title")</h3>
<div class="o_info">$r.translate("userlist.show.no.owners.text")</div>
</div>
#end
#if ($showPartipsGroups)
<h5>$r.translate("userlist.participants.title")</h5>
<h3>$r.translate("userlist.participants.title")</h3>
<div class="o_sel_group_participants">
$r.render("participants")
</div>
#else
<br/>
<div class="o_sel_group_participants_not_visible">
<h5>$r.translate("userlist.show.no.participants.title")</h5>
$r.translate("userlist.show.no.participants.text")
</div><br/><br/>
<h3>$r.translate("userlist.show.no.participants.title")</h3>
<div class="o_info">$r.translate("userlist.show.no.participants.text")</div>
</div>
#end
#if ($hasWaitingList)
#if ($showWaitingList)
<h5>$r.translate("userlist.waitinglist.title")</h5>
<h3>$r.translate("userlist.waitinglist.title")</h3>
<div class="o_sel_group_waiting_list">
$r.render("waitingList")
</div>
#else
<br/>
<div class="o_sel_group_waiting_list_not_visible">
<h5>$r.translate("userlist.show.no.waitinglist.title")</h5>
$r.translate("userlist.show.no.waitinglist.text")
<h3>$r.translate("userlist.show.no.waitinglist.title")</h3>
<div class="o_info">$r.translate("userlist.show.no.waitinglist.text")</div>
</div>
#end
#end
<h4 class="b_with_small_icon_left o_course_icon">
$r.translate("resources.title")
</h4>
<p>
$r.translate("resources.intro")
</p>
<p>
$r.render("resources")
</p>
\ No newline at end of file
<h2><i class="o_icon o_CourseModule_icon"> </i> $r.translate("resources.title")</h2>
<div class="o_info">$r.translate("resources.intro")</div>
$r.render("resources")
<h4 class="b_with_small_icon_left o_chat_icon">
$r.translate("im.conference.maxi.title")
</h4>
<p>$r.translate("im.conference.maxi.intro")</p>
<h2><i class="o_icon o_icon_chat"> </i> $r.translate("im.conference.maxi.title")</h2>
<div class="o_info">$r.translate("im.conference.maxi.intro")</div>
#if ($isInAssessment)
<p>$r.translate("im.conference.assessment.open")</p>
<div class="o_warning">$r.translate("im.conference.assessment.open")</div>
#end
<p>$r.render("openChat") #if($r.available("logChat")) $r.render("logChat") #end</p>
\ No newline at end of file
<div class="b_clearfix">
$r.render("segments") <br/>
#if($r.available("segmentCmp"))
$r.render("segmentCmp")
#end
</div>
\ No newline at end of file
$r.render("segments")
#if($r.available("segmentCmp"))
$r.render("segmentCmp")
#end
\ No newline at end of file
<div class="o_eff_statement_details">
<h3 class="b_with_small_icon_left b_group_icon">$groupName</h3>
<h3><i class="o_icon o_icon_group"> </i> $groupName</h3>
#if($r.available("open.group"))
$r.render("open.group")
#end
......
<div class="o_sel_search_referenceable_entries">
<h4 #if($titleCss) class="$titleCss" #end>$r.translate("referencableSearch.title")</h4>
<div class="o_buttons_box_right">
<h4>#if($titleCss)<i class="$titleCss"> </i> #end$r.translate("referencableSearch.title")</h4>
<div class="pull-right">
#if($r.available("cmd.create.ressource"))
$r.render("cmd.create.ressource")
#end
......@@ -8,6 +8,8 @@
$r.render("cmd.import.ressource")
#end
</div>
$r.render("segments")<br/>
$r.render("searchCtr")
$r.render("segments")
<div class="o_segments_content">
$r.render("searchCtr")
</div>
</div>
\ No newline at end of file
......@@ -140,7 +140,7 @@ public class ReferencableEntriesSearchController extends BasicController {
mainVC = createVelocityContainer("referencableSearch");
if(limitTypes != null && limitTypes.length == 1 && limitTypes[0] != null) {
mainVC.contextPut("titleCss", "b_with_small_icon_left o_" + limitTypes[0] + "_icon");
mainVC.contextPut("titleCss", "o_icon o_" + limitTypes[0] + "_icon");
}
// add repo search controller
......
......@@ -313,10 +313,10 @@ public class RepositoryEntryRelationDAO {
public List<RepositoryEntryToGroupRelation> getRelations(List<Group> groups) {
StringBuilder sb = new StringBuilder();
sb.append("select count(rel) from repoentrytogroup as rel")
sb.append("select rel from repoentrytogroup as rel")
.append(" inner join fetch rel.entry as entry")
.append(" inner join fetch rel.group as baseGroup")
.append(" where entry.group.key=:groupKey");
.append(" where baseGroup in (:groups)");
return dbInstance.getCurrentEntityManager()
.createQuery(sb.toString(), RepositoryEntryToGroupRelation.class)
......
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