Show More
@@ -1,173 +1,177 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="main()"> |
|
13 | 13 | |
|
14 | 14 | <div class="box box-left"> |
|
15 | 15 | <!-- box / title --> |
|
16 | 16 | <div class="title"> |
|
17 | 17 | <h5>${_('Journal')}</h5> |
|
18 | </div> | |
|
19 | <script type="text/javascript"> | |
|
20 | function show_more_event(){ | |
|
21 | YUE.on(YUD.getElementsByClassName('show_more'),'click',function(e){ | |
|
22 | var el = e.target; | |
|
23 | YUD.setStyle(YUD.get(el.id.substring(1)),'display',''); | |
|
24 | YUD.setStyle(el.parentNode,'display','none'); | |
|
25 | }); | |
|
26 | } | |
|
27 | </script> | |
|
18 | <ul class="links"> | |
|
19 | <li> | |
|
20 | <span><a href="#"><img id="refresh" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> | |
|
21 | </a></span> | |
|
22 | </li> | |
|
23 | </ul> | |
|
24 | </div> | |
|
28 | 25 | <div id="journal">${c.journal_data}</div> |
|
29 | 26 | </div> |
|
30 | 27 | <div class="box box-right"> |
|
31 | 28 | <!-- box / title --> |
|
32 | 29 | <div class="title"> |
|
33 | 30 | <h5> |
|
34 | 31 | <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
35 | 32 | <a id="show_my" class="link-white" href="#my">${_('My repositories')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a> |
|
36 | 33 | </h5> |
|
37 | 34 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
38 | 35 | <ul class="links"> |
|
39 | 36 | <li> |
|
40 | 37 | <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
|
41 | 38 | </li> |
|
42 | 39 | </ul> |
|
43 | 40 | %endif |
|
44 | 41 | </div> |
|
45 | 42 | <!-- end box / title --> |
|
46 | 43 | <div id="my" class="table"> |
|
44 | %if c.user_repos: | |
|
47 | 45 | <table> |
|
48 | 46 | <thead> |
|
49 | 47 | <tr> |
|
50 | 48 | <th class="left">${_('Name')}</th> |
|
51 | 49 | <th class="left">${_('revision')}</th> |
|
52 | 50 | <th colspan="2" class="left">${_('action')}</th> |
|
53 | 51 | </thead> |
|
54 | 52 | <tbody> |
|
55 | %if c.user_repos: | |
|
56 | 53 | %for repo in c.user_repos: |
|
57 | 54 | <tr> |
|
58 | 55 | <td> |
|
59 | 56 | %if repo['dbrepo']['repo_type'] =='hg': |
|
60 | 57 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
61 | 58 | %elif repo['dbrepo']['repo_type'] =='git': |
|
62 | 59 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
63 | 60 | %else: |
|
64 | 61 | |
|
65 | 62 | %endif |
|
66 | 63 | %if repo['dbrepo']['private']: |
|
67 | 64 | <img class="icon" alt="${_('private')}" src="${h.url('/images/icons/lock.png')}"/> |
|
68 | 65 | %else: |
|
69 | 66 | <img class="icon" alt="${_('public')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
70 | 67 | %endif |
|
71 | 68 | |
|
72 | 69 | ${h.link_to(repo['name'], h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
|
73 | 70 | %if repo['dbrepo_fork']: |
|
74 | 71 | <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> |
|
75 | 72 | <img class="icon" alt="${_('public')}" |
|
76 | 73 | title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" |
|
77 | 74 | src="${h.url('/images/icons/arrow_divide.png')}"/></a> |
|
78 | 75 | %endif |
|
79 | 76 | </td> |
|
80 | 77 | <td><span class="tooltip" title="${repo['last_change']}">${("r%s:%s") % (repo['rev'],h.short_id(repo['tip']))}</span></td> |
|
81 | 78 | <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 | 79 | <td> |
|
83 | 80 | ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
|
84 | 81 | ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
|
85 | 82 | ${h.end_form()} |
|
86 | 83 | </td> |
|
87 | 84 | </tr> |
|
88 | 85 | %endfor |
|
86 | </tbody> | |
|
87 | </table> | |
|
89 | 88 | %else: |
|
90 | 89 | <div style="padding:5px 0px 10px 0px;"> |
|
91 | 90 | ${_('No repositories yet')} |
|
92 | 91 | %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
|
93 | 92 | ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-button-small")} |
|
94 | 93 | %endif |
|
95 | 94 | </div> |
|
96 | %endif | |
|
97 | </tbody> | |
|
98 | </table> | |
|
95 | %endif | |
|
99 | 96 | </div> |
|
100 | 97 | |
|
101 | 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 | 99 | %if c.following: |
|
109 | %for entry in c.following: | |
|
110 |
|
|
|
111 |
<t |
|
|
100 | <table> | |
|
101 | <thead> | |
|
102 | <tr> | |
|
103 | <th class="left">${_('Name')}</th> | |
|
104 | </thead> | |
|
105 | <tbody> | |
|
106 | %for entry in c.following: | |
|
107 | <tr> | |
|
108 | <td> | |
|
112 | 109 | %if entry.follows_user_id: |
|
113 | 110 | <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> |
|
114 | 111 | ${entry.follows_user.full_contact} |
|
115 | 112 | %endif |
|
116 | 113 | |
|
117 | 114 | %if entry.follows_repo_id: |
|
118 | ||
|
119 | 115 | <div style="float:right;padding-right:5px"> |
|
120 | 116 | <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" |
|
121 | 117 | onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> |
|
122 | 118 | </span> |
|
123 | 119 | </div> |
|
124 | 120 | |
|
125 | 121 | %if entry.follows_repository.repo_type == 'hg': |
|
126 | 122 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
127 | 123 | %elif entry.follows_repository.repo_type == 'git': |
|
128 | 124 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
129 | 125 | %endif |
|
130 | 126 | |
|
131 | 127 | %if entry.follows_repository.private: |
|
132 | 128 | <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
133 | 129 | %else: |
|
134 | 130 | <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
135 | 131 | %endif |
|
136 | 132 | <span class="watched_repo"> |
|
137 | 133 | ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} |
|
138 | 134 | </span> |
|
139 | 135 | %endif |
|
140 | </td> | |
|
141 | </tr> | |
|
142 | %endfor | |
|
136 | </td> | |
|
137 | </tr> | |
|
138 | %endfor | |
|
139 | </tbody> | |
|
140 | </table> | |
|
143 | 141 | %else: |
|
144 | </tbody> | |
|
142 | <div style="padding:5px 0px 10px 0px;"> | |
|
145 | 143 | ${_('You are not following any users or repositories')} |
|
146 |
|
|
|
147 | </table> | |
|
144 | </div> | |
|
145 | %endif | |
|
148 | 146 | </div> |
|
147 | </div> | |
|
148 | ||
|
149 | 149 | <script type="text/javascript"> |
|
150 | 150 | YUE.on('show_my','click',function(e){ |
|
151 | 151 | YUD.setStyle('watched','display','none'); |
|
152 | 152 | YUD.setStyle('my','display',''); |
|
153 | 153 | var nodes = YUQ('#my tr td a.repo_name'); |
|
154 | 154 | var target = 'q_filter'; |
|
155 | 155 | var func = function(node){ |
|
156 | 156 | return node.parentNode.parentNode; |
|
157 | 157 | } |
|
158 | 158 | q_filter(target,nodes,func); |
|
159 | 159 | YUE.preventDefault(e); |
|
160 | 160 | }) |
|
161 | 161 | YUE.on('show_watched','click',function(e){ |
|
162 | 162 | YUD.setStyle('my','display','none'); |
|
163 | 163 | YUD.setStyle('watched','display',''); |
|
164 | 164 | var nodes = YUQ('#watched .watched_repo a'); |
|
165 | 165 | var target = 'q_filter'; |
|
166 | 166 | var func = function(node){ |
|
167 | 167 | return node.parentNode.parentNode; |
|
168 | 168 | } |
|
169 | 169 | q_filter(target,nodes,func); |
|
170 | 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 | 176 | </script> |
|
173 | 177 | </%def> |
@@ -1,47 +1,49 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | %if c.journal_day_aggreagate: |
|
4 | 4 | %for day,items in c.journal_day_aggreagate: |
|
5 | 5 | <div class="journal_day">${day}</div> |
|
6 | 6 | % for user,entries in items: |
|
7 | 7 | <div class="journal_container"> |
|
8 | 8 | <div class="gravatar"> |
|
9 | 9 | <img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> |
|
10 | 10 | </div> |
|
11 | 11 | <div class="journal_user">${user.name} ${user.lastname}</div> |
|
12 | 12 | <div class="journal_action_container"> |
|
13 | 13 | % for entry in entries: |
|
14 | 14 | <div class="journal_icon"> ${h.action_parser_icon(entry)}</div> |
|
15 | 15 | <div class="journal_action">${h.action_parser(entry)[0]}</div> |
|
16 | 16 | <div class="journal_repo"> |
|
17 | 17 | <span class="journal_repo_name"> |
|
18 | 18 | %if entry.repository is not None: |
|
19 | 19 | ${h.link_to(entry.repository.repo_name, |
|
20 | 20 | h.url('summary_home',repo_name=entry.repository.repo_name))} |
|
21 | 21 | %else: |
|
22 | 22 | ${entry.repository_name} |
|
23 | 23 | %endif |
|
24 | 24 | </span> |
|
25 | 25 | </div> |
|
26 | 26 | <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div> |
|
27 | 27 | <div class="date"><span class="tooltip" title="${entry.action_date}">${h.age(entry.action_date)}</span></div> |
|
28 | 28 | %endfor |
|
29 | 29 | </div> |
|
30 | 30 | </div> |
|
31 | 31 | %endfor |
|
32 | 32 | %endfor |
|
33 | 33 | |
|
34 | <div class="pagination-wh pagination-left"> | |
|
35 | <script type="text/javascript"> | |
|
36 | YUE.onDOMReady(function(){ | |
|
37 | YUE.delegate("journal","click",function(e, matchedEl, container){ | |
|
38 | ypjax(e.target.href,"journal",function(){show_more_event();tooltip_activate();}); | |
|
39 | YUE.preventDefault(e); | |
|
40 | },'.pager_link'); | |
|
41 | }); | |
|
42 | </script> | |
|
43 | ${c.journal_pager.pager('$link_previous ~2~ $link_next')} | |
|
44 | </div> | |
|
34 | <div class="pagination-wh pagination-left"> | |
|
35 | <script type="text/javascript"> | |
|
36 | YUE.onDOMReady(function(){ | |
|
37 | YUE.delegate("journal","click",function(e, matchedEl, container){ | |
|
38 | ypjax(e.target.href,"journal",function(){show_more_event();tooltip_activate();}); | |
|
39 | YUE.preventDefault(e); | |
|
40 | },'.pager_link'); | |
|
41 | }); | |
|
42 | </script> | |
|
43 | ${c.journal_pager.pager('$link_previous ~2~ $link_next')} | |
|
44 | </div> | |
|
45 | 45 | %else: |
|
46 | ${_('No entries yet')} | |
|
46 | <div style="padding:5px 0px 10px 10px;"> | |
|
47 | ${_('No entries yet')} | |
|
48 | </div> | |
|
47 | 49 | %endif No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now