changeset 1770:184557472f5c beta

Implements #304 hashes in relevant places are displayed using monospaced font.
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 08 Dec 2011 04:32:42 +0200
parents 025f3333c769
children 5948ab03e639
files rhodecode/templates/admin/repos/repos.html rhodecode/templates/bookmarks/bookmarks_data.html rhodecode/templates/branches/branches_data.html rhodecode/templates/files/files_browser.html rhodecode/templates/files/files_source.html rhodecode/templates/index_base.html rhodecode/templates/journal/journal.html rhodecode/templates/shortlog/shortlog_data.html rhodecode/templates/switch_to_list.html rhodecode/templates/tags/tags_data.html
diffstat 10 files changed, 65 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/templates/admin/repos/repos.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/admin/repos/repos.html	Thu Dec 08 04:32:42 2011 +0200
@@ -19,7 +19,7 @@
         ${self.breadcrumbs()}
         <ul class="links">
           <li>
-            <span>${h.link_to(_(u'ADD NEW REPOSITORY'),h.url('new_repo'))}</span>
+            <span>${h.link_to(_(u'ADD REPOSITORY'),h.url('new_repo'))}</span>
           </li>          
         </ul>        
     </div>
@@ -65,10 +65,7 @@
 	            <td>${h.age(repo['last_change'])}</td>
 	            <td>
 	            	%if repo['rev']>=0:
-	            	${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
-	                h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
-	                class_="tooltip",
-	                title=h.tooltip(repo['last_msg']))}
+	            	<div><pre>${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),class_="tooltip",title=h.tooltip(repo['last_msg']))}</pre></div>
 	            	%else:
 	            		${_('No changesets yet')}
 	            	%endif    
--- a/rhodecode/templates/bookmarks/bookmarks_data.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/bookmarks/bookmarks_data.html	Thu Dec 08 04:32:42 2011 +0200
@@ -1,31 +1,27 @@
 %if c.repo_bookmarks:    
-    <table>
+    <table class="table_disp">
     	<tr>
-	        <th class="left">${_('date')}</th>
-	        <th class="left">${_('name')}</th>
-	        <th class="left">${_('author')}</th>
-	        <th class="left">${_('revision')}</th>
-			<th class="left">${_('links')}</th>
+            <th class="left">${_('name')}</th>
+            <th class="left">${_('date')}</th>
+            <th class="left">${_('author')}</th>
+            <th class="left">${_('revision')}</th>
     	</tr>
 		%for cnt,book in enumerate(c.repo_bookmarks.items()):
 		<tr class="parity${cnt%2}">		
-	        <td><span class="tooltip" title="${h.age(book[1].date)}">
-                      ${book[1].date}</span>
-            </td>
             <td>
                 <span class="logbooks">
                     <span class="bookbook">${h.link_to(book[0],
-                    h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span>
+                    h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span>
                 </span>
-            </td>	        
+            </td>
+            <td><span class="tooltip" title="${h.age(book[1].date)}">${book[1].date}</span></td>            
 	        <td title="${book[1].author}">${h.person(book[1].author)}</td>
-	        <td>r${book[1].revision}:${h.short_id(book[1].raw_id)}</td>
-			<td class="nowrap">
-			${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id),class_="ui-btn xsmall")}
-			<span style="color:#515151">|</span>
-			${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id),class_="ui-btn xsmall")}
-			</td>
-		</tr>	
+	        <td>
+              <div>
+                  <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id)}">r${book[1].revision}:${h.short_id(book[1].raw_id)}</a></pre>
+              </div>
+            </td>      
+		</tr>
 		%endfor
     </table>
 %else:
--- a/rhodecode/templates/branches/branches_data.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/branches/branches_data.html	Thu Dec 08 04:32:42 2011 +0200
@@ -1,52 +1,47 @@
-% if c.repo_branches:
+%if c.repo_branches:
     <table class="table_disp">
         <tr>
+            <th class="left">${_('name')}</th>
             <th class="left">${_('date')}</th>
-            <th class="left">${_('name')}</th>
             <th class="left">${_('author')}</th>
             <th class="left">${_('revision')}</th>
-            <th class="left">${_('links')}</th>
         </tr>
 		%for cnt,branch in enumerate(c.repo_branches.items()):
 		<tr class="parity${cnt%2}">
-            <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span>
-            </td>
             <td>
                 <span class="logtags">
                     <span class="branchtag">${h.link_to(branch[0],
-                    h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
+                    h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
                 </span>         
-            </td>		
+            </td>
+            <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span></td>		
             <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
-            <td>r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</td>
-            <td class="nowrap">
-            ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id),class_="ui-btn xsmall")}
-            <span style="color:#515151">|</span>
-            ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id),class_="ui-btn xsmall")}
+            <td>
+                <div>
+                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
+                </div>            
             </td>
-		</tr>	
+		</tr>
 		%endfor
         % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches:
           %for cnt,branch in enumerate(c.repo_closed_branches.items()):
           <tr class="parity${cnt%2}">
-              <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span>
-              </td>
               <td>
                   <span class="logtags">
                       <span class="branchtag">${h.link_to(branch[0]+' [closed]',
                       h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
                   </span>         
-              </td>       
+              </td>
+              <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span></td>              
               <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
-              <td>r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</td>
-              <td class="nowrap">
-              ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id),class_="ui-btn xsmall")}
-              <span style="color:#515151">|</span>
-              ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id),class_="ui-btn xsmall")}
+              <td>
+                <div>
+                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
+                </div>
               </td>
-          </tr>   
+          </tr>
           %endfor
-        %endif  
+        %endif
     </table>
 %else:
     ${_('There are no branches yet')}
--- a/rhodecode/templates/files/files_browser.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/files/files_browser.html	Thu Dec 08 04:32:42 2011 +0200
@@ -84,8 +84,9 @@
 		             </td>
 		             <td>
 		             	%if node.is_file():
-		             		<span class="tooltip" title="${node.last_changeset.message}">
-		             		${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</span>
+		             		<div class="tooltip" title="${node.last_changeset.message}">
+		             		<pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre>
+                            </div>
 		             	%endif
 		             </td>
 		             <td>
--- a/rhodecode/templates/files/files_source.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/files/files_source.html	Thu Dec 08 04:32:42 2011 +0200
@@ -17,7 +17,7 @@
 	<div class="code-header">
         <div class="stats">
             <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div>
-            <div class="left item">${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</div>      
+            <div class="left item"><pre>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</pre></div>      
             <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div>
             <div class="left item last">${c.file.mimetype}</div>
             <div class="buttons">
--- a/rhodecode/templates/index_base.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/index_base.html	Thu Dec 08 04:32:42 2011 +0200
@@ -9,7 +9,7 @@
                 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
                 <ul class="links">
                   <li>
-                    <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
+                    <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
                   </li>          
                 </ul>           
                 %endif
@@ -139,11 +139,13 @@
                       ${h.age(repo['last_change'])}</span>
                     </td>
                     <td>
+                        <div>
                         %if repo['rev']>=0:
-                        <a title="${h.tooltip('%s\n%s' % (repo['author'],repo['last_msg']))}" class="tooltip" href="${h.url('changeset_home',repo_name=repo['name'],revision=repo['tip'])}">${'r%s:%s' % (repo['rev'],h.short_id(repo['tip']))}</a>
+                        <pre><a title="${h.tooltip('%s\n%s' % (repo['author'],repo['last_msg']))}" class="tooltip" href="${h.url('changeset_home',repo_name=repo['name'],revision=repo['tip'])}">${'r%s:%s' % (repo['rev'],h.short_id(repo['tip']))}</a></pre>
                         %else:
                             ${_('No changesets yet')}
-                        %endif    
+                        %endif
+                        </div>    
                     </td>
                     <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
                     <td>
--- a/rhodecode/templates/journal/journal.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/journal/journal.html	Thu Dec 08 04:32:42 2011 +0200
@@ -29,12 +29,12 @@
         <div class="title">
             <h5> 
             <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>        
-            <a id="show_my" class="link-white" href="#my">${_('My repositories')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a>
+            <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a>
             </h5>
              %if h.HasPermissionAny('hg.admin','hg.create.repository')():
              <ul class="links">
                <li>
-                 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
+                 <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span>
                </li>          
              </ul>           
              %endif        
@@ -74,7 +74,7 @@
                             src="${h.url('/images/icons/arrow_divide.png')}"/></a>
                         %endif                  
                         </td> 
-                        <td><span class="tooltip" title="${repo['last_change']}">${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</span></td>
+                        <td><div class="tooltip" title="${repo['last_change']}"><pre>${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</pre></div></td>
                         <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td>
                         <td>
                           ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')}
--- a/rhodecode/templates/shortlog/shortlog_data.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/shortlog/shortlog_data.html	Thu Dec 08 04:32:42 2011 +0200
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 %if c.repo_changesets:
-<table>
+<table class="table_disp">
 	<tr>
 		<th class="left">${_('commit message')}</th>
 		<th class="left">${_('age')}</th>
@@ -20,7 +20,7 @@
                       ${h.age(cs.date)}</span>
         </td>        	
 		<td title="${cs.author}">${h.person(cs.author)}</td>
-		<td><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">r${cs.revision}:${h.short_id(cs.raw_id)}</a></td>
+		<td><div><pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">r${cs.revision}:${h.short_id(cs.raw_id)}</a></pre></div></td>
 		<td>
 			<span class="logtags">
 				<span class="branchtag">${cs.branch}</span>
--- a/rhodecode/templates/switch_to_list.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/switch_to_list.html	Thu Dec 08 04:32:42 2011 +0200
@@ -4,7 +4,7 @@
     <ul>
     %if c.rhodecode_repo.branches.values():
         %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
-            <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
+            <li><div><pre>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</pre></div></li>
         %endfor
     %else:
         <li>${h.link_to(_('There are no branches yet'),'#')}</li>
@@ -16,7 +16,7 @@
     <ul>
     %if c.rhodecode_repo.tags.values():
         %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
-         <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
+         <li><div><pre>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</pre></div></li>
         %endfor
     %else:
         <li>${h.link_to(_('There are no tags yet'),'#')}</li>
@@ -29,7 +29,7 @@
     <ul>
     %if c.rhodecode_repo.bookmarks.values():
         %for cnt,book in enumerate(c.rhodecode_repo.bookmarks.items()):
-         <li>${h.link_to('%s - %s' % (book[0],h.short_id(book[1])),h.url('files_home',repo_name=c.repo_name,revision=book[1]))}</li>
+         <li><div><pre>${h.link_to('%s - %s' % (book[0],h.short_id(book[1])),h.url('files_home',repo_name=c.repo_name,revision=book[1]))}</pre></div></li>
         %endfor
     %else:
         <li>${h.link_to(_('There are no bookmarks yet'),'#')}</li>
--- a/rhodecode/templates/tags/tags_data.html	Thu Dec 08 03:36:13 2011 +0200
+++ b/rhodecode/templates/tags/tags_data.html	Thu Dec 08 04:32:42 2011 +0200
@@ -1,30 +1,27 @@
 %if c.repo_tags:    
-    <table>
+    <table class="table_disp">
     	<tr>
-	        <th class="left">${_('date')}</th>
-	        <th class="left">${_('name')}</th>
-	        <th class="left">${_('author')}</th>
-	        <th class="left">${_('revision')}</th>
-			<th class="left">${_('links')}</th>
+            <th class="left">${_('name')}</th>
+            <th class="left">${_('date')}</th>
+            <th class="left">${_('author')}</th>
+            <th class="left">${_('revision')}</th>
     	</tr>
 		%for cnt,tag in enumerate(c.repo_tags.items()):
 		<tr class="parity${cnt%2}">		
-	        <td><span class="tooltip" title="${h.age(tag[1].date)}">
-                      ${tag[1].date}</span>
-            </td>
             <td>
                 <span class="logtags">
                     <span class="tagtag">${h.link_to(tag[0],
-                    h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}</span>
+                    h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
+                    </span>
                 </span>
-            </td>	        
+            </td>
+            <td><span class="tooltip" title="${h.age(tag[1].date)}">${tag[1].date}</span></td>            
 	        <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
-	        <td>r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</td>
-			<td class="nowrap">
-			${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id),class_="ui-btn xsmall")}
-			<span style="color:#515151">|</span>
-			${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id),class_="ui-btn xsmall")}
-			</td>
+	        <td>
+                <div>
+                    <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id)}">r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</a></pre>
+                </div>
+            </td>
 		</tr>	
 		%endfor
     </table>