##// END OF EJS Templates
Journal was missing a dt.repo_name change
marcink -
r2944:0add1736 beta
parent child Browse files
Show More
@@ -1,229 +1,229 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3 <%def name="title()">
4 4 ${_('Journal')} - ${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="head_extra()">
13 13 <link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
14 14 <link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
15 15 </%def>
16 16 <%def name="main()">
17 17
18 18 <div class="box box-left">
19 19 <!-- box / title -->
20 20 <div class="title">
21 21 <h5>${_('Journal')}</h5>
22 22 <ul class="links">
23 23 <li>
24 24 <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span>
25 25 </li>
26 26 <li>
27 27 <span><a href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span>
28 28 </li>
29 29 <li>
30 30 <span><a href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/atom.png')}"/></a></span>
31 31 </li>
32 32 </ul>
33 33 </div>
34 34 <div id="journal">${c.journal_data}</div>
35 35 </div>
36 36 <div class="box box-right">
37 37 <!-- box / title -->
38 38 <div class="title">
39 39 <h5>
40 40 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
41 41 <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a>
42 42 </h5>
43 43 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
44 44 <ul class="links">
45 45 <li>
46 46 <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span>
47 47 </li>
48 48 </ul>
49 49 %endif
50 50 </div>
51 51 <!-- end box / title -->
52 52 <div id="my" class="table">
53 53 %if c.user_repos:
54 54 <div id='repos_list_wrap' class="yui-skin-sam">
55 55 <table id="repos_list">
56 56 <thead>
57 57 <tr>
58 58 <th></th>
59 59 <th class="left">${_('Name')}</th>
60 60 <th class="left">${_('Revision')}</th>
61 61 <th class="left">${_('Action')}</th>
62 62 <th class="left">${_('Action')}</th>
63 63 </thead>
64 64 <tbody>
65 65 <%namespace name="dt" file="/data_table/_dt_elements.html"/>
66 66 %for repo in c.user_repos:
67 67 <tr>
68 68 ##QUICK MENU
69 69 <td class="quick_repo_menu">
70 70 ${dt.quick_menu(repo['name'])}
71 71 </td>
72 72 ##REPO NAME AND ICONS
73 73 <td class="reponame">
74 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))}
74 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],h.AttributeDict(repo['dbrepo_fork']))}
75 75 </td>
76 76 ##LAST REVISION
77 77 <td>
78 78 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
79 79 </td>
80 80 ##
81 81 <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td>
82 82 <td>
83 83 ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')}
84 84 ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
85 85 ${h.end_form()}
86 86 </td>
87 87 </tr>
88 88 %endfor
89 89 </tbody>
90 90 </table>
91 91 </div>
92 92 %else:
93 93 <div style="padding:5px 0px 10px 0px;">
94 94 ${_('No repositories yet')}
95 95 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
96 96 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")}
97 97 %endif
98 98 </div>
99 99 %endif
100 100 </div>
101 101
102 102 <div id="watched" class="table" style="display:none">
103 103 %if c.following:
104 104 <table>
105 105 <thead>
106 106 <tr>
107 107 <th class="left">${_('Name')}</th>
108 108 </thead>
109 109 <tbody>
110 110 %for entry in c.following:
111 111 <tr>
112 112 <td>
113 113 %if entry.follows_user_id:
114 114 <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/>
115 115 ${entry.follows_user.full_contact}
116 116 %endif
117 117
118 118 %if entry.follows_repo_id:
119 119 <div style="float:right;padding-right:5px">
120 120 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}"
121 121 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')">
122 122 </span>
123 123 </div>
124 124
125 125 %if h.is_hg(entry.follows_repository):
126 126 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
127 127 %elif h.is_git(entry.follows_repository):
128 128 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
129 129 %endif
130 130
131 131 %if entry.follows_repository.private and c.visual.show_private_icon:
132 132 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
133 133 %elif not entry.follows_repository.private and c.visual.show_public_icon:
134 134 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
135 135 %endif
136 136 <span class="watched_repo">
137 137 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))}
138 138 </span>
139 139 %endif
140 140 </td>
141 141 </tr>
142 142 %endfor
143 143 </tbody>
144 144 </table>
145 145 %else:
146 146 <div style="padding:5px 0px 10px 0px;">
147 147 ${_('You are not following any users or repositories')}
148 148 </div>
149 149 %endif
150 150 </div>
151 151 </div>
152 152
153 153 <script type="text/javascript">
154 154
155 155 YUE.on('show_my','click',function(e){
156 156 YUD.setStyle('watched','display','none');
157 157 YUD.setStyle('my','display','');
158 158 var nodes = YUQ('#my tr td a.repo_name');
159 159 var target = 'q_filter';
160 160 var func = function(node){
161 161 return node.parentNode.parentNode.parentNode.parentNode;
162 162 }
163 163 q_filter(target,nodes,func);
164 164 YUE.preventDefault(e);
165 165 })
166 166 YUE.on('show_watched','click',function(e){
167 167 YUD.setStyle('my','display','none');
168 168 YUD.setStyle('watched','display','');
169 169 var nodes = YUQ('#watched .watched_repo a');
170 170 var target = 'q_filter';
171 171 var func = function(node){
172 172 return node.parentNode.parentNode;
173 173 }
174 174 q_filter(target,nodes,func);
175 175 YUE.preventDefault(e);
176 176 })
177 177 YUE.on('refresh','click',function(e){
178 178 ypjax(e.currentTarget.href,"journal",function(){show_more_event();tooltip_activate();});
179 179 YUE.preventDefault(e);
180 180 });
181 181
182 182
183 183 // main table sorting
184 184 var myColumnDefs = [
185 185 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
186 186 {key:"name",label:"${_('Name')}",sortable:true,
187 187 sortOptions: { sortFunction: nameSort }},
188 188 {key:"tip",label:"${_('Tip')}",sortable:true,
189 189 sortOptions: { sortFunction: revisionSort }},
190 190 {key:"action1",label:"",sortable:false},
191 191 {key:"action2",label:"",sortable:false},
192 192 ];
193 193
194 194 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list"));
195 195
196 196 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
197 197
198 198 myDataSource.responseSchema = {
199 199 fields: [
200 200 {key:"menu"},
201 201 {key:"name"},
202 202 {key:"tip"},
203 203 {key:"action1"},
204 204 {key:"action2"}
205 205 ]
206 206 };
207 207
208 208 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,
209 209 {
210 210 sortedBy:{key:"name",dir:"asc"},
211 211 MSG_SORTASC:"${_('Click to sort ascending')}",
212 212 MSG_SORTDESC:"${_('Click to sort descending')}",
213 213 MSG_EMPTY:"${_('No records found.')}",
214 214 MSG_ERROR:"${_('Data error.')}",
215 215 MSG_LOADING:"${_('Loading...')}",
216 216 }
217 217 );
218 218 myDataTable.subscribe('postRenderEvent',function(oArgs) {
219 219 tooltip_activate();
220 220 quick_repo_menu();
221 221 var func = function(node){
222 222 return node.parentNode.parentNode.parentNode.parentNode;
223 223 }
224 224 q_filter('q_filter',YUQ('#my tr td a.repo_name'),func);
225 225 });
226 226
227 227
228 228 </script>
229 229 </%def>
General Comments 0
You need to be logged in to leave comments. Login now