THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

usermenu: Change org's project count expression

tags/v1.11.0
Suwon Chae 1 year ago
parent
commit
2fe1ecba6a
4 changed files with 10 additions and 7 deletions
  1. +1
    -5
      app/views/index/allOrganizationList_partial.scala.html
  2. +1
    -1
      app/views/index/myOrganizationList.scala.html
  3. +1
    -1
      app/views/index/myOwnProjectList_partial.scala.html
  4. +7
    -0
      public/javascripts/common/yona.Usermenu.js

+ 1
- 5
app/views/index/allOrganizationList_partial.scala.html View File

@@ -7,10 +7,6 @@
@(organization: Organization, favored:Boolean, isLast:Boolean = false)
@import utils.TemplateHelper._

@isAllowShowCount() = @{
UserApp.currentUser().isSiteManager || UserApp.currentUser().isAdminOf(organization)
}

@defining(UserApp.currentUser().getFavoriteProjects){ favoriteProjects =>
<li class="@if(isLast){favored} org-li">
<div class="org-list project-flex-container all-orgs">
@@ -20,7 +16,7 @@
</div>
<div class="projectName-owner all-org-names flex-item">
<div class="project-name org-name flex-item"><a href="@routes.OrganizationApp.organization(organization.name)" target="_blank">@organization.name</a></div>
<div class="project-owner flex-item">@if(isAllowShowCount){@organization.projects.size()}</div>
<div class="project-owner flex-item sub-project-counter"></div>
</div>
</div>
<div class="star-org flex-item" data-organization-id="@organization.id">


+ 1
- 1
app/views/index/myOrganizationList.scala.html View File

@@ -21,7 +21,7 @@
</div>
<div class="projectName-owner all-org-names flex-item">
<div class="project-name org-name flex-item">@UserApp.currentUser().loginId</div>
<div class="project-owner flex-item">@ownProjects.size()</div>
<div class="project-owner flex-item sub-project-counter"></div>
</div>
</div>
<div class="star-org flex-item"></div>


+ 1
- 1
app/views/index/myOwnProjectList_partial.scala.html View File

@@ -16,7 +16,7 @@
</div>
<div class="projectName-owner all-org-names flex-item">
<div class="project-name org-name flex-item">@UserApp.currentUser().loginId</div>
<div class="project-owner flex-item">@ownProjects.size()</div>
<div class="project-owner flex-item sub-project-counter"></div>
</div>
</div>
<div class="star-org flex-item">


+ 7
- 0
public/javascripts/common/yona.Usermenu.js View File

@@ -213,5 +213,12 @@ $(function() {
$(".all-orgs").on("click", function () {
var $li = $(this).closest("li").find(".hide").toggle("fast");
});

$(".sub-project-counter").each(function (item) {
var $this = $(this);
var counter = $this.closest(".org-li").find(".project-ul > .user-li").length || "";

$this.text(counter);
});
}
});

Loading…
Cancel
Save