From 25140af4f07df524e6d9f6c50f0cfc21d6beaec3 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 4 Jan 2012 08:50:59 +0000 Subject: [PATCH] add buttons to switch from users assigned role view to update view git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227083 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/redback/roles.js | 9 +++++++ .../js/redback/templates/roles-tmpl.html | 27 ++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js index ec1b22e72..f5bd67b28 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/roles.js @@ -67,6 +67,15 @@ $(function() { } ); } + + this.updateMode=function(){ + $("#main-content #role-list-users").hide(); + $("#main-content #role-edit-users").show(); + } + this.viewMode=function(){ + $("#main-content #role-edit-users").hide(); + $("#main-content #role-list-users").show(); + } } /** diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html index 79e3841de..9b630d5ed 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/roles-tmpl.html @@ -119,18 +119,23 @@ +
+ {{if $data.users}} + + {{else}} + ${$.i18n.prop('role.edit.no.user.defined')} + {{/if}} - {{if $data.users}} - - {{else}} - ${$.i18n.prop('role.edit.no.user.defined')} - {{/if}} + + +
+ + -- 2.39.5