##// END OF EJS Templates
gui-improvments
marcink -
r1304:5a96551e beta
parent child Browse files
Show More
@@ -2,9 +2,12 b''
2
2
3 Provides the BaseController class for subclassing.
3 Provides the BaseController class for subclassing.
4 """
4 """
5 import copy
6
5 from pylons import config, tmpl_context as c, request, session
7 from pylons import config, tmpl_context as c, request, session
6 from pylons.controllers import WSGIController
8 from pylons.controllers import WSGIController
7 from pylons.templating import render_mako as render
9 from pylons.templating import render_mako as render
10
8 from rhodecode import __version__
11 from rhodecode import __version__
9 from rhodecode.lib.auth import AuthUser
12 from rhodecode.lib.auth import AuthUser
10 from rhodecode.lib.utils import get_repo_slug
13 from rhodecode.lib.utils import get_repo_slug
@@ -60,12 +63,17 b' class BaseRepoController(BaseController)'
60 super(BaseRepoController, self).__before__()
63 super(BaseRepoController, self).__before__()
61 if c.repo_name:
64 if c.repo_name:
62
65
63 c.rhodecode_repo, dbrepo = self.scm_model.get(c.repo_name,
66 r, dbrepo = self.scm_model.get(c.repo_name, retval='repo')
64 retval='repo')
65
67
66 if c.rhodecode_repo is not None:
68 if r is not None:
67 c.repository_followers = self.scm_model.get_followers(c.repo_name)
69 c.repository_followers = self.scm_model.get_followers(c.repo_name)
68 c.repository_forks = self.scm_model.get_forks(c.repo_name)
70 c.repository_forks = self.scm_model.get_forks(c.repo_name)
69 else:
71 else:
70 c.repository_followers = 0
72 c.repository_followers = 0
71 c.repository_forks = 0
73 c.repository_forks = 0
74
75 # Since RhodeCode uses heavy memory caching we make a deepcopy
76 # of object taken from cache. This way we lose reference to cached
77 # instance in memory and keep it relatively small even for
78 # very large number of changesets
79 c.rhodecode_repo = copy.copy(r)
@@ -1717,7 +1717,7 b' padding:0;'
1717
1717
1718 div.browserblock .browser-header {
1718 div.browserblock .browser-header {
1719 background:#FFF;
1719 background:#FFF;
1720 padding:10px 0px 35px 0px;
1720 padding:10px 0px 25px 0px;
1721 width: 100%;
1721 width: 100%;
1722 }
1722 }
1723 div.browserblock .browser-nav {
1723 div.browserblock .browser-nav {
@@ -1725,16 +1725,16 b' float:left'
1725 }
1725 }
1726
1726
1727 div.browserblock .browser-branch {
1727 div.browserblock .browser-branch {
1728 padding:10px 0 0 0;
1729 float:left;
1728 float:left;
1730 }
1729 }
1730
1731 div.browserblock .browser-branch label {
1731 div.browserblock .browser-branch label {
1732 color:#4A4A4A;
1732 color:#4A4A4A;
1733 vertical-align:text-top;
1733 vertical-align:text-top;
1734 }
1734 }
1735
1735
1736 div.browserblock .browser-header span {
1736 div.browserblock .browser-header span {
1737 margin-left:25px;
1737 margin-left:5px;
1738 font-weight:700;
1738 font-weight:700;
1739 }
1739 }
1740
1740
@@ -1823,27 +1823,33 b' font-size:1.2em;'
1823 padding-left:4px;
1823 padding-left:4px;
1824 }
1824 }
1825
1825
1826 .info_box * {
1827 background:url("../images/pager.png") repeat-x scroll 0 0 #EBEBEB;
1828 color:#4A4A4A;
1829 font-weight:700;
1830 height:1%;
1831 display:inline;
1832 border-color:#DEDEDE #C4C4C4 #C4C4C4 #CFCFCF;
1833 border-style:solid;
1834 border-width:1px;
1835 padding:4px 6px;
1836 }
1837
1838 .info_box span {
1826 .info_box span {
1839 margin-left:3px;
1827 margin-left:3px;
1840 margin-right:3px;
1828 margin-right:3px;
1841 }
1829 }
1842
1830
1843 .info_box input#at_rev {
1831 .info_box .rev {
1844 text-align:center;
1832 color: #003367;
1845 padding:5px 3px 3px 2px;
1833 font-size: 1.6em;
1846 }
1834 font-weight: bold;
1835 vertical-align: sub;
1836 }
1837
1838
1839 .info_box input#at_rev,.info_box input#size {
1840 background:#FFF;
1841 border-top:1px solid #b3b3b3;
1842 border-left:1px solid #b3b3b3;
1843 border-right:1px solid #eaeaea;
1844 border-bottom:1px solid #eaeaea;
1845 color:#000;
1846 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1847 font-size:12px;
1848 margin:0;
1849 padding:1px 5px 1px;
1850 }
1851
1852
1847
1853
1848 .info_box input#view {
1854 .info_box input#view {
1849 text-align:center;
1855 text-align:center;
@@ -2187,6 +2193,21 b' border-left:none;'
2187 color:#FFF;
2193 color:#FFF;
2188 }
2194 }
2189
2195
2196 #content div.box input.ui-button-small {
2197 background:#e5e3e3 url("../images/button.png") repeat-x;
2198 border-top:1px solid #DDD;
2199 border-left:1px solid #c6c6c6;
2200 border-right:1px solid #DDD;
2201 border-bottom:1px solid #c6c6c6;
2202 color:#515151;
2203 outline:none;
2204 margin:0;
2205 }
2206
2207 #content div.box input.ui-button-small submit,button{
2208 cursor: pointer;
2209 }
2210
2190 #content div.box div.title div.search div.button input.ui-state-hover {
2211 #content div.box div.title div.search div.button input.ui-state-hover {
2191 background:#46a0c1 url("../images/button_highlight_selected.png") repeat-x;
2212 background:#46a0c1 url("../images/button_highlight_selected.png") repeat-x;
2192 border:1px solid #316293;
2213 border:1px solid #316293;
@@ -34,11 +34,9 b''
34 <div class="container_header">
34 <div class="container_header">
35 ${h.form(h.url.current(),method='get')}
35 ${h.form(h.url.current(),method='get')}
36 <div class="info_box">
36 <div class="info_box">
37 <span>${_('Show')}:</span>
37 ${h.submit('set',_('Show'),class_="ui-button-small")}
38 ${h.text('size',size=1,value=c.size)}
38 ${h.text('size',size=1,value=c.size)}
39 <span>${_('revisions')}</span>
39 <span class="rev">${_('revisions')}</span>
40 ${h.submit('set',_('set'))}
41
42 </div>
40 </div>
43 ${h.end_form()}
41 ${h.end_form()}
44 <div id="rev_range_container" style="display:none"></div>
42 <div id="rev_range_container" style="display:none"></div>
@@ -51,8 +51,8 b''
51 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
51 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
52 ${h.hidden('diff2',c.file.last_changeset.raw_id)}
52 ${h.hidden('diff2',c.file.last_changeset.raw_id)}
53 ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)}
53 ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)}
54 ${h.submit('diff','diff to revision',class_="ui-button")}
54 ${h.submit('diff','diff to revision',class_="ui-button-small")}
55 ${h.submit('show_rev','show at revision',class_="ui-button")}
55 ${h.submit('show_rev','show at revision',class_="ui-button-small")}
56 ${h.end_form()}
56 ${h.end_form()}
57 </div>
57 </div>
58 </dd>
58 </dd>
@@ -10,11 +10,11 b''
10 <div class="browser-nav">
10 <div class="browser-nav">
11 ${h.form(h.url.current())}
11 ${h.form(h.url.current())}
12 <div class="info_box">
12 <div class="info_box">
13 <span >${_('view')}@rev</span>
13 <span class="rev">${_('view')}@rev</span>
14 <a href="${c.url_prev}" title="${_('previous revision')}">&laquo;</a>
14 <a class="rev" href="${c.url_prev}" title="${_('previous revision')}">&laquo;</a>
15 ${h.text('at_rev',value=c.changeset.revision,size=3)}
15 ${h.text('at_rev',value=c.changeset.revision,size=3)}
16 <a href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
16 <a class="rev" href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
17 ${h.submit('view','view')}
17 ## ${h.submit('view',_('view'),class_="ui-button-small")}
18 </div>
18 </div>
19 ${h.end_form()}
19 ${h.end_form()}
20 </div>
20 </div>
@@ -22,8 +22,8 b''
22 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
22 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
23 ${h.hidden('diff2',c.files_list.last_changeset.raw_id)}
23 ${h.hidden('diff2',c.files_list.last_changeset.raw_id)}
24 ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)}
24 ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)}
25 ${h.submit('diff','diff to revision',class_="ui-button")}
25 ${h.submit('diff','diff to revision',class_="ui-button-small")}
26 ${h.submit('show_rev','show at revision',class_="ui-button")}
26 ${h.submit('show_rev','show at revision',class_="ui-button-small")}
27 ${h.end_form()}
27 ${h.end_form()}
28 </div>
28 </div>
29 </dd>
29 </dd>
@@ -1,24 +1,27 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 % for f in c.forks_pager:
3 % if c.forks_pager:
4 <div>
4 % for f in c.forks_pager:
5 <div class="fork_user">
5 <div>
6 <div class="gravatar">
6 <div class="fork_user">
7 <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
7 <div class="gravatar">
8 </div>
8 <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
9 <span style="font-size: 20px">
9 </div>
10 <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
10 <span style="font-size: 20px">
11 ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
11 <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
12 </span>
12 ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
13 <div style="padding:5px 3px 3px 42px;">${f.description}</div>
13 </span>
14 </div>
14 <div style="padding:5px 3px 3px 42px;">${f.description}</div>
15 <div style="clear:both;padding-top: 10px"></div>
15 </div>
16 <div class="follower_date">${_('forked')} -
16 <div style="clear:both;padding-top: 10px"></div>
17 <span class="tooltip" title="${f.created_on}"> ${h.age(f.created_on)}</span></div>
17 <div class="follower_date">${_('forked')} -
18 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
18 <span class="tooltip" title="${f.created_on}"> ${h.age(f.created_on)}</span></div>
19 </div>
19 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
20 % endfor
20 </div>
21
21 % endfor
22 % else:
23 ${_('There are no forks yet')}
24 % endif
22 <div class="pagination-wh pagination-left">
25 <div class="pagination-wh pagination-left">
23 <script type="text/javascript">
26 <script type="text/javascript">
24 var data_div = 'forks';
27 var data_div = 'forks';
General Comments 0
You need to be logged in to leave comments. Login now