diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -2,9 +2,12 @@ Provides the BaseController class for subclassing. """ +import copy + from pylons import config, tmpl_context as c, request, session from pylons.controllers import WSGIController from pylons.templating import render_mako as render + from rhodecode import __version__ from rhodecode.lib.auth import AuthUser from rhodecode.lib.utils import get_repo_slug @@ -60,12 +63,17 @@ class BaseRepoController(BaseController) super(BaseRepoController, self).__before__() if c.repo_name: - c.rhodecode_repo, dbrepo = self.scm_model.get(c.repo_name, - retval='repo') + r, dbrepo = self.scm_model.get(c.repo_name, retval='repo') - if c.rhodecode_repo is not None: + if r is not None: c.repository_followers = self.scm_model.get_followers(c.repo_name) c.repository_forks = self.scm_model.get_forks(c.repo_name) else: c.repository_followers = 0 c.repository_forks = 0 + + # Since RhodeCode uses heavy memory caching we make a deepcopy + # of object taken from cache. This way we lose reference to cached + # instance in memory and keep it relatively small even for + # very large number of changesets + c.rhodecode_repo = copy.copy(r) diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -1717,7 +1717,7 @@ padding:0; div.browserblock .browser-header { background:#FFF; -padding:10px 0px 35px 0px; +padding:10px 0px 25px 0px; width: 100%; } div.browserblock .browser-nav { @@ -1725,16 +1725,16 @@ float:left } div.browserblock .browser-branch { -padding:10px 0 0 0; float:left; } + div.browserblock .browser-branch label { color:#4A4A4A; vertical-align:text-top; } div.browserblock .browser-header span { -margin-left:25px; +margin-left:5px; font-weight:700; } @@ -1823,27 +1823,33 @@ font-size:1.2em; padding-left:4px; } -.info_box * { -background:url("../images/pager.png") repeat-x scroll 0 0 #EBEBEB; -color:#4A4A4A; -font-weight:700; -height:1%; -display:inline; -border-color:#DEDEDE #C4C4C4 #C4C4C4 #CFCFCF; -border-style:solid; -border-width:1px; -padding:4px 6px; -} - .info_box span { margin-left:3px; margin-right:3px; } -.info_box input#at_rev { -text-align:center; -padding:5px 3px 3px 2px; -} +.info_box .rev { +color: #003367; +font-size: 1.6em; +font-weight: bold; +vertical-align: sub; +} + + +.info_box input#at_rev,.info_box input#size { +background:#FFF; +border-top:1px solid #b3b3b3; +border-left:1px solid #b3b3b3; +border-right:1px solid #eaeaea; +border-bottom:1px solid #eaeaea; +color:#000; +font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif; +font-size:12px; +margin:0; +padding:1px 5px 1px; +} + + .info_box input#view { text-align:center; @@ -2187,6 +2193,21 @@ border-left:none; color:#FFF; } +#content div.box input.ui-button-small { +background:#e5e3e3 url("../images/button.png") repeat-x; +border-top:1px solid #DDD; +border-left:1px solid #c6c6c6; +border-right:1px solid #DDD; +border-bottom:1px solid #c6c6c6; +color:#515151; +outline:none; +margin:0; +} + +#content div.box input.ui-button-small submit,button{ +cursor: pointer; +} + #content div.box div.title div.search div.button input.ui-state-hover { background:#46a0c1 url("../images/button_highlight_selected.png") repeat-x; border:1px solid #316293; diff --git a/rhodecode/templates/changelog/changelog.html b/rhodecode/templates/changelog/changelog.html --- a/rhodecode/templates/changelog/changelog.html +++ b/rhodecode/templates/changelog/changelog.html @@ -34,11 +34,9 @@
${h.form(h.url.current(),method='get')}
- ${_('Show')}: + ${h.submit('set',_('Show'),class_="ui-button-small")} ${h.text('size',size=1,value=c.size)} - ${_('revisions')} - ${h.submit('set',_('set'))} - + ${_('revisions')}
${h.end_form()} diff --git a/rhodecode/templates/files/files_annotate.html b/rhodecode/templates/files/files_annotate.html --- a/rhodecode/templates/files/files_annotate.html +++ b/rhodecode/templates/files/files_annotate.html @@ -51,8 +51,8 @@ ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} ${h.hidden('diff2',c.file.last_changeset.raw_id)} ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} - ${h.submit('diff','diff to revision',class_="ui-button")} - ${h.submit('show_rev','show at revision',class_="ui-button")} + ${h.submit('diff','diff to revision',class_="ui-button-small")} + ${h.submit('show_rev','show at revision',class_="ui-button-small")} ${h.end_form()}
diff --git a/rhodecode/templates/files/files_browser.html b/rhodecode/templates/files/files_browser.html --- a/rhodecode/templates/files/files_browser.html +++ b/rhodecode/templates/files/files_browser.html @@ -10,11 +10,11 @@
${h.form(h.url.current())}
- ${_('view')}@rev - « + ${_('view')}@rev + « ${h.text('at_rev',value=c.changeset.revision,size=3)} - » - ${h.submit('view','view')} + » + ## ${h.submit('view',_('view'),class_="ui-button-small")}
${h.end_form()}
diff --git a/rhodecode/templates/files/files_source.html b/rhodecode/templates/files/files_source.html --- a/rhodecode/templates/files/files_source.html +++ b/rhodecode/templates/files/files_source.html @@ -22,8 +22,8 @@ ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} ${h.hidden('diff2',c.files_list.last_changeset.raw_id)} ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)} - ${h.submit('diff','diff to revision',class_="ui-button")} - ${h.submit('show_rev','show at revision',class_="ui-button")} + ${h.submit('diff','diff to revision',class_="ui-button-small")} + ${h.submit('show_rev','show at revision',class_="ui-button-small")} ${h.end_form()} diff --git a/rhodecode/templates/forks/forks_data.html b/rhodecode/templates/forks/forks_data.html --- a/rhodecode/templates/forks/forks_data.html +++ b/rhodecode/templates/forks/forks_data.html @@ -1,24 +1,27 @@ ## -*- coding: utf-8 -*- -% for f in c.forks_pager: -
-
-
- gravatar -
- - ${f.user.username} (${f.user.name} ${f.user.lastname}) / - ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))} - -
${f.description}
-
-
-
${_('forked')} - - ${h.age(f.created_on)}
-
-
-% endfor - +% if c.forks_pager: + % for f in c.forks_pager: +
+
+
+ gravatar +
+ + ${f.user.username} (${f.user.name} ${f.user.lastname}) / + ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))} + +
${f.description}
+
+
+
${_('forked')} - + ${h.age(f.created_on)}
+
+
+ % endfor +% else: + ${_('There are no forks yet')} +% endif