changeset 3547:b7f489714639 beta

linkify names on fork/create repos in tooltip messages
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 19 Mar 2013 15:05:32 +0100
parents c5efdafee8fe
children b44bb596ddb2
files rhodecode/controllers/admin/repos.py rhodecode/controllers/files.py rhodecode/controllers/forks.py rhodecode/public/css/style.css
diffstat 4 files changed, 27 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/admin/repos.py	Tue Mar 19 14:26:36 2013 +0100
+++ b/rhodecode/controllers/admin/repos.py	Tue Mar 19 15:05:32 2013 +0100
@@ -168,8 +168,10 @@
                     % (form_result['repo_name'], form_result['clone_uri']),
                     category='success')
             else:
-                h.flash(_('created repository %s') % form_result['repo_name'],
-                    category='success')
+                repo_url = h.link_to(form_result['repo_name'],
+                    h.url('summary_home', repo_name=form_result['repo_name']))
+                h.flash(h.literal(_('created repository %s') % repo_url),
+                        category='success')
 
             if request.POST.get('user_created'):
                 # created by regular non admin user
--- a/rhodecode/controllers/files.py	Tue Mar 19 14:26:36 2013 +0100
+++ b/rhodecode/controllers/files.py	Tue Mar 19 15:05:32 2013 +0100
@@ -84,7 +84,7 @@
             url_ = url('files_add_home',
                        repo_name=c.repo_name,
                        revision=0, f_path='')
-            add_new = '<a href="%s">[%s]</a>' % (url_, _('click here to add new file'))
+            add_new = h.link_to(_('click here to add new file'), url_)
             h.flash(h.literal(_('There are no files yet %s') % add_new),
                     category='warning')
             redirect(h.url('summary_home', repo_name=repo_name))
--- a/rhodecode/controllers/forks.py	Tue Mar 19 14:26:36 2013 +0100
+++ b/rhodecode/controllers/forks.py	Tue Mar 19 15:05:32 2013 +0100
@@ -162,8 +162,11 @@
             # create fork is done sometimes async on celery, db transaction
             # management is handled there.
             RepoModel().create_fork(form_result, self.rhodecode_user.user_id)
-            h.flash(_('forked %s repository as %s') \
-                      % (repo_name, form_result['repo_name']),
+            fork_url = h.link_to(form_result['repo_name'],
+                    h.url('summary_home', repo_name=form_result['repo_name_full']))
+
+            h.flash(h.literal(_('forked repository %s as %s') \
+                      % (repo_name, fork_url)),
                     category='success')
         except formencode.Invalid, errors:
             c.new_repo = errors.value['repo_name']
--- a/rhodecode/public/css/style.css	Tue Mar 19 14:26:36 2013 +0100
+++ b/rhodecode/public/css/style.css	Tue Mar 19 15:05:32 2013 +0100
@@ -3385,6 +3385,10 @@
     border-color: #c43c35 #c43c35 #882a25;
 }
 
+.error_msg a {
+	text-decoration: underline;
+}
+
 .warning_msg {
     color: #404040 !important;
     background-color: #eedc94;
@@ -3400,6 +3404,10 @@
     border-color: #eedc94 #eedc94 #e4c652;
 }
 
+.warning_msg a {
+	text-decoration: underline;
+}
+
 .success_msg {
     background-color: #57a957;
     background-repeat: repeat-x !important;
@@ -3414,6 +3422,11 @@
     border-color: #57a957 #57a957 #3d773d;
 }
 
+.success_msg a {
+	text-decoration: underline;
+	color: #FFF !important;
+}
+
 .notice_msg {
     background-color: #339bb9;
     background-repeat: repeat-x;
@@ -3428,6 +3441,10 @@
     border-color: #339bb9 #339bb9 #22697d;
 }
 
+.notice_msg a {
+    text-decoration: underline;
+}
+
 .success_msg, .error_msg, .notice_msg, .warning_msg {
     font-size: 12px;
     font-weight: 700;