##// END OF EJS Templates
fixes to #85, some other small changes for summary page
marcink -
r799:6d37fe11 beta
parent child Browse files
Show More
@@ -1,32 +1,34 b''
1 1 % if c.repo_branches:
2 2 <table class="table_disp">
3 3 <tr>
4 4 <th class="left">${_('date')}</th>
5 5 <th class="left">${_('name')}</th>
6 6 <th class="left">${_('author')}</th>
7 7 <th class="left">${_('revision')}</th>
8 8 <th class="left">${_('links')}</th>
9 9 </tr>
10 10 %for cnt,branch in enumerate(c.repo_branches.items()):
11 11 <tr class="parity${cnt%2}">
12 <td>${branch[1].date} - ${h.age(branch[1].date)}</td>
12 <td><span class="tooltip" tooltip_title="${h.age(branch[1].date)}">
13 ${branch[1].date}</span>
14 </td>
13 15 <td>
14 16 <span class="logtags">
15 17 <span class="branchtag">${h.link_to(branch[0],
16 18 h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span>
17 19 </span>
18 20 </td>
19 21 <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
20 22 <td>r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</td>
21 23 <td class="nowrap">
22 24 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}
23 25 |
24 26 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}
25 27 </td>
26 28 </tr>
27 29 %endfor
28 30 </table>
29 31 %else:
30 32 ${_('There are no branches yet')}
31 33 %endif
32 34
@@ -1,168 +1,168 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/base.html"/>
3 3 <%def name="title()">
4 4 ${_('Dashboard')} - ${c.rhodecode_name}
5 5 </%def>
6 6 <%def name="breadcrumbs()">
7 7 ${c.rhodecode_name}
8 8 </%def>
9 9 <%def name="page_nav()">
10 10 ${self.menu('home')}
11 11 </%def>
12 12 <%def name="main()">
13 13 <%def name="get_sort(name)">
14 14 <%name_slug = name.lower().replace(' ','_') %>
15 15
16 16 %if name_slug == c.sort_slug:
17 17 %if c.sort_by.startswith('-'):
18 18 <a href="?sort=${name_slug}">${name}&uarr;</a>
19 19 %else:
20 20 <a href="?sort=-${name_slug}">${name}&darr;</a>
21 21 %endif:
22 22 %else:
23 23 <a href="?sort=${name_slug}">${name}</a>
24 24 %endif
25 25 </%def>
26 26
27 27 <div class="box">
28 28 <!-- box / title -->
29 29 <div class="title">
30 30 <h5>${_('Dashboard')}
31 31 <input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
32 32 </h5>
33 33 %if c.rhodecode_user.username != 'default':
34 34 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
35 35 <ul class="links">
36 36 <li>
37 37 <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
38 38 </li>
39 39 </ul>
40 40 %endif
41 41 %endif
42 42 </div>
43 43 <!-- end box / title -->
44 44 <div class="table">
45 45 <table>
46 46 <thead>
47 47 <tr>
48 48 <th class="left">${get_sort(_('Name'))}</th>
49 49 <th class="left">${get_sort(_('Description'))}</th>
50 50 <th class="left">${get_sort(_('Last change'))}</th>
51 51 <th class="left">${get_sort(_('Tip'))}</th>
52 52 <th class="left">${get_sort(_('Owner'))}</th>
53 53 <th class="left">${_('RSS')}</th>
54 54 <th class="left">${_('Atom')}</th>
55 55 </tr>
56 56 </thead>
57 57 <tbody>
58 58 %for cnt,repo in enumerate(c.repos_list):
59 59 <tr class="parity${cnt%2}">
60 60 <td>
61 61 <div style="white-space: nowrap">
62 62 ## TYPE OF REPO
63 63 %if repo['repo'].dbrepo.repo_type =='hg':
64 64 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/>
65 65 %elif repo['repo'].dbrepo.repo_type =='git':
66 66 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/>
67 67 %else:
68 68
69 69 %endif
70 70
71 71 ##PRIVATE/PUBLIC
72 72 %if repo['repo'].dbrepo.private:
73 73 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="/images/icons/lock.png"/>
74 74 %else:
75 75 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="/images/icons/lock_open.png"/>
76 76 %endif
77 77
78 78 ##NAME
79 79 ${h.link_to(repo['name'],
80 80 h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
81 81 %if repo['repo'].dbrepo.fork:
82 82 <a href="${h.url('summary_home',repo_name=repo['repo'].dbrepo.fork.repo_name)}">
83 83 <img class="icon" alt="${_('fork')}"
84 84 title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}"
85 85 src="/images/icons/arrow_divide.png"/></a>
86 86 %endif
87 87 </div>
88 88 </td>
89 89 ##DESCRIPTION
90 90 <td><span class="tooltip" tooltip_title="${repo['description']}">
91 91 ${h.truncate(repo['description'],60)}</span>
92 92 </td>
93 93 ##LAST CHANGE
94 94 <td>
95 <span class="tooltip" tooltip_title="${h.age(repo['last_change'])}">
96 ${repo['last_change']}</span>
95 <span class="tooltip" tooltip_title="${repo['last_change']}">
96 ${h.age(repo['last_change'])}</span>
97 97 </td>
98 98 <td>
99 99 %if repo['rev']>=0:
100 100 ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
101 101 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
102 102 class_="tooltip",
103 103 tooltip_title=h.tooltip(repo['last_msg']))}
104 104 %else:
105 105 ${_('No changesets yet')}
106 106 %endif
107 107 </td>
108 108 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
109 109 <td>
110 110 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
111 111 </td>
112 112 <td>
113 113 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
114 114 </td>
115 115 </tr>
116 116 %endfor
117 117 </tbody>
118 118 </table>
119 119 </div>
120 120 </div>
121 121
122 122
123 123 <script type="text/javascript">
124 124 var D = YAHOO.util.Dom;
125 125 var E = YAHOO.util.Event;
126 126 var S = YAHOO.util.Selector;
127 127
128 128 var q_filter = D.get('q_filter');
129 129 var F = YAHOO.namespace('q_filter');
130 130
131 131 E.on(q_filter,'click',function(){
132 132 q_filter.value = '';
133 133 });
134 134
135 135 F.filterTimeout = null;
136 136
137 137 F.updateFilter = function() {
138 138 // Reset timeout
139 139 F.filterTimeout = null;
140 140
141 141 var obsolete = [];
142 142 var nodes = S.query('div.table tr td div a.repo_name');
143 143 var req = D.get('q_filter').value;
144 144 for (n in nodes){
145 145 D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','')
146 146 }
147 147 if (req){
148 148 for (n in nodes){
149 149 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
150 150 obsolete.push(nodes[n]);
151 151 }
152 152 }
153 153 if(obsolete){
154 154 for (n in obsolete){
155 155 D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none');
156 156 }
157 157 }
158 158 }
159 159 }
160 160
161 161 E.on(q_filter,'keyup',function(e){
162 162 clearTimeout(F.filterTimeout);
163 163 setTimeout(F.updateFilter,600);
164 164 });
165 165
166 166 </script>
167 167
168 168 </%def>
@@ -1,63 +1,65 b''
1 1 ## -*- coding: utf-8 -*-
2 2 % if c.repo_changesets:
3 3 <table>
4 4 <tr>
5 <th class="left">${_('date')}</th>
6 5 <th class="left">${_('commit message')}</th>
6 <th class="left">${_('age')}</th>
7 7 <th class="left">${_('author')}</th>
8 8 <th class="left">${_('revision')}</th>
9 9 <th class="left">${_('branch')}</th>
10 10 <th class="left">${_('tags')}</th>
11 11 <th class="left">${_('links')}</th>
12 12
13 13 </tr>
14 14 %for cnt,cs in enumerate(c.repo_changesets):
15 15 <tr class="parity${cnt%2}">
16 <td>${cs.date} - ${h.age(cs.date)}</td>
17 16 <td>
18 17 ${h.link_to(h.truncate(cs.message,60),
19 18 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id),
20 19 title=cs.message)}
21 </td>
20 </td>
21 <td><span class="tooltip" tooltip_title="${cs.date}">
22 ${h.age(cs.date)}</span>
23 </td>
22 24 <td title="${cs.author}">${h.person(cs.author)}</td>
23 25 <td>r${cs.revision}:${h.short_id(cs.raw_id)}</td>
24 26 <td>
25 27 <span class="logtags">
26 28 <span class="branchtag">${cs.branch}</span>
27 29 </span>
28 30 </td>
29 31 <td>
30 32 <span class="logtags">
31 33 %for tag in cs.tags:
32 34 <span class="tagtag">${tag}</span>
33 35 %endfor
34 36 </span>
35 37 </td>
36 38 <td class="nowrap">
37 39 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
38 40 |
39 41 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
40 42 </td>
41 43 </tr>
42 44 %endfor
43 45
44 46 </table>
45 47
46 48 <script type="text/javascript">
47 49 var data_div = 'shortlog_data';
48 50 YAHOO.util.Event.onDOMReady(function(){
49 51 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
50 52 YAHOO.util.Dom.setStyle('shortlog_data','opacity','0.3');});});
51 53 </script>
52 54
53 55 <div class="pagination-wh pagination-left">
54 56 ${c.repo_changesets.pager('$link_previous ~2~ $link_next',
55 57 onclick="""YAHOO.util.Connect.asyncRequest('GET','$partial_url',{
56 58 success:function(o){YAHOO.util.Dom.get(data_div).innerHTML=o.responseText;
57 59 YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName('pager_link'),"click",function(){
58 60 YAHOO.util.Dom.setStyle(data_div,'opacity','0.3');});
59 61 YAHOO.util.Dom.setStyle(data_div,'opacity','1');}},null); return false;""")}
60 62 </div>
61 63 %else:
62 64 ${_('There are no changes yet')}
63 65 %endif
@@ -1,31 +1,33 b''
1 1 %if c.repo_tags:
2 2 <table>
3 3 <tr>
4 4 <th class="left">${_('date')}</th>
5 5 <th class="left">${_('name')}</th>
6 6 <th class="left">${_('author')}</th>
7 7 <th class="left">${_('revision')}</th>
8 8 <th class="left">${_('links')}</th>
9 9 </tr>
10 10 %for cnt,tag in enumerate(c.repo_tags.items()):
11 11 <tr class="parity${cnt%2}">
12 <td>${tag[1].date} - ${h.age(tag[1].date)}</td>
12 <td><span class="tooltip" tooltip_title="${h.age(tag[1].date)}">
13 ${tag[1].date}</span>
14 </td>
13 15 <td>
14 16 <span class="logtags">
15 17 <span class="tagtag">${h.link_to(tag[0],
16 18 h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}</span>
17 19 </span>
18 20 </td>
19 21 <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
20 22 <td>r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</td>
21 23 <td class="nowrap">
22 24 ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
23 25 |
24 26 ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
25 27 </td>
26 28 </tr>
27 29 %endfor
28 30 </table>
29 31 %else:
30 32 ${_('There are no tags yet')}
31 33 %endif No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now