~jan0sch/smederee

Showing details for patch 95e047719d2bad7f1ca9fd5305c813735de5723b.
2024-06-21 (Fri), 4:02 PM - Jens Grassel - 95e047719d2bad7f1ca9fd5305c813735de5723b

hub: Allow organisation administrators to edit the organisation

- basic functionality all there
- add links to edit and manage admins for orgs to overview page

Fixes: https://smeder.ee/~jan0sch/smederee/tickets/11
Summary of changes
2 files modified with 11 lines added and 9 lines removed
  • modules/hub/src/main/resources/messages.properties with 2 added and 1 removed lines
  • modules/hub/src/main/twirl/de/smederee/hub/views/showRepositories.scala.html with 9 added and 8 removed lines
diff -rN -u old-smederee/modules/hub/src/main/resources/messages.properties new-smederee/modules/hub/src/main/resources/messages.properties
--- old-smederee/modules/hub/src/main/resources/messages.properties	2025-01-11 11:53:30.363540622 +0000
+++ new-smederee/modules/hub/src/main/resources/messages.properties	2025-01-11 11:53:30.363540622 +0000
@@ -364,7 +364,8 @@
 
 milestone.due-date=Due date
 
-organisation.menu.edit=Edit organisation settings
+organisation.menu.edit.admins=Manage organisation administrators
+organisation.menu.edit.settings=Edit organisation settings
 
 project.label.edit.link=Edit
 project.label.edit.title=Edit label ''{0}''.
diff -rN -u old-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/showRepositories.scala.html new-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/showRepositories.scala.html
--- old-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/showRepositories.scala.html	2025-01-11 11:53:30.363540622 +0000
+++ new-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/showRepositories.scala.html	2025-01-11 11:53:30.367540633 +0000
@@ -26,14 +26,6 @@
         </div>
       </div>
       <div class="pure-u-1-5 pure-u-md-1-5">
-        @if(user.exists(user => organisationAdmins.exists(_.uid === user.uid))) {
-          @defining(organisationActionBaseUri.map(_.addSegment("edit"))) { orgEditUri =>
-          <div class="l-box">
-            <a href="@orgEditUri">@Messages("organisation.menu.edit")</a>
-          </div>
-          }
-        } else {
-        }
       </div>
     </div>
     <div class="pure-g">
@@ -68,6 +60,15 @@
         </div>
       </div>
       <div class="pure-u-1-5 pure-u-md-1-5">
+        @if(user.exists(user => organisationAdmins.exists(_.uid === user.uid))) {
+          @for(orgActionBaseUri <- organisationActionBaseUri) {
+          <div class="l-box">
+            <a href="@{orgActionBaseUri.addSegment("edit")}">@Messages("organisation.menu.edit.settings")</a><br/>
+            <a href="@{orgActionBaseUri.addSegment("admins")}">@Messages("organisation.menu.edit.admins")</a>
+          </div>
+          }
+        } else {
+        }
       </div>
     </div>
   </div>