Marcin Kuzminski avatar Marcin Kuzminski committed 19ea3e1

add locking state icon into summary page

Comments (0)

Files changed (2)

rhodecode/public/css/style.css

 	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;

rhodecode/templates/summary/summary.html

                   </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')}"/>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.