Skip to content
Snippets Groups Projects
Commit 4ea055d2 authored by aboeckle's avatar aboeckle
Browse files

OO-5614: Remove list of shared items

parent ff852962
No related branches found
No related tags found
No related merge requests found
......@@ -189,10 +189,14 @@ public class PageMetadataController extends BasicController {
private void initMetadata(UserRequest ureq) {
Set<Identity> owners = new HashSet<>();
boolean isOwnedByViewer;
if(page.getSection() != null && page.getSection().getBinder() != null) {
owners.addAll(portfolioService.getMembers(page.getSection().getBinder(), PortfolioRoles.owner.name()));
}
owners.addAll(portfolioService.getMembers(page, PortfolioRoles.owner.name()));
isOwnedByViewer = owners.contains(ureq.getUserSession().getIdentity());
StringBuilder ownerSb = new StringBuilder();
for(Identity owner:owners) {
......@@ -206,7 +210,8 @@ public class PageMetadataController extends BasicController {
mainVC.contextPut("statusIconCss", page.getPageStatus() == null ? PageStatus.draft.iconClass() : page.getPageStatus().iconClass());
mainVC.contextPut("statusCssClass", page.getPageStatus() == null ? PageStatus.draft.statusClass() : page.getPageStatus().statusClass());
int sharedWith = portfolioService.countSharedPageBody(page) - 1;
int sharedWith = isOwnedByViewer ? portfolioService.countSharedPageBody(page) - 1 : -1;
if(sharedWith > 0) {
String sharedWithString = String.valueOf(sharedWith) + " " + translate("page.body.shared.with." + (sharedWith == 1 ? "entry" : "entries"));
sharedWithLink = LinkFactory.createLink("sharedWithLink", "sharedWithLink", "showSharedPages", sharedWithString, getTranslator(), mainVC, this, Link.NONTRANSLATED);
......
......@@ -35,7 +35,7 @@
#else
<i class="o_icon o_icon_fw o_icon_tags" title="$r.translateInAttribute("categories")"> </i>
#foreach($category in $pageCategories)
<span class="tag label label-info">
<span class="o_tag">
$category
</span>
#end
......@@ -50,7 +50,7 @@
#else
<i class="o_icon o_icon_fw o_icon_competences" title="$r.translateInAttribute("competences")"> </i>
#foreach($competence in $pageCompetences)
<span class="tag label label-info">
<span class="o_tag o_competence">
$competence
</span>
#end
......
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