Mercurial > kallithea
comparison rhodecode/templates/journal/journal.html @ 1746:753aeb4a5c58 beta
Journal refresh button
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 01 Dec 2011 02:35:29 +0200 |
parents | fcbc35ecb024 |
children | a3ee2611e6e8 |
comparison
equal
deleted
inserted
replaced
1745:456e1e3ce4eb | 1746:753aeb4a5c58 |
---|---|
13 | 13 |
14 <div class="box box-left"> | 14 <div class="box box-left"> |
15 <!-- box / title --> | 15 <!-- box / title --> |
16 <div class="title"> | 16 <div class="title"> |
17 <h5>${_('Journal')}</h5> | 17 <h5>${_('Journal')}</h5> |
18 </div> | 18 <ul class="links"> |
19 <script type="text/javascript"> | 19 <li> |
20 function show_more_event(){ | 20 <span><a href="#"><img id="refresh" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> |
21 YUE.on(YUD.getElementsByClassName('show_more'),'click',function(e){ | 21 </a></span> |
22 var el = e.target; | 22 </li> |
23 YUD.setStyle(YUD.get(el.id.substring(1)),'display',''); | 23 </ul> |
24 YUD.setStyle(el.parentNode,'display','none'); | 24 </div> |
25 }); | |
26 } | |
27 </script> | |
28 <div id="journal">${c.journal_data}</div> | 25 <div id="journal">${c.journal_data}</div> |
29 </div> | 26 </div> |
30 <div class="box box-right"> | 27 <div class="box box-right"> |
31 <!-- box / title --> | 28 <!-- box / title --> |
32 <div class="title"> | 29 <div class="title"> |
42 </ul> | 39 </ul> |
43 %endif | 40 %endif |
44 </div> | 41 </div> |
45 <!-- end box / title --> | 42 <!-- end box / title --> |
46 <div id="my" class="table"> | 43 <div id="my" class="table"> |
44 %if c.user_repos: | |
47 <table> | 45 <table> |
48 <thead> | 46 <thead> |
49 <tr> | 47 <tr> |
50 <th class="left">${_('Name')}</th> | 48 <th class="left">${_('Name')}</th> |
51 <th class="left">${_('revision')}</th> | 49 <th class="left">${_('revision')}</th> |
52 <th colspan="2" class="left">${_('action')}</th> | 50 <th colspan="2" class="left">${_('action')}</th> |
53 </thead> | 51 </thead> |
54 <tbody> | 52 <tbody> |
55 %if c.user_repos: | |
56 %for repo in c.user_repos: | 53 %for repo in c.user_repos: |
57 <tr> | 54 <tr> |
58 <td> | 55 <td> |
59 %if repo['dbrepo']['repo_type'] =='hg': | 56 %if repo['dbrepo']['repo_type'] =='hg': |
60 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> | 57 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
84 ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} | 81 ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
85 ${h.end_form()} | 82 ${h.end_form()} |
86 </td> | 83 </td> |
87 </tr> | 84 </tr> |
88 %endfor | 85 %endfor |
86 </tbody> | |
87 </table> | |
89 %else: | 88 %else: |
90 <div style="padding:5px 0px 10px 0px;"> | 89 <div style="padding:5px 0px 10px 0px;"> |
91 ${_('No repositories yet')} | 90 ${_('No repositories yet')} |
92 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): | 91 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
93 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-button-small")} | 92 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-button-small")} |
94 %endif | 93 %endif |
95 </div> | 94 </div> |
96 %endif | 95 %endif |
97 </tbody> | |
98 </table> | |
99 </div> | 96 </div> |
100 | 97 |
101 <div id="watched" class="table" style="display:none"> | 98 <div id="watched" class="table" style="display:none"> |
102 <table> | |
103 <thead> | |
104 <tr> | |
105 <th class="left">${_('Name')}</th> | |
106 </thead> | |
107 <tbody> | |
108 %if c.following: | 99 %if c.following: |
109 %for entry in c.following: | 100 <table> |
110 <tr> | 101 <thead> |
111 <td> | 102 <tr> |
103 <th class="left">${_('Name')}</th> | |
104 </thead> | |
105 <tbody> | |
106 %for entry in c.following: | |
107 <tr> | |
108 <td> | |
112 %if entry.follows_user_id: | 109 %if entry.follows_user_id: |
113 <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> | 110 <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> |
114 ${entry.follows_user.full_contact} | 111 ${entry.follows_user.full_contact} |
115 %endif | 112 %endif |
116 | 113 |
117 %if entry.follows_repo_id: | 114 %if entry.follows_repo_id: |
118 | |
119 <div style="float:right;padding-right:5px"> | 115 <div style="float:right;padding-right:5px"> |
120 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" | 116 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" |
121 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> | 117 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> |
122 </span> | 118 </span> |
123 </div> | 119 </div> |
135 %endif | 131 %endif |
136 <span class="watched_repo"> | 132 <span class="watched_repo"> |
137 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} | 133 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} |
138 </span> | 134 </span> |
139 %endif | 135 %endif |
140 </td> | 136 </td> |
141 </tr> | 137 </tr> |
142 %endfor | 138 %endfor |
139 </tbody> | |
140 </table> | |
143 %else: | 141 %else: |
144 </tbody> | 142 <div style="padding:5px 0px 10px 0px;"> |
145 ${_('You are not following any users or repositories')} | 143 ${_('You are not following any users or repositories')} |
146 %endif | 144 </div> |
147 </table> | 145 %endif |
148 </div> | 146 </div> |
147 </div> | |
148 | |
149 <script type="text/javascript"> | 149 <script type="text/javascript"> |
150 YUE.on('show_my','click',function(e){ | 150 YUE.on('show_my','click',function(e){ |
151 YUD.setStyle('watched','display','none'); | 151 YUD.setStyle('watched','display','none'); |
152 YUD.setStyle('my','display',''); | 152 YUD.setStyle('my','display',''); |
153 var nodes = YUQ('#my tr td a.repo_name'); | 153 var nodes = YUQ('#my tr td a.repo_name'); |
167 return node.parentNode.parentNode; | 167 return node.parentNode.parentNode; |
168 } | 168 } |
169 q_filter(target,nodes,func); | 169 q_filter(target,nodes,func); |
170 YUE.preventDefault(e); | 170 YUE.preventDefault(e); |
171 }) | 171 }) |
172 YUE.on('refresh','click',function(e){ | |
173 ypjax(e.target.href,"journal",function(){show_more_event();tooltip_activate();}); | |
174 YUE.preventDefault(e); | |
175 }) | |
172 </script> | 176 </script> |
173 </%def> | 177 </%def> |