changeset 1878:287eff9614fa beta

changelog: make messages be links again, and somewhat co-exist with issue tracker links (those are bold now)
author Aras Pranckevicius <aras@unity3d.com>
date Mon, 09 Jan 2012 22:40:10 +0200
parents 395a3196de73
children 395dfc93fe73
files rhodecode/lib/helpers.py rhodecode/public/css/style.css rhodecode/templates/changelog/changelog.html
diffstat 3 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py	Mon Jan 09 09:37:15 2012 +0200
+++ b/rhodecode/lib/helpers.py	Mon Jan 09 22:40:10 2012 +0200
@@ -744,10 +744,13 @@
     return literal(url_pat.sub(url_func, text_))
 
 
-def urlify_commit(text_, repository=None):
+def urlify_commit(text_, repository=None, link_=None):
     import re
     import traceback
 
+    if link_:
+        link_ = '<a href="' + link_ + '">'
+
     try:
         conf = config['app_conf']
 
@@ -768,6 +771,9 @@
                 if repository:
                     url = url.replace('{repo}', repository)
 
+                if link_:
+                    tmpl = '</a>' + tmpl + link_
+
                 return tmpl % (
                     {
                      'cls': 'issue-tracker-link',
@@ -777,11 +783,16 @@
                      'serv': ISSUE_SERVER_LNK,
                     }
                 )
-            return literal(URL_PAT.sub(url_func, text_))
+            newtext = URL_PAT.sub(url_func, text_)
+            if link_:
+                newtext = link_ + newtext + '</a>'
+            return literal(newtext)
     except:
         log.error(traceback.format_exc())
         pass
 
+    
+
     return text_
 
 
--- a/rhodecode/public/css/style.css	Mon Jan 09 09:37:15 2012 +0200
+++ b/rhodecode/public/css/style.css	Mon Jan 09 22:40:10 2012 +0200
@@ -2322,6 +2322,11 @@
 	text-decoration: none;
 }
 
+#content #graph_content .message .issue-tracker-link {
+	font-weight: bold !important;
+}
+
+
 .right div {
 	clear: both;
 }
--- a/rhodecode/templates/changelog/changelog.html	Mon Jan 09 09:37:15 2012 +0200
+++ b/rhodecode/templates/changelog/changelog.html	Mon Jan 09 22:40:10 2012 +0200
@@ -59,7 +59,7 @@
                             <div class="date">${cs.date}</div>
 						</div>
 						<div class="mid">
-                            <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div>
+                            <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
                             <div class="expand ${'tablerow%s' % (cnt%2)}">&darr; ${_('show more')} &darr;</div>
 						</div>	
 						<div class="right">