changeset 2932:19ea3e16f65b beta

add locking state icon into summary page
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 17 Oct 2012 21:27:46 +0200
parents 4c7cc3a4c330
children 07d620f6db2e
files rhodecode/public/css/style.css rhodecode/templates/summary/summary.html
diffstat 2 files changed, 31 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/public/css/style.css	Wed Oct 17 21:13:04 2012 +0200
+++ b/rhodecode/public/css/style.css	Wed Oct 17 21:27:46 2012 +0200
@@ -3115,6 +3115,26 @@
 	margin-top: 2px;
 }
 
+.locking_locked{
+    background: #FFF url("../images/icons/block_16.png") no-repeat scroll 3px;
+    height: 16px;
+    width: 20px;
+    cursor: pointer;
+    display: block;
+    float: right;
+    margin-top: 2px;    
+}
+
+.locking_unlocked{
+    background: #FFF url("../images/icons/accept.png") no-repeat scroll 3px;
+    height: 16px;
+    width: 20px;
+    cursor: pointer;
+    display: block;
+    float: right;
+    margin-top: 2px;	
+}
+
 .currently_following {
 	padding-left: 10px;
 	padding-bottom: 5px;
--- a/rhodecode/templates/summary/summary.html	Wed Oct 17 21:13:04 2012 +0200
+++ b/rhodecode/templates/summary/summary.html	Wed Oct 17 21:27:46 2012 +0200
@@ -54,15 +54,24 @@
                   </div>
                   %if c.rhodecode_user.username != 'default':
                       %if c.following:
-                      <span id="follow_toggle" class="following" title="${_('Stop following this repository')}"
+                      <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}"
                             onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
                       </span>
                       %else:
-                      <span id="follow_toggle" class="follow" title="${_('Start following this repository')}"
+                      <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}"
                             onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
                       </span>
                       %endif
                   %endif:
+                 
+                   ## locking icon
+                    %if c.rhodecode_db_repo.enable_locking:
+                      %if c.rhodecode_db_repo.locked[0]:
+                        <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span>                     
+                      %else:
+                        <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span>
+                      %endif
+                    %endif                   
                  ##REPO TYPE
 		         %if h.is_hg(c.dbrepo):
 		           <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>