Show More
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Repositories defaults')} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 |
${_(' |
|
|
11 | ${_('defaults')} | |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | |
|
25 | 25 | <h3>${_('Repositories defaults')}</h3> |
|
26 | 26 | |
|
27 | 27 | ${h.form(url('default', id='defaults'),method='put')} |
|
28 | 28 | <div class="form"> |
|
29 | 29 | <!-- fields --> |
|
30 | 30 | |
|
31 | 31 | <div class="fields"> |
|
32 | 32 | |
|
33 | 33 | <div class="field"> |
|
34 | 34 | <div class="label"> |
|
35 | 35 | <label for="default_repo_type">${_('Type')}:</label> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="input"> |
|
38 | 38 | ${h.select('default_repo_type','hg',c.backends,class_="medium")} |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | 42 | <div class="field"> |
|
43 | 43 | <div class="label label-checkbox"> |
|
44 | 44 | <label for="default_repo_private">${_('Private repository')}:</label> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="checkboxes"> |
|
47 | 47 | ${h.checkbox('default_repo_private',value="True")} |
|
48 | 48 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
49 | 49 | </div> |
|
50 | 50 | </div> |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label label-checkbox"> |
|
55 | 55 | <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="checkboxes"> |
|
58 | 58 | ${h.checkbox('default_repo_enable_statistics',value="True")} |
|
59 | 59 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
60 | 60 | </div> |
|
61 | 61 | </div> |
|
62 | 62 | |
|
63 | 63 | <div class="field"> |
|
64 | 64 | <div class="label label-checkbox"> |
|
65 | 65 | <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="checkboxes"> |
|
68 | 68 | ${h.checkbox('default_repo_enable_downloads',value="True")} |
|
69 | 69 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | |
|
73 | 73 | <div class="field"> |
|
74 | 74 | <div class="label label-checkbox"> |
|
75 | 75 | <label for="default_repo_enable_locking">${_('Enable locking')}:</label> |
|
76 | 76 | </div> |
|
77 | 77 | <div class="checkboxes"> |
|
78 | 78 | ${h.checkbox('default_repo_enable_locking',value="True")} |
|
79 | 79 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | |
|
83 | 83 | <div class="buttons"> |
|
84 | 84 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
85 | 85 | </div> |
|
86 | 86 | </div> |
|
87 | 87 | </div> |
|
88 | 88 | ${h.end_form()} |
|
89 | 89 | |
|
90 | 90 | ##<h3>${_('Groups defaults')}</h3> |
|
91 | 91 | |
|
92 | 92 | </div> |
|
93 | 93 | </%def> |
@@ -1,95 +1,95 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('LDAP administration')} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 |
${_(' |
|
|
11 | ${_('ldap')} | |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | ${h.form(url('ldap_settings'))} |
|
25 | 25 | <div class="form"> |
|
26 | 26 | <div class="fields"> |
|
27 | 27 | |
|
28 | 28 | <h3>${_('Connection settings')}</h3> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label label-checkbox"><label for="ldap_active">${_('Enable LDAP')}</label></div> |
|
31 | 31 | <div class="checkboxes"><div class="checkbox">${h.checkbox('ldap_active',True,class_='small')}</div></div> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="field"> |
|
34 | 34 | <div class="label"><label for="ldap_host">${_('Host')}</label></div> |
|
35 | 35 | <div class="input">${h.text('ldap_host',class_='small')}</div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"><label for="ldap_port">${_('Port')}</label></div> |
|
39 | 39 | <div class="input">${h.text('ldap_port',class_='small')}</div> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="field"> |
|
42 | 42 | <div class="label"><label for="ldap_dn_user">${_('Account')}</label></div> |
|
43 | 43 | <div class="input">${h.text('ldap_dn_user',class_='small')}</div> |
|
44 | 44 | </div> |
|
45 | 45 | <div class="field"> |
|
46 | 46 | <div class="label"><label for="ldap_dn_pass">${_('Password')}</label></div> |
|
47 | 47 | <div class="input">${h.password('ldap_dn_pass',class_='small')}</div> |
|
48 | 48 | </div> |
|
49 | 49 | <div class="field"> |
|
50 | 50 | <div class="label"><label for="ldap_tls_kind">${_('Connection security')}</label></div> |
|
51 | 51 | <div class="select">${h.select('ldap_tls_kind',c.tls_kind_cur,c.tls_kind_choices,class_='small')}</div> |
|
52 | 52 | </div> |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label"><label for="ldap_tls_reqcert">${_('Certificate Checks')}</label></div> |
|
55 | 55 | <div class="select">${h.select('ldap_tls_reqcert',c.tls_reqcert_cur,c.tls_reqcert_choices,class_='small')}</div> |
|
56 | 56 | </div> |
|
57 | 57 | <h3>${_('Search settings')}</h3> |
|
58 | 58 | <div class="field"> |
|
59 | 59 | <div class="label"><label for="ldap_base_dn">${_('Base DN')}</label></div> |
|
60 | 60 | <div class="input">${h.text('ldap_base_dn',class_='small')}</div> |
|
61 | 61 | </div> |
|
62 | 62 | <div class="field"> |
|
63 | 63 | <div class="label"><label for="ldap_filter">${_('LDAP Filter')}</label></div> |
|
64 | 64 | <div class="input">${h.text('ldap_filter',class_='small')}</div> |
|
65 | 65 | </div> |
|
66 | 66 | <div class="field"> |
|
67 | 67 | <div class="label"><label for="ldap_search_scope">${_('LDAP Search Scope')}</label></div> |
|
68 | 68 | <div class="select">${h.select('ldap_search_scope',c.search_scope_cur,c.search_scope_choices,class_='small')}</div> |
|
69 | 69 | </div> |
|
70 | 70 | <h3>${_('Attribute mappings')}</h3> |
|
71 | 71 | <div class="field"> |
|
72 | 72 | <div class="label"><label for="ldap_attr_login">${_('Login Attribute')}</label></div> |
|
73 | 73 | <div class="input">${h.text('ldap_attr_login',class_='small')}</div> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label"><label for="ldap_attr_firstname">${_('First Name Attribute')}</label></div> |
|
77 | 77 | <div class="input">${h.text('ldap_attr_firstname',class_='small')}</div> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="field"> |
|
80 | 80 | <div class="label"><label for="ldap_attr_lastname">${_('Last Name Attribute')}</label></div> |
|
81 | 81 | <div class="input">${h.text('ldap_attr_lastname',class_='small')}</div> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label"><label for="ldap_attr_email">${_('E-mail Attribute')}</label></div> |
|
85 | 85 | <div class="input">${h.text('ldap_attr_email',class_='small')}</div> |
|
86 | 86 | </div> |
|
87 | 87 | |
|
88 | 88 | <div class="buttons"> |
|
89 | 89 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | ${h.end_form()} |
|
94 | 94 | </div> |
|
95 | 95 | </%def> |
@@ -1,215 +1,215 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Permissions administration')} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_('Admin'),h.url('admin_home'))} |
|
10 | 10 | » |
|
11 |
${_(' |
|
|
11 | ${_('permissions')} | |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('admin')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | <div class="box box-left"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <h3>${_('Default permissions')}</h3> |
|
25 | 25 | ${h.form(url('permission', id='default'),method='put')} |
|
26 | 26 | <div class="form"> |
|
27 | 27 | <!-- fields --> |
|
28 | 28 | <div class="fields"> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label label-checkbox"> |
|
31 | 31 | <label for="anonymous">${_('Anonymous access')}:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="checkboxes"> |
|
34 | 34 | <div class="checkbox"> |
|
35 | 35 | ${h.checkbox('anonymous',True)} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label"> |
|
41 | 41 | <label for="default_repo_perm">${_('Repository')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="select"> |
|
44 | 44 | ${h.select('default_repo_perm','',c.repo_perms_choices)} |
|
45 | 45 | |
|
46 | 46 | ${h.checkbox('overwrite_default_repo','true')} |
|
47 | 47 | <label for="overwrite_default_repo"> |
|
48 | 48 | <span class="tooltip" |
|
49 | 49 | title="${h.tooltip(_('All default permissions on each repository will be reset to choosen permission, note that all custom default permission on repositories will be lost'))}"> |
|
50 | 50 | ${_('overwrite existing settings')}</span> </label> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label"> |
|
55 | 55 | <label for="default_group_perm">${_('Repository group')}:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="select"> |
|
58 | 58 | ${h.select('default_group_perm','',c.group_perms_choices)} |
|
59 | 59 | ${h.checkbox('overwrite_default_group','true')} |
|
60 | 60 | <label for="overwrite_default_group"> |
|
61 | 61 | <span class="tooltip" |
|
62 | 62 | title="${h.tooltip(_('All default permissions on each repository group will be reset to choosen permission, note that all custom default permission on repositories group will be lost'))}"> |
|
63 | 63 | ${_('overwrite existing settings')}</span> </label> |
|
64 | 64 | |
|
65 | 65 | </div> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="field"> |
|
68 | 68 | <div class="label"> |
|
69 | 69 | <label for="default_register">${_('Registration')}:</label> |
|
70 | 70 | </div> |
|
71 | 71 | <div class="select"> |
|
72 | 72 | ${h.select('default_register','',c.register_choices)} |
|
73 | 73 | </div> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label"> |
|
77 | 77 | <label for="default_create">${_('Repository creation')}:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="select"> |
|
80 | 80 | ${h.select('default_create','',c.create_choices)} |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label"> |
|
85 | 85 | <label for="default_fork">${_('Repository forking')}:</label> |
|
86 | 86 | </div> |
|
87 | 87 | <div class="select"> |
|
88 | 88 | ${h.select('default_fork','',c.fork_choices)} |
|
89 | 89 | </div> |
|
90 | 90 | </div> |
|
91 | 91 | <div class="buttons"> |
|
92 | 92 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
93 | 93 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | ${h.end_form()} |
|
98 | 98 | </div> |
|
99 | 99 | |
|
100 | 100 | <div style="min-height:780px" class="box box-right"> |
|
101 | 101 | <!-- box / title --> |
|
102 | 102 | <div class="title"> |
|
103 | 103 | <h5>${_('Default User Permissions')}</h5> |
|
104 | 104 | </div> |
|
105 | 105 | |
|
106 | 106 | ## permissions overview |
|
107 | 107 | <div id="perms" class="table"> |
|
108 | 108 | %for section in sorted(c.perm_user.permissions.keys()): |
|
109 | 109 | <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> |
|
110 | 110 | %if not c.perm_user.permissions[section]: |
|
111 | 111 | <span class="empty_data">${_('Nothing here yet')}</span> |
|
112 | 112 | %else: |
|
113 | 113 | <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
|
114 | 114 | <table id="tbl_list_${section}"> |
|
115 | 115 | <thead> |
|
116 | 116 | <tr> |
|
117 | 117 | <th class="left">${_('Name')}</th> |
|
118 | 118 | <th class="left">${_('Permission')}</th> |
|
119 | 119 | <th class="left">${_('Edit Permission')}</th> |
|
120 | 120 | </thead> |
|
121 | 121 | <tbody> |
|
122 | 122 | %for k in c.perm_user.permissions[section]: |
|
123 | 123 | <% |
|
124 | 124 | if section != 'global': |
|
125 | 125 | section_perm = c.perm_user.permissions[section].get(k) |
|
126 | 126 | _perm = section_perm.split('.')[-1] |
|
127 | 127 | else: |
|
128 | 128 | _perm = section_perm = None |
|
129 | 129 | %> |
|
130 | 130 | <tr> |
|
131 | 131 | <td> |
|
132 | 132 | %if section == 'repositories': |
|
133 | 133 | <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
|
134 | 134 | %elif section == 'repositories_groups': |
|
135 | 135 | <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
|
136 | 136 | %else: |
|
137 | 137 | ${h.get_permission_name(k)} |
|
138 | 138 | %endif |
|
139 | 139 | </td> |
|
140 | 140 | <td> |
|
141 | 141 | %if section == 'global': |
|
142 | 142 | ${h.bool2icon(k.split('.')[-1] != 'none')} |
|
143 | 143 | %else: |
|
144 | 144 | <span class="perm_tag ${_perm}">${section_perm}</span> |
|
145 | 145 | %endif |
|
146 | 146 | </td> |
|
147 | 147 | <td> |
|
148 | 148 | %if section == 'repositories': |
|
149 | 149 | <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
150 | 150 | %elif section == 'repositories_groups': |
|
151 | 151 | <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
152 | 152 | %else: |
|
153 | 153 | -- |
|
154 | 154 | %endif |
|
155 | 155 | </td> |
|
156 | 156 | </tr> |
|
157 | 157 | %endfor |
|
158 | 158 | </tbody> |
|
159 | 159 | </table> |
|
160 | 160 | </div> |
|
161 | 161 | %endif |
|
162 | 162 | %endfor |
|
163 | 163 | </div> |
|
164 | 164 | </div> |
|
165 | 165 | <div class="box box-left" style="clear:left"> |
|
166 | 166 | <!-- box / title --> |
|
167 | 167 | <div class="title"> |
|
168 | 168 | <h5>${_('Allowed IP addresses')}</h5> |
|
169 | 169 | </div> |
|
170 | 170 | |
|
171 | 171 | <div class="ips_wrap"> |
|
172 | 172 | <table class="noborder"> |
|
173 | 173 | %if c.user_ip_map: |
|
174 | 174 | %for ip in c.user_ip_map: |
|
175 | 175 | <tr> |
|
176 | 176 | <td><div class="ip">${ip.ip_addr}</div></td> |
|
177 | 177 | <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td> |
|
178 | 178 | <td> |
|
179 | 179 | ${h.form(url('user_ips_delete', id=c.user.user_id),method='delete')} |
|
180 | 180 | ${h.hidden('del_ip',ip.ip_id)} |
|
181 | 181 | ${h.hidden('default_user', 'True')} |
|
182 | 182 | ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id, |
|
183 | 183 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")} |
|
184 | 184 | ${h.end_form()} |
|
185 | 185 | </td> |
|
186 | 186 | </tr> |
|
187 | 187 | %endfor |
|
188 | 188 | %else: |
|
189 | 189 | <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr> |
|
190 | 190 | %endif |
|
191 | 191 | </table> |
|
192 | 192 | </div> |
|
193 | 193 | |
|
194 | 194 | ${h.form(url('user_ips', id=c.user.user_id),method='put')} |
|
195 | 195 | <div class="form"> |
|
196 | 196 | <!-- fields --> |
|
197 | 197 | <div class="fields"> |
|
198 | 198 | <div class="field"> |
|
199 | 199 | <div class="label"> |
|
200 | 200 | <label for="new_ip">${_('New ip address')}:</label> |
|
201 | 201 | </div> |
|
202 | 202 | <div class="input"> |
|
203 | 203 | ${h.hidden('default_user', 'True')} |
|
204 | 204 | ${h.text('new_ip', class_='medium')} |
|
205 | 205 | </div> |
|
206 | 206 | </div> |
|
207 | 207 | <div class="buttons"> |
|
208 | 208 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
209 | 209 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
210 | 210 | </div> |
|
211 | 211 | </div> |
|
212 | 212 | </div> |
|
213 | 213 | ${h.end_form()} |
|
214 | 214 | </div> |
|
215 | 215 | </%def> |
@@ -1,373 +1,373 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Edit repository')} ${c.repo_info.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | 12 | » |
|
13 | 13 | ${_('edit')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('options')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box box-left"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
27 | 27 | <div class="form"> |
|
28 | 28 | <!-- fields --> |
|
29 | 29 | <div class="fields"> |
|
30 | 30 | <div class="field"> |
|
31 | 31 | <div class="label"> |
|
32 | 32 | <label for="repo_name">${_('Name')}:</label> |
|
33 | 33 | </div> |
|
34 | 34 | <div class="input"> |
|
35 | 35 | ${h.text('repo_name',class_="medium")} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | <div class="field"> |
|
39 | 39 | <div class="label"> |
|
40 | 40 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
41 | 41 | </div> |
|
42 | 42 | <div class="input"> |
|
43 | 43 | ${h.text('clone_uri',class_="medium")} |
|
44 | 44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | <div class="field"> |
|
48 | 48 | <div class="label"> |
|
49 | 49 | <label for="repo_group">${_('Repository group')}:</label> |
|
50 | 50 | </div> |
|
51 | 51 | <div class="input"> |
|
52 | 52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
53 | 53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
54 | 54 | </div> |
|
55 | 55 | </div> |
|
56 | 56 | <div class="field"> |
|
57 | 57 | <div class="label"> |
|
58 | 58 | <label for="repo_type">${_('Type')}:</label> |
|
59 | 59 | </div> |
|
60 | 60 | <div class="input"> |
|
61 | 61 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | <div class="field"> |
|
65 | 65 | <div class="label"> |
|
66 | 66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="input"> |
|
69 | 69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
70 | 70 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
71 | 71 | </div> |
|
72 | 72 | </div> |
|
73 | 73 | <div class="field"> |
|
74 | 74 | <div class="label label-textarea"> |
|
75 | 75 | <label for="repo_description">${_('Description')}:</label> |
|
76 | 76 | </div> |
|
77 | 77 | <div class="textarea text-area editor"> |
|
78 | 78 | ${h.textarea('repo_description')} |
|
79 | 79 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | |
|
83 | 83 | <div class="field"> |
|
84 | 84 | <div class="label label-checkbox"> |
|
85 | 85 | <label for="repo_private">${_('Private repository')}:</label> |
|
86 | 86 | </div> |
|
87 | 87 | <div class="checkboxes"> |
|
88 | 88 | ${h.checkbox('repo_private',value="True")} |
|
89 | 89 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | <div class="field"> |
|
93 | 93 | <div class="label label-checkbox"> |
|
94 | 94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
95 | 95 | </div> |
|
96 | 96 | <div class="checkboxes"> |
|
97 | 97 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
98 | 98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
99 | 99 | </div> |
|
100 | 100 | </div> |
|
101 | 101 | <div class="field"> |
|
102 | 102 | <div class="label label-checkbox"> |
|
103 | 103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
104 | 104 | </div> |
|
105 | 105 | <div class="checkboxes"> |
|
106 | 106 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
107 | 107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
108 | 108 | </div> |
|
109 | 109 | </div> |
|
110 | 110 | <div class="field"> |
|
111 | 111 | <div class="label label-checkbox"> |
|
112 | 112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
113 | 113 | </div> |
|
114 | 114 | <div class="checkboxes"> |
|
115 | 115 | ${h.checkbox('repo_enable_locking',value="True")} |
|
116 | 116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
117 | 117 | </div> |
|
118 | 118 | </div> |
|
119 | 119 | <div class="field"> |
|
120 | 120 | <div class="label"> |
|
121 | 121 | <label for="user">${_('Owner')}:</label> |
|
122 | 122 | </div> |
|
123 | 123 | <div class="input input-medium ac"> |
|
124 | 124 | <div class="perm_ac"> |
|
125 | 125 | ${h.text('user',class_='yui-ac-input')} |
|
126 | 126 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
127 | 127 | <div id="owner_container"></div> |
|
128 | 128 | </div> |
|
129 | 129 | </div> |
|
130 | 130 | </div> |
|
131 | 131 | %if c.visual.repository_fields: |
|
132 | 132 | ## EXTRA FIELDS |
|
133 | 133 | %for field in c.repo_fields: |
|
134 | 134 | <div class="field"> |
|
135 | 135 | <div class="label"> |
|
136 | 136 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
137 | 137 | </div> |
|
138 | 138 | <div class="input input-medium"> |
|
139 | 139 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
140 | 140 | %if field.field_desc: |
|
141 | 141 | <span class="help-block">${field.field_desc}</span> |
|
142 | 142 | %endif |
|
143 | 143 | </div> |
|
144 | 144 | </div> |
|
145 | 145 | %endfor |
|
146 | 146 | %endif |
|
147 | 147 | <div class="field"> |
|
148 | 148 | <div class="label"> |
|
149 | 149 | <label for="input">${_('Permissions')}:</label> |
|
150 | 150 | </div> |
|
151 | 151 | <div class="input"> |
|
152 | 152 | <%include file="repo_edit_perms.html"/> |
|
153 | 153 | </div> |
|
154 | 154 | |
|
155 | 155 | <div class="buttons"> |
|
156 | 156 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
157 | 157 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
158 | 158 | </div> |
|
159 | 159 | </div> |
|
160 | 160 | </div> |
|
161 | 161 | </div> |
|
162 | 162 | ${h.end_form()} |
|
163 | 163 | </div> |
|
164 | 164 | |
|
165 | 165 | <div class="box box-right"> |
|
166 | 166 | <div class="title"> |
|
167 | 167 | <h5>${_('Administration')}</h5> |
|
168 | 168 | </div> |
|
169 | 169 | |
|
170 | 170 | <h3>${_('Statistics')}</h3> |
|
171 | 171 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} |
|
172 | 172 | <div class="form"> |
|
173 | 173 | <div class="fields"> |
|
174 | 174 | ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")} |
|
175 | 175 | <div class="field" style="border:none;color:#888"> |
|
176 | 176 | <ul> |
|
177 | 177 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> |
|
178 | 178 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
179 | 179 | </ul> |
|
180 | 180 | </div> |
|
181 | 181 | </div> |
|
182 | 182 | </div> |
|
183 | 183 | ${h.end_form()} |
|
184 | 184 | |
|
185 | 185 | %if c.repo_info.clone_uri: |
|
186 | 186 | <h3>${_('Remote')}</h3> |
|
187 | 187 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} |
|
188 | 188 | <div class="form"> |
|
189 | 189 | <div class="fields"> |
|
190 | 190 | ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")} |
|
191 | 191 | <div class="field" style="border:none"> |
|
192 | 192 | <ul> |
|
193 | 193 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> |
|
194 | 194 | </ul> |
|
195 | 195 | </div> |
|
196 | 196 | </div> |
|
197 | 197 | </div> |
|
198 | 198 | ${h.end_form()} |
|
199 | 199 | %endif |
|
200 | 200 | |
|
201 | 201 | <h3>${_('Cache')}</h3> |
|
202 | 202 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} |
|
203 | 203 | <div class="form"> |
|
204 | 204 | <div class="fields"> |
|
205 | 205 | ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")} |
|
206 | 206 | <div class="field" style="border:none;color:#888"> |
|
207 | 207 | <ul> |
|
208 | 208 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} |
|
209 | 209 | </li> |
|
210 | 210 | </ul> |
|
211 | 211 | </div> |
|
212 | 212 | <div class="field" style="border:none;"> |
|
213 | 213 | ${_('List of cached values')} |
|
214 | 214 | <table> |
|
215 | 215 | <tr> |
|
216 | 216 | <th>${_('Prefix')}</th> |
|
217 | 217 | <th>${_('Key')}</th> |
|
218 | 218 | <th>${_('Active')}</th> |
|
219 | 219 | </tr> |
|
220 | 220 | %for cache in c.repo_info.cache_keys: |
|
221 | 221 | <tr> |
|
222 | 222 | <td>${cache.prefix or '-'}</td> |
|
223 | 223 | <td>${cache.cache_key}</td> |
|
224 | 224 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
225 | 225 | </tr> |
|
226 | 226 | %endfor |
|
227 | 227 | </table> |
|
228 | 228 | </div> |
|
229 | 229 | </div> |
|
230 | 230 | </div> |
|
231 | 231 | ${h.end_form()} |
|
232 | 232 | |
|
233 | 233 | <h3>${_('Public journal')}</h3> |
|
234 | 234 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} |
|
235 | 235 | <div class="form"> |
|
236 | 236 | ${h.hidden('auth_token',str(h.get_token()))} |
|
237 | 237 | <div class="field"> |
|
238 | 238 | %if c.in_public_journal: |
|
239 | 239 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} |
|
240 | 240 | %else: |
|
241 | 241 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} |
|
242 | 242 | %endif |
|
243 | 243 | </div> |
|
244 | 244 | <div class="field" style="border:none;color:#888"> |
|
245 | 245 | <ul> |
|
246 | 246 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} |
|
247 | 247 | </li> |
|
248 | 248 | </ul> |
|
249 | 249 | </div> |
|
250 | 250 | </div> |
|
251 | 251 | ${h.end_form()} |
|
252 | 252 | |
|
253 | 253 | <h3>${_('Locking')}</h3> |
|
254 | 254 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} |
|
255 | 255 | <div class="form"> |
|
256 | 256 | <div class="fields"> |
|
257 | 257 | %if c.repo_info.locked[0]: |
|
258 | 258 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} |
|
259 | 259 | ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))} |
|
260 | 260 | %else: |
|
261 | 261 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} |
|
262 | 262 | ${_('Repository is not locked')} |
|
263 | 263 | %endif |
|
264 | 264 | </div> |
|
265 | 265 | <div class="field" style="border:none;color:#888"> |
|
266 | 266 | <ul> |
|
267 | 267 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} |
|
268 | 268 | </li> |
|
269 | 269 | </ul> |
|
270 | 270 | </div> |
|
271 | 271 | </div> |
|
272 | 272 | ${h.end_form()} |
|
273 | 273 | |
|
274 | 274 | <h3>${_('Set as fork of')}</h3> |
|
275 | 275 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} |
|
276 | 276 | <div class="form"> |
|
277 | 277 | <div class="fields"> |
|
278 | 278 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
279 | 279 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} |
|
280 | 280 | </div> |
|
281 | 281 | <div class="field" style="border:none;color:#888"> |
|
282 | 282 | <ul> |
|
283 | 283 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> |
|
284 | 284 | </ul> |
|
285 | 285 | </div> |
|
286 | 286 | </div> |
|
287 | 287 | ${h.end_form()} |
|
288 | 288 | |
|
289 | 289 | <h3>${_('Delete')}</h3> |
|
290 | 290 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} |
|
291 | 291 | <div class="form"> |
|
292 | 292 | <div class="fields"> |
|
293 | 293 | ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")} |
|
294 | 294 | %if c.repo_info.forks.count(): |
|
295 | 295 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} |
|
296 | 296 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
297 | 297 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> |
|
298 | 298 | %endif |
|
299 | 299 | </div> |
|
300 | 300 | <div class="field" style="border:none;color:#888"> |
|
301 | 301 | <ul> |
|
302 | 302 | <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li> |
|
303 | 303 | </ul> |
|
304 | 304 | </div> |
|
305 | 305 | </div> |
|
306 | 306 | ${h.end_form()} |
|
307 | 307 | </div> |
|
308 | 308 | |
|
309 | 309 | ##TODO: this should be controlled by the VISUAL setting |
|
310 | 310 | %if c.visual.repository_fields: |
|
311 | 311 | <div class="box box-left" style="clear:left"> |
|
312 | 312 | <!-- box / title --> |
|
313 | 313 | <div class="title"> |
|
314 | 314 | <h5>${_('Extra fields')}</h5> |
|
315 | 315 | </div> |
|
316 | 316 | |
|
317 | 317 | <div class="emails_wrap"> |
|
318 | 318 | <table class="noborder"> |
|
319 | 319 | %for field in c.repo_fields: |
|
320 | 320 | <tr> |
|
321 | 321 | <td>${field.field_label} (${field.field_key})</td> |
|
322 | 322 | <td>${field.field_type}</td> |
|
323 | 323 | <td> |
|
324 | 324 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} |
|
325 | 325 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, |
|
326 | 326 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} |
|
327 | 327 | ${h.end_form()} |
|
328 | 328 | </td> |
|
329 | 329 | </tr> |
|
330 | 330 | %endfor |
|
331 | 331 | </table> |
|
332 | 332 | </div> |
|
333 | 333 | |
|
334 | 334 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} |
|
335 | 335 | <div class="form"> |
|
336 | 336 | <!-- fields --> |
|
337 | 337 | <div class="fields"> |
|
338 | 338 | <div class="field"> |
|
339 | 339 | <div class="label"> |
|
340 | 340 | <label for="new_field_key">${_('New field key')}:</label> |
|
341 | 341 | </div> |
|
342 | 342 | <div class="input"> |
|
343 | 343 | ${h.text('new_field_key', class_='small')} |
|
344 | 344 | </div> |
|
345 | 345 | </div> |
|
346 | 346 | <div class="field"> |
|
347 | 347 | <div class="label"> |
|
348 | 348 | <label for="new_field_label">${_('New field label')}:</label> |
|
349 | 349 | </div> |
|
350 | 350 | <div class="input"> |
|
351 | 351 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} |
|
352 | 352 | </div> |
|
353 | 353 | </div> |
|
354 | 354 | |
|
355 | 355 | <div class="field"> |
|
356 | 356 | <div class="label"> |
|
357 | 357 | <label for="new_field_desc">${_('New field description')}:</label> |
|
358 | 358 | </div> |
|
359 | 359 | <div class="input"> |
|
360 | 360 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} |
|
361 | 361 | </div> |
|
362 | 362 | </div> |
|
363 | 363 | |
|
364 | 364 | <div class="buttons"> |
|
365 | 365 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
366 | 366 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
367 | 367 | </div> |
|
368 | 368 | </div> |
|
369 | 369 | </div> |
|
370 | 370 | ${h.end_form()} |
|
371 | 371 | </div> |
|
372 | 372 | %endif |
|
373 | 373 | </%def> |
@@ -1,76 +1,78 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Repositories groups administration')} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 |
${h.link_to(_('Admin'),h.url('admin_home'))} |
|
|
10 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
|
11 | » | |
|
12 | ${_('repositories groups')} | |
|
11 | 13 | </%def> |
|
12 | 14 | <%def name="page_nav()"> |
|
13 | 15 | ${self.menu('admin')} |
|
14 | 16 | </%def> |
|
15 | 17 | <%def name="main()"> |
|
16 | 18 | <div class="box"> |
|
17 | 19 | <!-- box / title --> |
|
18 | 20 | <div class="title"> |
|
19 | 21 | ${self.breadcrumbs()} |
|
20 | 22 | <ul class="links"> |
|
21 | 23 | <li> |
|
22 | 24 | %if h.HasPermissionAny('hg.admin')(): |
|
23 | 25 | <span>${h.link_to(_(u'Add group'),h.url('new_repos_group'))}</span> |
|
24 | 26 | %endif |
|
25 | 27 | </li> |
|
26 | 28 | </ul> |
|
27 | 29 | </div> |
|
28 | 30 | <!-- end box / title --> |
|
29 | 31 | <div class="table"> |
|
30 | 32 | % if c.groups: |
|
31 | 33 | <table class="table_disp"> |
|
32 | 34 | |
|
33 | 35 | <thead> |
|
34 | 36 | <tr> |
|
35 | 37 | <th class="left"><a href="#">${_('Group name')}</a></th> |
|
36 | 38 | <th class="left"><a href="#">${_('Description')}</a></th> |
|
37 | 39 | <th class="left"><a href="#">${_('Number of toplevel repositories')}</a></th> |
|
38 | 40 | <th class="left" colspan="2">${_('action')}</th> |
|
39 | 41 | </tr> |
|
40 | 42 | </thead> |
|
41 | 43 | |
|
42 | 44 | ## REPO GROUPS |
|
43 | 45 | |
|
44 | 46 | % for gr in c.groups: |
|
45 | 47 | <% gr_cn = gr.repositories.count() %> |
|
46 | 48 | <tr> |
|
47 | 49 | <td> |
|
48 | 50 | <div style="white-space: nowrap"> |
|
49 | 51 | <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
|
50 | 52 | ${h.link_to(h.literal(' » '.join(map(h.safe_unicode,[g.name for g in gr.parents+[gr]]))), url('repos_group_home',group_name=gr.group_name))} |
|
51 | 53 | </div> |
|
52 | 54 | </td> |
|
53 | 55 | <td>${gr.group_description}</td> |
|
54 | 56 | <td><b>${gr_cn}</b></td> |
|
55 | 57 | <td> |
|
56 | 58 | <a href="${h.url('edit_repos_group',group_name=gr.group_name)}" title="${_('edit')}"> |
|
57 | 59 | ${h.submit('edit_%s' % gr.group_name,_('edit'),class_="edit_icon action_button")} |
|
58 | 60 | </a> |
|
59 | 61 | </td> |
|
60 | 62 | <td> |
|
61 | 63 | ${h.form(url('repos_group', group_name=gr.group_name),method='delete')} |
|
62 | 64 | ${h.submit('remove_%s' % gr.name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_cn) % (gr.name,gr_cn)+"');")} |
|
63 | 65 | ${h.end_form()} |
|
64 | 66 | </td> |
|
65 | 67 | </tr> |
|
66 | 68 | % endfor |
|
67 | 69 | |
|
68 | 70 | </table> |
|
69 | 71 | % else: |
|
70 | 72 | ${_('There are no repositories groups yet')} |
|
71 | 73 | % endif |
|
72 | 74 | |
|
73 | 75 | </div> |
|
74 | 76 | </div> |
|
75 | 77 | |
|
76 | 78 | </%def> |
@@ -1,344 +1,346 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Settings administration')} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 |
${h.link_to(_('Admin'),h.url('admin_home'))} |
|
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
|
10 | » | |
|
11 | ${_('settings')} | |
|
10 | 12 | </%def> |
|
11 | 13 | |
|
12 | 14 | <%def name="page_nav()"> |
|
13 | 15 | ${self.menu('admin')} |
|
14 | 16 | </%def> |
|
15 | 17 | |
|
16 | 18 | <%def name="main()"> |
|
17 | 19 | <div class="box"> |
|
18 | 20 | <!-- box / title --> |
|
19 | 21 | <div class="title"> |
|
20 | 22 | ${self.breadcrumbs()} |
|
21 | 23 | </div> |
|
22 | 24 | <!-- end box / title --> |
|
23 | 25 | |
|
24 | 26 | <h3>${_('Remap and rescan repositories')}</h3> |
|
25 | 27 | ${h.form(url('admin_setting', setting_id='mapping'),method='put')} |
|
26 | 28 | <div class="form"> |
|
27 | 29 | <!-- fields --> |
|
28 | 30 | |
|
29 | 31 | <div class="fields"> |
|
30 | 32 | <div class="field"> |
|
31 | 33 | <div class="label label-checkbox"> |
|
32 | 34 | <label for="destroy">${_('rescan option')}:</label> |
|
33 | 35 | </div> |
|
34 | 36 | <div class="checkboxes"> |
|
35 | 37 | <div class="checkbox"> |
|
36 | 38 | ${h.checkbox('destroy',True)} |
|
37 | 39 | <label for="destroy"> |
|
38 | 40 | <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}"> |
|
39 | 41 | ${_('destroy old data')}</span> </label> |
|
40 | 42 | </div> |
|
41 | 43 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> |
|
42 | 44 | </div> |
|
43 | 45 | </div> |
|
44 | 46 | |
|
45 | 47 | <div class="buttons"> |
|
46 | 48 | ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")} |
|
47 | 49 | </div> |
|
48 | 50 | </div> |
|
49 | 51 | </div> |
|
50 | 52 | ${h.end_form()} |
|
51 | 53 | |
|
52 | 54 | <h3>${_('Whoosh indexing')}</h3> |
|
53 | 55 | ${h.form(url('admin_setting', setting_id='whoosh'),method='put')} |
|
54 | 56 | <div class="form"> |
|
55 | 57 | <!-- fields --> |
|
56 | 58 | |
|
57 | 59 | <div class="fields"> |
|
58 | 60 | <div class="field"> |
|
59 | 61 | <div class="label label-checkbox"> |
|
60 | 62 | <label>${_('index build option')}:</label> |
|
61 | 63 | </div> |
|
62 | 64 | <div class="checkboxes"> |
|
63 | 65 | <div class="checkbox"> |
|
64 | 66 | ${h.checkbox('full_index',True)} |
|
65 | 67 | <label for="full_index">${_('build from scratch')}</label> |
|
66 | 68 | </div> |
|
67 | 69 | </div> |
|
68 | 70 | </div> |
|
69 | 71 | |
|
70 | 72 | <div class="buttons"> |
|
71 | 73 | ${h.submit('reindex',_('Reindex'),class_="ui-btn large")} |
|
72 | 74 | </div> |
|
73 | 75 | </div> |
|
74 | 76 | </div> |
|
75 | 77 | ${h.end_form()} |
|
76 | 78 | |
|
77 | 79 | <h3>${_('Global application settings')}</h3> |
|
78 | 80 | ${h.form(url('admin_setting', setting_id='global'),method='put')} |
|
79 | 81 | <div class="form"> |
|
80 | 82 | <!-- fields --> |
|
81 | 83 | |
|
82 | 84 | <div class="fields"> |
|
83 | 85 | |
|
84 | 86 | <div class="field"> |
|
85 | 87 | <div class="label"> |
|
86 | 88 | <label for="rhodecode_title">${_('Application name')}:</label> |
|
87 | 89 | </div> |
|
88 | 90 | <div class="input"> |
|
89 | 91 | ${h.text('rhodecode_title',size=30)} |
|
90 | 92 | </div> |
|
91 | 93 | </div> |
|
92 | 94 | |
|
93 | 95 | <div class="field"> |
|
94 | 96 | <div class="label"> |
|
95 | 97 | <label for="rhodecode_realm">${_('Realm text')}:</label> |
|
96 | 98 | </div> |
|
97 | 99 | <div class="input"> |
|
98 | 100 | ${h.text('rhodecode_realm',size=30)} |
|
99 | 101 | </div> |
|
100 | 102 | </div> |
|
101 | 103 | |
|
102 | 104 | <div class="field"> |
|
103 | 105 | <div class="label"> |
|
104 | 106 | <label for="rhodecode_ga_code">${_('GA code')}:</label> |
|
105 | 107 | </div> |
|
106 | 108 | <div class="input"> |
|
107 | 109 | ${h.text('rhodecode_ga_code',size=30)} |
|
108 | 110 | </div> |
|
109 | 111 | </div> |
|
110 | 112 | |
|
111 | 113 | <div class="buttons"> |
|
112 | 114 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
113 | 115 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
114 | 116 | </div> |
|
115 | 117 | </div> |
|
116 | 118 | </div> |
|
117 | 119 | ${h.end_form()} |
|
118 | 120 | |
|
119 | 121 | <h3>${_('Visualisation settings')}</h3> |
|
120 | 122 | ${h.form(url('admin_setting', setting_id='visual'),method='put')} |
|
121 | 123 | <div class="form"> |
|
122 | 124 | <!-- fields --> |
|
123 | 125 | |
|
124 | 126 | <div class="fields"> |
|
125 | 127 | <div class="field"> |
|
126 | 128 | <div class="label label-checkbox"> |
|
127 | 129 | <label>${_('General')}:</label> |
|
128 | 130 | </div> |
|
129 | 131 | <div class="checkboxes"> |
|
130 | 132 | <div class="checkbox"> |
|
131 | 133 | ${h.checkbox('rhodecode_lightweight_dashboard','True')} |
|
132 | 134 | <label for="rhodecode_lightweight_dashboard">${_('Use lightweight dashboard')}</label> |
|
133 | 135 | </div> |
|
134 | 136 | </div> |
|
135 | 137 | <div class="checkboxes"> |
|
136 | 138 | <div class="checkbox"> |
|
137 | 139 | ${h.checkbox('rhodecode_repository_fields','True')} |
|
138 | 140 | <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label> |
|
139 | 141 | </div> |
|
140 | 142 | </div> |
|
141 | 143 | </div> |
|
142 | 144 | |
|
143 | 145 | <div class="field"> |
|
144 | 146 | <div class="label label-checkbox"> |
|
145 | 147 | <label>${_('Icons')}:</label> |
|
146 | 148 | </div> |
|
147 | 149 | <div class="checkboxes"> |
|
148 | 150 | <div class="checkbox"> |
|
149 | 151 | ${h.checkbox('rhodecode_show_public_icon','True')} |
|
150 | 152 | <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label> |
|
151 | 153 | </div> |
|
152 | 154 | <div class="checkbox"> |
|
153 | 155 | ${h.checkbox('rhodecode_show_private_icon','True')} |
|
154 | 156 | <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label> |
|
155 | 157 | </div> |
|
156 | 158 | </div> |
|
157 | 159 | </div> |
|
158 | 160 | |
|
159 | 161 | <div class="field"> |
|
160 | 162 | <div class="label label-checkbox"> |
|
161 | 163 | <label>${_('Meta-Tagging')}:</label> |
|
162 | 164 | </div> |
|
163 | 165 | <div class="checkboxes"> |
|
164 | 166 | <div class="checkbox"> |
|
165 | 167 | ${h.checkbox('rhodecode_stylify_metatags','True')} |
|
166 | 168 | <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label> |
|
167 | 169 | </div> |
|
168 | 170 | <div style="padding-left: 20px;"> |
|
169 | 171 | <ul> <!-- Fix style here --> |
|
170 | 172 | <li>[featured] <span class="metatag" tag="featured">featured</span></li> |
|
171 | 173 | <li>[stale] <span class="metatag" tag="stale">stale</span></li> |
|
172 | 174 | <li>[dead] <span class="metatag" tag="dead">dead</span></li> |
|
173 | 175 | <li>[lang => lang] <span class="metatag" tag="lang" >lang</span></li> |
|
174 | 176 | <li>[license => License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li> |
|
175 | 177 | <li>[requires => Repo] <span class="metatag" tag="requires" >requires => <a href="#" >Repo</a></span></li> |
|
176 | 178 | <li>[recommends => Repo] <span class="metatag" tag="recommends" >recommends => <a href="#" >Repo</a></span></li> |
|
177 | 179 | <li>[see => URI] <span class="metatag" tag="see">see => <a href="#">URI</a> </span></li> |
|
178 | 180 | </ul> |
|
179 | 181 | </div> |
|
180 | 182 | </div> |
|
181 | 183 | </div> |
|
182 | 184 | |
|
183 | 185 | <div class="buttons"> |
|
184 | 186 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
185 | 187 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
186 | 188 | </div> |
|
187 | 189 | |
|
188 | 190 | </div> |
|
189 | 191 | </div> |
|
190 | 192 | ${h.end_form()} |
|
191 | 193 | |
|
192 | 194 | |
|
193 | 195 | <h3>${_('VCS settings')}</h3> |
|
194 | 196 | ${h.form(url('admin_setting', setting_id='vcs'),method='put')} |
|
195 | 197 | <div class="form"> |
|
196 | 198 | <!-- fields --> |
|
197 | 199 | |
|
198 | 200 | <div class="fields"> |
|
199 | 201 | |
|
200 | 202 | <div class="field"> |
|
201 | 203 | <div class="label label-checkbox"> |
|
202 | 204 | <label>${_('Web')}:</label> |
|
203 | 205 | </div> |
|
204 | 206 | <div class="checkboxes"> |
|
205 | 207 | <div class="checkbox"> |
|
206 | 208 | ${h.checkbox('web_push_ssl', 'True')} |
|
207 | 209 | <label for="web_push_ssl">${_('require ssl for vcs operations')}</label> |
|
208 | 210 | </div> |
|
209 | 211 | <span class="help-block">${_('RhodeCode will require SSL for pushing or pulling. If SSL is missing it will return HTTP Error 406: Not Acceptable')}</span> |
|
210 | 212 | </div> |
|
211 | 213 | </div> |
|
212 | 214 | |
|
213 | 215 | <div class="field"> |
|
214 | 216 | <div class="label label-checkbox"> |
|
215 | 217 | <label>${_('Hooks')}:</label> |
|
216 | 218 | </div> |
|
217 | 219 | <div class="checkboxes"> |
|
218 | 220 | <div class="checkbox"> |
|
219 | 221 | ${h.checkbox('hooks_changegroup_update','True')} |
|
220 | 222 | <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label> |
|
221 | 223 | </div> |
|
222 | 224 | <div class="checkbox"> |
|
223 | 225 | ${h.checkbox('hooks_changegroup_repo_size','True')} |
|
224 | 226 | <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label> |
|
225 | 227 | </div> |
|
226 | 228 | <div class="checkbox"> |
|
227 | 229 | ${h.checkbox('hooks_changegroup_push_logger','True')} |
|
228 | 230 | <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label> |
|
229 | 231 | </div> |
|
230 | 232 | <div class="checkbox"> |
|
231 | 233 | ${h.checkbox('hooks_outgoing_pull_logger','True')} |
|
232 | 234 | <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label> |
|
233 | 235 | </div> |
|
234 | 236 | </div> |
|
235 | 237 | <div class="input" style="margin-top:10px"> |
|
236 | 238 | ${h.link_to(_('advanced setup'),url('admin_edit_setting',setting_id='hooks'),class_="ui-btn")} |
|
237 | 239 | </div> |
|
238 | 240 | </div> |
|
239 | 241 | <div class="field"> |
|
240 | 242 | <div class="label label-checkbox"> |
|
241 | 243 | <label>${_('Mercurial Extensions')}:</label> |
|
242 | 244 | </div> |
|
243 | 245 | <div class="checkboxes"> |
|
244 | 246 | <div class="checkbox"> |
|
245 | 247 | ${h.checkbox('extensions_largefiles','True')} |
|
246 | 248 | <label for="extensions_hgsubversion">${_('largefiles extensions')}</label> |
|
247 | 249 | </div> |
|
248 | 250 | <div class="checkbox"> |
|
249 | 251 | ${h.checkbox('extensions_hgsubversion','True')} |
|
250 | 252 | <label for="extensions_hgsubversion">${_('hgsubversion extensions')}</label> |
|
251 | 253 | </div> |
|
252 | 254 | <span class="help-block">${_('Requires hgsubversion library installed. Allows clonning from svn remote locations')}</span> |
|
253 | 255 | ##<div class="checkbox"> |
|
254 | 256 | ## ${h.checkbox('extensions_hggit','True')} |
|
255 | 257 | ## <label for="extensions_hggit">${_('hg-git extensions')}</label> |
|
256 | 258 | ##</div> |
|
257 | 259 | ##<span class="help-block">${_('Requires hg-git library installed. Allows clonning from git remote locations')}</span> |
|
258 | 260 | </div> |
|
259 | 261 | </div> |
|
260 | 262 | <div class="field"> |
|
261 | 263 | <div class="label"> |
|
262 | 264 | <label for="paths_root_path">${_('Repositories location')}:</label> |
|
263 | 265 | </div> |
|
264 | 266 | <div class="input"> |
|
265 | 267 | ${h.text('paths_root_path',size=30,readonly="readonly")} |
|
266 | 268 | <span id="path_unlock" class="tooltip" |
|
267 | 269 | title="${h.tooltip(_('This a crucial application setting. If you are really sure you need to change this, you must restart application in order to make this setting take effect. Click this label to unlock.'))}"> |
|
268 | 270 | ${_('unlock')}</span> |
|
269 | 271 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> |
|
270 | 272 | </div> |
|
271 | 273 | </div> |
|
272 | 274 | |
|
273 | 275 | <div class="buttons"> |
|
274 | 276 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
275 | 277 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
276 | 278 | </div> |
|
277 | 279 | </div> |
|
278 | 280 | </div> |
|
279 | 281 | ${h.end_form()} |
|
280 | 282 | |
|
281 | 283 | <script type="text/javascript"> |
|
282 | 284 | YAHOO.util.Event.onDOMReady(function(){ |
|
283 | 285 | YAHOO.util.Event.addListener('path_unlock','click',function(){ |
|
284 | 286 | YAHOO.util.Dom.get('paths_root_path').removeAttribute('readonly'); |
|
285 | 287 | }); |
|
286 | 288 | }); |
|
287 | 289 | </script> |
|
288 | 290 | |
|
289 | 291 | <h3>${_('Test Email')}</h3> |
|
290 | 292 | ${h.form(url('admin_setting', setting_id='email'),method='put')} |
|
291 | 293 | <div class="form"> |
|
292 | 294 | <!-- fields --> |
|
293 | 295 | |
|
294 | 296 | <div class="fields"> |
|
295 | 297 | <div class="field"> |
|
296 | 298 | <div class="label"> |
|
297 | 299 | <label for="test_email">${_('Email to')}:</label> |
|
298 | 300 | </div> |
|
299 | 301 | <div class="input"> |
|
300 | 302 | ${h.text('test_email',size=30)} |
|
301 | 303 | </div> |
|
302 | 304 | </div> |
|
303 | 305 | |
|
304 | 306 | <div class="buttons"> |
|
305 | 307 | ${h.submit('send',_('Send'),class_="ui-btn large")} |
|
306 | 308 | </div> |
|
307 | 309 | </div> |
|
308 | 310 | </div> |
|
309 | 311 | ${h.end_form()} |
|
310 | 312 | |
|
311 | 313 | <h3>${_('System Info and Packages')}</h3> |
|
312 | 314 | <div class="form"> |
|
313 | 315 | <div> |
|
314 | 316 | <h5 id="expand_modules" style="cursor: pointer">↓ ${_('show')} ↓</h5> |
|
315 | 317 | </div> |
|
316 | 318 | <div id="expand_modules_table" style="display:none"> |
|
317 | 319 | <h5>Python - ${c.py_version}</h5> |
|
318 | 320 | <h5>System - ${c.platform}</h5> |
|
319 | 321 | |
|
320 | 322 | <table class="table" style="margin:0px 0px 0px 20px"> |
|
321 | 323 | <colgroup> |
|
322 | 324 | <col style="width:220px"> |
|
323 | 325 | </colgroup> |
|
324 | 326 | <tbody> |
|
325 | 327 | %for key, value in c.modules: |
|
326 | 328 | <tr> |
|
327 | 329 | <th style="text-align: right;padding-right:5px;">${key}</th> |
|
328 | 330 | <td>${value}</td> |
|
329 | 331 | </tr> |
|
330 | 332 | %endfor |
|
331 | 333 | </tbody> |
|
332 | 334 | </table> |
|
333 | 335 | </div> |
|
334 | 336 | </div> |
|
335 | 337 | |
|
336 | 338 | <script type="text/javascript"> |
|
337 | 339 | YUE.on('expand_modules','click',function(e){ |
|
338 | 340 | YUD.setStyle('expand_modules_table','display',''); |
|
339 | 341 | YUD.setStyle('expand_modules','display','none'); |
|
340 | 342 | }) |
|
341 | 343 | </script> |
|
342 | 344 | |
|
343 | 345 | </div> |
|
344 | 346 | </%def> |
@@ -1,53 +1,55 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Users groups administration')} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 |
${h.link_to(_('Admin'),h.url('admin_home'))} |
|
|
9 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |
|
10 | » | |
|
11 | ${_('users groups')} | |
|
10 | 12 | </%def> |
|
11 | 13 | |
|
12 | 14 | <%def name="page_nav()"> |
|
13 | 15 | ${self.menu('admin')} |
|
14 | 16 | </%def> |
|
15 | 17 | |
|
16 | 18 | <%def name="main()"> |
|
17 | 19 | <div class="box"> |
|
18 | 20 | <!-- box / title --> |
|
19 | 21 | <div class="title"> |
|
20 | 22 | ${self.breadcrumbs()} |
|
21 | 23 | <ul class="links"> |
|
22 | 24 | <li> |
|
23 | 25 | <span>${h.link_to(_(u'Add new user group'),h.url('new_users_group'))}</span> |
|
24 | 26 | </li> |
|
25 | 27 | |
|
26 | 28 | </ul> |
|
27 | 29 | </div> |
|
28 | 30 | <!-- end box / title --> |
|
29 | 31 | <div class="table"> |
|
30 | 32 | <table class="table_disp"> |
|
31 | 33 | <tr class="header"> |
|
32 | 34 | <th class="left">${_('group name')}</th> |
|
33 | 35 | <th class="left">${_('members')}</th> |
|
34 | 36 | <th class="left">${_('active')}</th> |
|
35 | 37 | <th class="left">${_('action')}</th> |
|
36 | 38 | </tr> |
|
37 | 39 | %for cnt,u_group in enumerate(c.users_groups_list): |
|
38 | 40 | <tr class="parity${cnt%2}"> |
|
39 | 41 | <td>${h.link_to(u_group.users_group_name,h.url('edit_users_group', id=u_group.users_group_id))}</td> |
|
40 | 42 | <td><span class="tooltip" title="${h.tooltip(', '.join(map(h.safe_unicode,[x.user.username for x in u_group.members[:50]])))}">${len(u_group.members)}</span></td> |
|
41 | 43 | <td>${h.bool2icon(u_group.users_group_active)}</td> |
|
42 | 44 | <td> |
|
43 | 45 | ${h.form(url('users_group', id=u_group.users_group_id),method='delete')} |
|
44 | 46 | ${h.submit('remove_',_('delete'),id="remove_group_%s" % u_group.users_group_id, |
|
45 | 47 | class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this users group: %s') % u_group.users_group_name+"');")} |
|
46 | 48 | ${h.end_form()} |
|
47 | 49 | </td> |
|
48 | 50 | </tr> |
|
49 | 51 | %endfor |
|
50 | 52 | </table> |
|
51 | 53 | </div> |
|
52 | 54 | </div> |
|
53 | 55 | </%def> |
@@ -1,78 +1,78 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Bookmarks') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
11 | 11 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
12 | 12 | » |
|
13 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
13 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
14 | 14 | » |
|
15 | 15 | ${_('bookmarks')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="page_nav()"> |
|
19 | 19 | ${self.menu('bookmarks')} |
|
20 | 20 | </%def> |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <div class="box"> |
|
23 | 23 | <!-- box / title --> |
|
24 | 24 | <div class="title"> |
|
25 | 25 | ${self.breadcrumbs()} |
|
26 | 26 | </div> |
|
27 | 27 | <!-- end box / title --> |
|
28 | 28 | <div class="table"> |
|
29 | 29 | <%include file='bookmarks_data.html'/> |
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | <script type="text/javascript"> |
|
33 | 33 | |
|
34 | 34 | // main table sorting |
|
35 | 35 | var myColumnDefs = [ |
|
36 | 36 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
37 | 37 | {key:"date",label:"${_('Date')}",sortable:true, |
|
38 | 38 | sortOptions: { sortFunction: dateSort }}, |
|
39 | 39 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
40 | 40 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
41 | 41 | sortOptions: { sortFunction: revisionSort }}, |
|
42 | 42 | ]; |
|
43 | 43 | |
|
44 | 44 | var myDataSource = new YAHOO.util.DataSource(YUD.get("bookmarks_data")); |
|
45 | 45 | |
|
46 | 46 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
47 | 47 | |
|
48 | 48 | myDataSource.responseSchema = { |
|
49 | 49 | fields: [ |
|
50 | 50 | {key:"name"}, |
|
51 | 51 | {key:"date"}, |
|
52 | 52 | {key:"author"}, |
|
53 | 53 | {key:"revision"}, |
|
54 | 54 | ] |
|
55 | 55 | }; |
|
56 | 56 | |
|
57 | 57 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
58 | 58 | { |
|
59 | 59 | sortedBy:{key:"name",dir:"asc"}, |
|
60 | 60 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
61 | 61 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
62 | 62 | MSG_EMPTY:"${_('No records found.')}", |
|
63 | 63 | MSG_ERROR:"${_('Data error.')}", |
|
64 | 64 | MSG_LOADING:"${_('Loading...')}", |
|
65 | 65 | } |
|
66 | 66 | ); |
|
67 | 67 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
68 | 68 | tooltip_activate(); |
|
69 | 69 | var func = function(node){ |
|
70 | 70 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
71 | 71 | } |
|
72 | 72 | q_filter('q_filter_bookmarks',YUQ('div.table tr td .logbooks .bookbook a'),func); |
|
73 | 73 | }); |
|
74 | 74 | |
|
75 | 75 | </script> |
|
76 | 76 | |
|
77 | 77 | |
|
78 | 78 | </%def> |
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Branches') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
10 | 10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | 11 | » |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
13 | 13 | » |
|
14 | 14 | ${_('branches')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="page_nav()"> |
|
18 | 18 | ${self.menu('branches')} |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <div class="box"> |
|
23 | 23 | <!-- box / title --> |
|
24 | 24 | <div class="title"> |
|
25 | 25 | ${self.breadcrumbs()} |
|
26 | 26 | </div> |
|
27 | 27 | <!-- end box / title --> |
|
28 | 28 | %if c.repo_branches: |
|
29 | 29 | <div class="info_box" id="compare_branches" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare branches')}</a></div> |
|
30 | 30 | %endif |
|
31 | 31 | <div class="table"> |
|
32 | 32 | <%include file='branches_data.html'/> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <script type="text/javascript"> |
|
36 | 36 | YUE.on('compare_branches','click',function(e){ |
|
37 | 37 | YUE.preventDefault(e); |
|
38 | 38 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
39 | 39 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
40 | 40 | |
|
41 | 41 | if(org && other){ |
|
42 | 42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='__ORG__',other_ref_type='branch',other_ref='__OTHER__')}"; |
|
43 | 43 | var u = compare_url.replace('__ORG__',org.value) |
|
44 | 44 | .replace('__OTHER__',other.value); |
|
45 | 45 | window.location=u; |
|
46 | 46 | } |
|
47 | 47 | }); |
|
48 | 48 | // main table sorting |
|
49 | 49 | var myColumnDefs = [ |
|
50 | 50 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
51 | 51 | {key:"date",label:"${_('Date')}",sortable:true, |
|
52 | 52 | sortOptions: { sortFunction: dateSort }}, |
|
53 | 53 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
54 | 54 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
55 | 55 | sortOptions: { sortFunction: revisionSort }}, |
|
56 | 56 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
57 | 57 | ]; |
|
58 | 58 | |
|
59 | 59 | var myDataSource = new YAHOO.util.DataSource(YUD.get("branches_data")); |
|
60 | 60 | |
|
61 | 61 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
62 | 62 | |
|
63 | 63 | myDataSource.responseSchema = { |
|
64 | 64 | fields: [ |
|
65 | 65 | {key:"name"}, |
|
66 | 66 | {key:"date"}, |
|
67 | 67 | {key:"author"}, |
|
68 | 68 | {key:"revision"}, |
|
69 | 69 | {key:"compare"}, |
|
70 | 70 | ] |
|
71 | 71 | }; |
|
72 | 72 | |
|
73 | 73 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
74 | 74 | { |
|
75 | 75 | sortedBy:{key:"name",dir:"asc"}, |
|
76 | 76 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
77 | 77 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
78 | 78 | MSG_EMPTY:"${_('No records found.')}", |
|
79 | 79 | MSG_ERROR:"${_('Data error.')}", |
|
80 | 80 | MSG_LOADING:"${_('Loading...')}", |
|
81 | 81 | } |
|
82 | 82 | ); |
|
83 | 83 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
84 | 84 | tooltip_activate(); |
|
85 | 85 | var func = function(node){ |
|
86 | 86 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
87 | 87 | } |
|
88 | 88 | q_filter('q_filter_branches',YUQ('div.table tr td .logtags .branchtag a'),func); |
|
89 | 89 | }); |
|
90 | 90 | |
|
91 | 91 | </script> |
|
92 | 92 | |
|
93 | 93 | </%def> |
@@ -1,306 +1,306 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="title()"> |
|
6 | 6 | ${_('%s Changelog') % c.repo_name} - ${c.rhodecode_name} |
|
7 | 7 | </%def> |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | 11 | » |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
13 | 13 | » |
|
14 | 14 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
15 |
${_(' |
|
|
15 | ${_('changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} | |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="page_nav()"> |
|
19 | 19 | ${self.menu('changelog')} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="main()"> |
|
23 | 23 | <div class="box"> |
|
24 | 24 | <!-- box / title --> |
|
25 | 25 | <div class="title"> |
|
26 | 26 | ${self.breadcrumbs()} |
|
27 | 27 | </div> |
|
28 | 28 | <div class="table"> |
|
29 | 29 | % if c.pagination: |
|
30 | 30 | <div id="graph"> |
|
31 | 31 | <div id="graph_nodes"> |
|
32 | 32 | <canvas id="graph_canvas"></canvas> |
|
33 | 33 | </div> |
|
34 | 34 | <div id="graph_content"> |
|
35 | 35 | <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> |
|
36 | 36 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
37 | 37 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
38 | 38 | |
|
39 | 39 | %if c.rhodecode_db_repo.fork: |
|
40 | 40 | <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a> |
|
41 | 41 | %endif |
|
42 | 42 | %if h.is_hg(c.rhodecode_repo): |
|
43 | 43 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a> |
|
44 | 44 | %endif |
|
45 | 45 | </div> |
|
46 | 46 | <div class="container_header"> |
|
47 | 47 | ${h.form(h.url.current(),method='get')} |
|
48 | 48 | <div class="info_box" style="float:left"> |
|
49 | 49 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
50 | 50 | ${h.text('size',size=1,value=c.size)} |
|
51 | 51 | ${_('revisions')} |
|
52 | 52 | </div> |
|
53 | 53 | ${h.end_form()} |
|
54 | 54 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
55 | 55 | </div> |
|
56 | 56 | |
|
57 | 57 | %for cnt,cs in enumerate(c.pagination): |
|
58 | 58 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
59 | 59 | <div class="left"> |
|
60 | 60 | <div> |
|
61 | 61 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
62 | 62 | <span class="tooltip" title="${h.tooltip(h.age(cs.date))}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
|
63 | 63 | </div> |
|
64 | 64 | <div class="author"> |
|
65 | 65 | <div class="gravatar"> |
|
66 | 66 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
67 | 67 | </div> |
|
68 | 68 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
69 | 69 | </div> |
|
70 | 70 | <div class="date">${h.fmt_date(cs.date)}</div> |
|
71 | 71 | </div> |
|
72 | 72 | <div class="mid"> |
|
73 | 73 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
74 | 74 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
|
75 | 75 | </div> |
|
76 | 76 | <div class="right"> |
|
77 | 77 | <div class="changes"> |
|
78 | 78 | <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div> |
|
79 | 79 | <div class="comments-container"> |
|
80 | 80 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
81 | 81 | <div class="comments-cnt" title="${('comments')}"> |
|
82 | 82 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
83 | 83 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
84 | 84 | <img src="${h.url('/images/icons/comments.png')}"> |
|
85 | 85 | </a> |
|
86 | 86 | </div> |
|
87 | 87 | %endif |
|
88 | 88 | </div> |
|
89 | 89 | <div class="changeset-status-container"> |
|
90 | 90 | %if c.statuses.get(cs.raw_id): |
|
91 | 91 | <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
|
92 | 92 | <div class="changeset-status-ico"> |
|
93 | 93 | %if c.statuses.get(cs.raw_id)[2]: |
|
94 | 94 | <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> |
|
95 | 95 | %else: |
|
96 | 96 | <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> |
|
97 | 97 | %endif |
|
98 | 98 | </div> |
|
99 | 99 | %endif |
|
100 | 100 | </div> |
|
101 | 101 | </div> |
|
102 | 102 | %if cs.parents: |
|
103 | 103 | %for p_cs in reversed(cs.parents): |
|
104 | 104 | <div class="parent">${_('Parent')} |
|
105 | 105 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
106 | 106 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
107 | 107 | </div> |
|
108 | 108 | %endfor |
|
109 | 109 | %else: |
|
110 | 110 | <div class="parent">${_('No parents')}</div> |
|
111 | 111 | %endif |
|
112 | 112 | |
|
113 | 113 | <span class="logtags"> |
|
114 | 114 | %if len(cs.parents)>1: |
|
115 | 115 | <span class="merge">${_('merge')}</span> |
|
116 | 116 | %endif |
|
117 | 117 | %if cs.branch: |
|
118 | 118 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
119 | 119 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
120 | 120 | </span> |
|
121 | 121 | %endif |
|
122 | 122 | %if h.is_hg(c.rhodecode_repo): |
|
123 | 123 | %for book in cs.bookmarks: |
|
124 | 124 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
125 | 125 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
126 | 126 | </span> |
|
127 | 127 | %endfor |
|
128 | 128 | %endif |
|
129 | 129 | %for tag in cs.tags: |
|
130 | 130 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
131 | 131 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
132 | 132 | %endfor |
|
133 | 133 | </span> |
|
134 | 134 | </div> |
|
135 | 135 | </div> |
|
136 | 136 | |
|
137 | 137 | %endfor |
|
138 | 138 | <div class="pagination-wh pagination-left"> |
|
139 | 139 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
140 | 140 | </div> |
|
141 | 141 | </div> |
|
142 | 142 | </div> |
|
143 | 143 | |
|
144 | 144 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
145 | 145 | <script type="text/javascript"> |
|
146 | 146 | YAHOO.util.Event.onDOMReady(function(){ |
|
147 | 147 | |
|
148 | 148 | //Monitor range checkboxes and build a link to changesets |
|
149 | 149 | //ranges |
|
150 | 150 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
151 | 151 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
152 | 152 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
153 | 153 | YUE.on(checkboxes,'click',function(e){ |
|
154 | 154 | var clicked_cb = e.currentTarget; |
|
155 | 155 | var checked_checkboxes = []; |
|
156 | 156 | for (pos in checkboxes){ |
|
157 | 157 | if(checkboxes[pos].checked){ |
|
158 | 158 | checked_checkboxes.push(checkboxes[pos]); |
|
159 | 159 | } |
|
160 | 160 | } |
|
161 | 161 | if(YUD.get('open_new_pr')){ |
|
162 | 162 | if(checked_checkboxes.length>0){ |
|
163 | 163 | // modify open pull request to show we have selected cs |
|
164 | 164 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
165 | 165 | |
|
166 | 166 | }else{ |
|
167 | 167 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
168 | 168 | } |
|
169 | 169 | } |
|
170 | 170 | |
|
171 | 171 | if(checked_checkboxes.length>0){ |
|
172 | 172 | var rev_end = checked_checkboxes[0].name; |
|
173 | 173 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
174 | 174 | |
|
175 | 175 | // now select all checkboxes in the middle. |
|
176 | 176 | var checked = false; |
|
177 | 177 | for (var i=0; i<checkboxes.length; i++){ |
|
178 | 178 | var cb = checkboxes[i]; |
|
179 | 179 | var rev = cb.name; |
|
180 | 180 | |
|
181 | 181 | if (rev == rev_end){ |
|
182 | 182 | checked = true; |
|
183 | 183 | } |
|
184 | 184 | if (checked){ |
|
185 | 185 | cb.checked = true; |
|
186 | 186 | } |
|
187 | 187 | else{ |
|
188 | 188 | cb.checked = false; |
|
189 | 189 | } |
|
190 | 190 | if (rev == rev_start){ |
|
191 | 191 | checked = false; |
|
192 | 192 | } |
|
193 | 193 | |
|
194 | 194 | } |
|
195 | 195 | |
|
196 | 196 | var url = url_tmpl.replace('__REVRANGE__', |
|
197 | 197 | rev_start+'...'+rev_end); |
|
198 | 198 | |
|
199 | 199 | var link = _TM['Show selected changes __S -> __E']; |
|
200 | 200 | link = link.replace('__S',rev_start.substr(0,6)); |
|
201 | 201 | link = link.replace('__E',rev_end.substr(0,6)); |
|
202 | 202 | YUD.get('rev_range_container').href = url; |
|
203 | 203 | YUD.get('rev_range_container').innerHTML = link; |
|
204 | 204 | YUD.setStyle('rev_range_container','display',''); |
|
205 | 205 | YUD.setStyle('rev_range_clear','display',''); |
|
206 | 206 | |
|
207 | 207 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
208 | 208 | |
|
209 | 209 | } |
|
210 | 210 | else{ |
|
211 | 211 | YUD.setStyle('rev_range_container','display','none'); |
|
212 | 212 | YUD.setStyle('rev_range_clear','display','none'); |
|
213 | 213 | } |
|
214 | 214 | }); |
|
215 | 215 | YUE.on('rev_range_clear','click',function(e){ |
|
216 | 216 | for (var i=0; i<checkboxes.length; i++){ |
|
217 | 217 | var cb = checkboxes[i]; |
|
218 | 218 | cb.checked = false; |
|
219 | 219 | } |
|
220 | 220 | YUE.preventDefault(e); |
|
221 | 221 | }) |
|
222 | 222 | var msgs = YUQ('.message'); |
|
223 | 223 | // get first element height |
|
224 | 224 | var el = YUQ('#graph_content .container')[0]; |
|
225 | 225 | var row_h = el.clientHeight; |
|
226 | 226 | for(var i=0;i<msgs.length;i++){ |
|
227 | 227 | var m = msgs[i]; |
|
228 | 228 | |
|
229 | 229 | var h = m.clientHeight; |
|
230 | 230 | var pad = YUD.getStyle(m,'padding'); |
|
231 | 231 | if(h > row_h){ |
|
232 | 232 | var offset = row_h - (h+12); |
|
233 | 233 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
234 | 234 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
235 | 235 | }; |
|
236 | 236 | } |
|
237 | 237 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
238 | 238 | var elem = e.currentTarget.parentNode.parentNode; |
|
239 | 239 | YUD.setStyle(e.currentTarget,'display','none'); |
|
240 | 240 | YUD.setStyle(elem,'height','auto'); |
|
241 | 241 | |
|
242 | 242 | //redraw the graph, line_count and jsdata are global vars |
|
243 | 243 | set_canvas(100); |
|
244 | 244 | |
|
245 | 245 | var r = new BranchRenderer(); |
|
246 | 246 | r.render(jsdata,100,line_count); |
|
247 | 247 | |
|
248 | 248 | }) |
|
249 | 249 | |
|
250 | 250 | // Fetch changeset details |
|
251 | 251 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
252 | 252 | var id = e.currentTarget.id; |
|
253 | 253 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; |
|
254 | 254 | var url = url.replace('__CS__',id.replace('changed_total_','')); |
|
255 | 255 | ypjax(url,id,function(){tooltip_activate()}); |
|
256 | 256 | }); |
|
257 | 257 | |
|
258 | 258 | // change branch filter |
|
259 | 259 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
260 | 260 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
261 | 261 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
262 | 262 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
263 | 263 | var url = url.replace('__BRANCH__',selected_branch); |
|
264 | 264 | if(selected_branch != ''){ |
|
265 | 265 | window.location = url; |
|
266 | 266 | }else{ |
|
267 | 267 | window.location = url_main; |
|
268 | 268 | } |
|
269 | 269 | |
|
270 | 270 | }); |
|
271 | 271 | |
|
272 | 272 | function set_canvas(width) { |
|
273 | 273 | var c = document.getElementById('graph_nodes'); |
|
274 | 274 | var t = document.getElementById('graph_content'); |
|
275 | 275 | canvas = document.getElementById('graph_canvas'); |
|
276 | 276 | var div_h = t.clientHeight; |
|
277 | 277 | c.style.height=div_h+'px'; |
|
278 | 278 | canvas.setAttribute('height',div_h); |
|
279 | 279 | c.style.height=width+'px'; |
|
280 | 280 | canvas.setAttribute('width',width); |
|
281 | 281 | }; |
|
282 | 282 | var heads = 1; |
|
283 | 283 | var line_count = 0; |
|
284 | 284 | var jsdata = ${c.jsdata|n}; |
|
285 | 285 | |
|
286 | 286 | for (var i=0;i<jsdata.length;i++) { |
|
287 | 287 | var in_l = jsdata[i][2]; |
|
288 | 288 | for (var j in in_l) { |
|
289 | 289 | var m = in_l[j][1]; |
|
290 | 290 | if (m > line_count) |
|
291 | 291 | line_count = m; |
|
292 | 292 | } |
|
293 | 293 | } |
|
294 | 294 | set_canvas(100); |
|
295 | 295 | |
|
296 | 296 | var r = new BranchRenderer(); |
|
297 | 297 | r.render(jsdata,100,line_count); |
|
298 | 298 | |
|
299 | 299 | }); |
|
300 | 300 | </script> |
|
301 | 301 | %else: |
|
302 | 302 | ${_('There are no changes yet')} |
|
303 | 303 | %endif |
|
304 | 304 | </div> |
|
305 | 305 | </div> |
|
306 | 306 | </%def> |
@@ -1,202 +1,202 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="title()"> |
|
6 | 6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} |
|
7 | 7 | </%def> |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | 11 | » |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
13 | 13 | » |
|
14 |
${_(' |
|
|
14 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> | |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="page_nav()"> |
|
18 | 18 | ${self.menu('changelog')} |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <div class="box"> |
|
23 | 23 | <!-- box / title --> |
|
24 | 24 | <div class="title"> |
|
25 | 25 | ${self.breadcrumbs()} |
|
26 | 26 | </div> |
|
27 | 27 | <script> |
|
28 | 28 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
29 | 29 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
30 | 30 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
31 | 31 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
32 | 32 | </script> |
|
33 | 33 | <div class="table"> |
|
34 | 34 | <div class="diffblock"> |
|
35 | 35 | <div class="parents"> |
|
36 | 36 | %if c.changeset.parents: |
|
37 | 37 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
38 | 38 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> |
|
39 | 39 | <br> |
|
40 | 40 | %endfor |
|
41 | 41 | %else: |
|
42 | 42 | <span>${_('No parents')}</span> |
|
43 | 43 | %endif |
|
44 | 44 | </div> |
|
45 | 45 | <div class="children"> |
|
46 | 46 | %if c.changeset.children: |
|
47 | 47 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
48 | 48 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> |
|
49 | 49 | <br> |
|
50 | 50 | %endfor |
|
51 | 51 | %else: |
|
52 | 52 | <span>${_('No children')}</span> |
|
53 | 53 | %endif |
|
54 | 54 | </div> |
|
55 | 55 | <div class="code-header banner"> |
|
56 | 56 | |
|
57 | 57 | <div class="hash"> |
|
58 | 58 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
59 | 59 | </div> |
|
60 | 60 | <div class="date"> |
|
61 | 61 | ${h.fmt_date(c.changeset.date)} |
|
62 | 62 | </div> |
|
63 | 63 | <div class="changeset-status-container"> |
|
64 | 64 | %if c.statuses: |
|
65 | 65 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
66 | 66 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
67 | 67 | %endif |
|
68 | 68 | </div> |
|
69 | 69 | <div class="diff-actions"> |
|
70 | 70 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
71 | 71 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> |
|
72 | 72 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> |
|
73 | 73 | ${c.ignorews_url(request.GET)} |
|
74 | 74 | ${c.context_url(request.GET)} |
|
75 | 75 | </div> |
|
76 | 76 | <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> |
|
77 | 77 | </div> |
|
78 | 78 | </div> |
|
79 | 79 | <div id="changeset_content"> |
|
80 | 80 | <div class="container"> |
|
81 | 81 | <div class="left"> |
|
82 | 82 | <div class="author"> |
|
83 | 83 | <div class="gravatar"> |
|
84 | 84 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
|
85 | 85 | </div> |
|
86 | 86 | <span>${h.person(c.changeset.author)}</span><br/> |
|
87 | 87 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
88 | 88 | </div> |
|
89 | 89 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
|
90 | 90 | </div> |
|
91 | 91 | <div class="right"> |
|
92 | 92 | <div class="changes"> |
|
93 | 93 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
94 | 94 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
95 | 95 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
96 | 96 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
97 | 97 | % else: |
|
98 | 98 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
99 | 99 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
100 | 100 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
101 | 101 | % endif |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <span class="logtags"> |
|
105 | 105 | %if len(c.changeset.parents)>1: |
|
106 | 106 | <span class="merge">${_('merge')}</span> |
|
107 | 107 | %endif |
|
108 | 108 | %if c.changeset.branch: |
|
109 | 109 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
110 | 110 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
111 | 111 | </span> |
|
112 | 112 | %endif |
|
113 | 113 | %for tag in c.changeset.tags: |
|
114 | 114 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
115 | 115 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
116 | 116 | %endfor |
|
117 | 117 | </span> |
|
118 | 118 | </div> |
|
119 | 119 | </div> |
|
120 | 120 | <span> |
|
121 | 121 | % if c.limited_diff: |
|
122 | 122 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
123 | 123 | % else: |
|
124 | 124 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}: |
|
125 | 125 | %endif |
|
126 | 126 | </span> |
|
127 | 127 | <div class="cs_files"> |
|
128 | 128 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
129 | 129 | <div class="cs_${change}"> |
|
130 | 130 | <div class="node"> |
|
131 | 131 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
132 | 132 | </div> |
|
133 | 133 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
134 | 134 | </div> |
|
135 | 135 | %endfor |
|
136 | 136 | % if c.limited_diff: |
|
137 | 137 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
138 | 138 | % endif |
|
139 | 139 | </div> |
|
140 | 140 | </div> |
|
141 | 141 | |
|
142 | 142 | </div> |
|
143 | 143 | |
|
144 | 144 | ## diff block |
|
145 | 145 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
146 | 146 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
147 | 147 | |
|
148 | 148 | % if c.limited_diff: |
|
149 | 149 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
150 | 150 | % endif |
|
151 | 151 | |
|
152 | 152 | ## template for inline comment form |
|
153 | 153 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
154 | 154 | ${comment.comment_inline_form()} |
|
155 | 155 | |
|
156 | 156 | ## render comments and inlines |
|
157 | 157 | ${comment.generate_comments()} |
|
158 | 158 | |
|
159 | 159 | ## main comment form and it status |
|
160 | 160 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
161 | 161 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
162 | 162 | |
|
163 | 163 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
164 | 164 | <script type="text/javascript"> |
|
165 | 165 | YUE.onDOMReady(function(){ |
|
166 | 166 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
167 | 167 | var show = 'none'; |
|
168 | 168 | var target = e.currentTarget; |
|
169 | 169 | if(target == null){ |
|
170 | 170 | target = this; |
|
171 | 171 | } |
|
172 | 172 | if(target.checked){ |
|
173 | 173 | var show = '' |
|
174 | 174 | } |
|
175 | 175 | var boxid = YUD.getAttribute(target,'id_for'); |
|
176 | 176 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
177 | 177 | for(c in comments){ |
|
178 | 178 | YUD.setStyle(comments[c],'display',show); |
|
179 | 179 | } |
|
180 | 180 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
181 | 181 | for(c in btns){ |
|
182 | 182 | YUD.setStyle(btns[c],'display',show); |
|
183 | 183 | } |
|
184 | 184 | }) |
|
185 | 185 | |
|
186 | 186 | YUE.on(YUQ('.line'),'click',function(e){ |
|
187 | 187 | var tr = e.currentTarget; |
|
188 | 188 | if(tr == null){ |
|
189 | 189 | tr = this; |
|
190 | 190 | } |
|
191 | 191 | injectInlineForm(tr); |
|
192 | 192 | }); |
|
193 | 193 | |
|
194 | 194 | // inject comments into they proper positions |
|
195 | 195 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
196 | 196 | renderInlineComments(file_comments); |
|
197 | 197 | }) |
|
198 | 198 | |
|
199 | 199 | </script> |
|
200 | 200 | |
|
201 | 201 | </div> |
|
202 | 202 | </%def> |
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${c.repo_name} ${_('Compare')} ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | 12 | » |
|
13 |
${_(' |
|
|
13 | ${_('compare')} | |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('changelog')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="body" class="diffblock"> |
|
28 | 28 | <div class="code-header cv"> |
|
29 | 29 | <h3 class="code-header-title">${_('Compare View')}</h3> |
|
30 | 30 | <div> |
|
31 | 31 | ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a> |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <div id="changeset_compare_view_content"> |
|
36 | 36 | ##CS |
|
37 | 37 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div> |
|
38 | 38 | <%include file="compare_cs.html" /> |
|
39 | 39 | |
|
40 | 40 | ## FILES |
|
41 | 41 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
42 | 42 | |
|
43 | 43 | % if c.limited_diff: |
|
44 | 44 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
45 | 45 | % else: |
|
46 | 46 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: |
|
47 | 47 | %endif |
|
48 | 48 | |
|
49 | 49 | </div> |
|
50 | 50 | <div class="cs_files"> |
|
51 | 51 | %if not c.files: |
|
52 | 52 | <span class="empty_data">${_('No files')}</span> |
|
53 | 53 | %endif |
|
54 | 54 | %for fid, change, f, stat in c.files: |
|
55 | 55 | <div class="cs_${change}"> |
|
56 | 56 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div> |
|
57 | 57 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
58 | 58 | </div> |
|
59 | 59 | %endfor |
|
60 | 60 | </div> |
|
61 | 61 | % if c.limited_diff: |
|
62 | 62 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
63 | 63 | % endif |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | ## diff block |
|
68 | 68 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
69 | 69 | %for fid, change, f, stat in c.files: |
|
70 | 70 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
71 | 71 | %endfor |
|
72 | 72 | % if c.limited_diff: |
|
73 | 73 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
74 | 74 | % endif |
|
75 | 75 | <script type="text/javascript"> |
|
76 | 76 | |
|
77 | 77 | YUE.onDOMReady(function(){ |
|
78 | 78 | |
|
79 | 79 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
80 | 80 | var act = e.currentTarget.nextElementSibling; |
|
81 | 81 | |
|
82 | 82 | if(YUD.hasClass(act,'active')){ |
|
83 | 83 | YUD.removeClass(act,'active'); |
|
84 | 84 | YUD.setStyle(act,'display','none'); |
|
85 | 85 | }else{ |
|
86 | 86 | YUD.addClass(act,'active'); |
|
87 | 87 | YUD.setStyle(act,'display',''); |
|
88 | 88 | } |
|
89 | 89 | }); |
|
90 | 90 | }) |
|
91 | 91 | </script> |
|
92 | 92 | </div> |
|
93 | 93 | </%def> |
@@ -1,161 +1,161 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s files') % c.repo_name} - ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} | |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
11 | 11 | » |
|
12 | 12 | ${_('files')} |
|
13 | 13 | %if c.file: |
|
14 | 14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
15 | 15 | %endif |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="page_nav()"> |
|
19 | 19 | ${self.menu('files')} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="main()"> |
|
23 | 23 | <div class="box"> |
|
24 | 24 | <!-- box / title --> |
|
25 | 25 | <div class="title"> |
|
26 | 26 | ${self.breadcrumbs()} |
|
27 | 27 | <ul class="links"> |
|
28 | 28 | <li> |
|
29 | 29 | <span style="text-transform: uppercase;"><a href="#">${_('branch')}: ${c.changeset.branch}</a></span> |
|
30 | 30 | </li> |
|
31 | 31 | </ul> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="table"> |
|
34 | 34 | <div id="files_data"> |
|
35 | 35 | <%include file='files_ypjax.html'/> |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | |
|
40 | 40 | <script type="text/javascript"> |
|
41 | 41 | var CACHE = {}; |
|
42 | 42 | var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s |
|
43 | 43 | //used to construct links from the search list |
|
44 | 44 | var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
45 | 45 | //send the nodelist request to this url |
|
46 | 46 | var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
47 | 47 | // send the node history requst to this url |
|
48 | 48 | var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}'; |
|
49 | 49 | |
|
50 | 50 | var ypjax_links = function(){ |
|
51 | 51 | YUE.on(YUQ('.ypjax-link'), 'click',function(e){ |
|
52 | 52 | |
|
53 | 53 | //don't do ypjax on middle click |
|
54 | 54 | if(e.which == 2 || !History.enabled){ |
|
55 | 55 | return true; |
|
56 | 56 | } |
|
57 | 57 | |
|
58 | 58 | var el = e.currentTarget; |
|
59 | 59 | var url = el.href; |
|
60 | 60 | |
|
61 | 61 | var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}'; |
|
62 | 62 | _base_url = _base_url.replace('//','/') |
|
63 | 63 | |
|
64 | 64 | //extract rev and the f_path from url. |
|
65 | 65 | parts = url.split(_base_url) |
|
66 | 66 | if(parts.length != 2){ |
|
67 | 67 | return false; |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | 70 | var parts2 = parts[1].split('/'); |
|
71 | 71 | var rev = parts2.shift(); // pop the first element which is the revision |
|
72 | 72 | var f_path = parts2.join('/'); |
|
73 | 73 | |
|
74 | 74 | var title = "${_('%s files') % c.repo_name}" + " - " + f_path; |
|
75 | 75 | |
|
76 | 76 | var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path); |
|
77 | 77 | var _url_base = url_base.replace('__REV__',rev); |
|
78 | 78 | |
|
79 | 79 | // Change our States and save some data for handling events |
|
80 | 80 | var data = {url:url,title:title, url_base:_url_base, |
|
81 | 81 | node_list_url:_node_list_url, rev:rev, f_path:f_path}; |
|
82 | 82 | History.pushState(data, title, url); |
|
83 | 83 | |
|
84 | 84 | //now we're sure that we can do ypjax things |
|
85 | 85 | YUE.preventDefault(e); |
|
86 | 86 | return false; |
|
87 | 87 | }); |
|
88 | 88 | } |
|
89 | 89 | |
|
90 | 90 | var callbacks = function(State){ |
|
91 | 91 | ypjax_links(); |
|
92 | 92 | tooltip_activate(); |
|
93 | 93 | fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); |
|
94 | 94 | |
|
95 | 95 | if(YUD.get('hlcode')){ |
|
96 | 96 | YUE.on('hlcode', 'mouseup', getSelectionLink); |
|
97 | 97 | } |
|
98 | 98 | //console.log(State); |
|
99 | 99 | if(YUD.get('load_node_history')){ |
|
100 | 100 | //remove all listeners due to problems of history state |
|
101 | 101 | YUE.removeListener('load_node_history', 'click'); |
|
102 | 102 | YUE.on('load_node_history', 'click', function(e){ |
|
103 | 103 | var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path); |
|
104 | 104 | ypjax(_url, 'node_history', function(o){ |
|
105 | 105 | tooltip_activate(); |
|
106 | 106 | }) |
|
107 | 107 | }); |
|
108 | 108 | } |
|
109 | 109 | // Inform Google Analytics of the change |
|
110 | 110 | if ( typeof window.pageTracker !== 'undefined' ) { |
|
111 | 111 | window.pageTracker._trackPageview(State.url); |
|
112 | 112 | } |
|
113 | 113 | } |
|
114 | 114 | |
|
115 | 115 | YUE.onDOMReady(function(){ |
|
116 | 116 | ypjax_links(); |
|
117 | 117 | var container = 'files_data'; |
|
118 | 118 | //Bind to StateChange Event |
|
119 | 119 | History.Adapter.bind(window,'statechange',function(){ |
|
120 | 120 | var State = History.getState(); |
|
121 | 121 | cache_key = State.url; |
|
122 | 122 | //check if we have this request in cache maybe ? |
|
123 | 123 | var _cache_obj = CACHE[cache_key]; |
|
124 | 124 | var _cur_time = new Date().getTime(); |
|
125 | 125 | // get from cache if it's there and not yet expired ! |
|
126 | 126 | if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){ |
|
127 | 127 | YUD.get(container).innerHTML=_cache_obj[1]; |
|
128 | 128 | YUD.setStyle(container,'opacity','1.0'); |
|
129 | 129 | |
|
130 | 130 | //callbacks after ypjax call |
|
131 | 131 | callbacks(State); |
|
132 | 132 | } |
|
133 | 133 | else{ |
|
134 | 134 | ypjax(State.url,container,function(o){ |
|
135 | 135 | //callbacks after ypjax call |
|
136 | 136 | callbacks(State); |
|
137 | 137 | if (o !== undefined){ |
|
138 | 138 | //store our request in cache |
|
139 | 139 | var _expire_on = new Date().getTime()+CACHE_EXPIRE; |
|
140 | 140 | CACHE[cache_key] = [_expire_on, o.responseText]; |
|
141 | 141 | } |
|
142 | 142 | }); |
|
143 | 143 | } |
|
144 | 144 | }); |
|
145 | 145 | |
|
146 | 146 | // init the search filter |
|
147 | 147 | var _State = { |
|
148 | 148 | url: "${h.url.current()}", |
|
149 | 149 | data: { |
|
150 | 150 | node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"), |
|
151 | 151 | url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"), |
|
152 | 152 | rev:"${c.changeset.raw_id}", |
|
153 | 153 | f_path: "${h.safe_unicode(c.file.path)}" |
|
154 | 154 | } |
|
155 | 155 | } |
|
156 | 156 | fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); |
|
157 | 157 | }); |
|
158 | 158 | |
|
159 | 159 | </script> |
|
160 | 160 | |
|
161 | 161 | </%def> |
@@ -1,32 +1,32 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Followers') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | 12 | » |
|
13 | 13 | ${_('followers')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('followers')} |
|
18 | 18 | </%def> |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <!-- end box / title --> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="followers"> |
|
28 | 28 | ${c.followers_data} |
|
29 | 29 | </div> |
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | </%def> |
@@ -1,100 +1,100 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Fork') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | 12 | » |
|
13 | 13 | ${_('fork')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('')} |
|
18 | 18 | </%def> |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
26 | 26 | <div class="form"> |
|
27 | 27 | <!-- fields --> |
|
28 | 28 | <div class="fields"> |
|
29 | 29 | <div class="field"> |
|
30 | 30 | <div class="label"> |
|
31 | 31 | <label for="repo_name">${_('Fork name')}:</label> |
|
32 | 32 | </div> |
|
33 | 33 | <div class="input"> |
|
34 | 34 | ${h.text('repo_name',class_="small")} |
|
35 | 35 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
36 | 36 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label"> |
|
41 | 41 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="input"> |
|
44 | 44 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
45 | 45 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
46 | 46 | </div> |
|
47 | 47 | </div> |
|
48 | 48 | <div class="field"> |
|
49 | 49 | <div class="label"> |
|
50 | 50 | <label for="repo_group">${_('Repository group')}:</label> |
|
51 | 51 | </div> |
|
52 | 52 | <div class="input"> |
|
53 | 53 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
54 | 54 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
55 | 55 | </div> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="field"> |
|
58 | 58 | <div class="label label-textarea"> |
|
59 | 59 | <label for="description">${_('Description')}:</label> |
|
60 | 60 | </div> |
|
61 | 61 | <div class="textarea text-area editor"> |
|
62 | 62 | ${h.textarea('description',cols=23,rows=5)} |
|
63 | 63 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | <div class="field"> |
|
67 | 67 | <div class="label label-checkbox"> |
|
68 | 68 | <label for="private">${_('Private')}:</label> |
|
69 | 69 | </div> |
|
70 | 70 | <div class="checkboxes"> |
|
71 | 71 | ${h.checkbox('private',value="True")} |
|
72 | 72 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
73 | 73 | </div> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="field"> |
|
76 | 76 | <div class="label label-checkbox"> |
|
77 | 77 | <label for="private">${_('Copy permissions')}:</label> |
|
78 | 78 | </div> |
|
79 | 79 | <div class="checkboxes"> |
|
80 | 80 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
81 | 81 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
82 | 82 | </div> |
|
83 | 83 | </div> |
|
84 | 84 | <div class="field"> |
|
85 | 85 | <div class="label label-checkbox"> |
|
86 | 86 | <label for="private">${_('Update after clone')}:</label> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="checkboxes"> |
|
89 | 89 | ${h.checkbox('update_after_clone',value="True")} |
|
90 | 90 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
91 | 91 | </div> |
|
92 | 92 | </div> |
|
93 | 93 | <div class="buttons"> |
|
94 | 94 | ${h.submit('',_('fork this repository'),class_="ui-btn large")} |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | </div> |
|
98 | 98 | ${h.end_form()} |
|
99 | 99 | </div> |
|
100 | 100 | </%def> |
@@ -1,32 +1,32 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Forks') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | 12 | » |
|
13 | 13 | ${_('forks')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('forks')} |
|
18 | 18 | </%def> |
|
19 | 19 | <%def name="main()"> |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <!-- end box / title --> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="forks"> |
|
28 | 28 | ${c.forks_data} |
|
29 | 29 | </div> |
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | </%def> |
@@ -1,201 +1,201 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${c.repo_name} ${_('New pull request')} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} | |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
11 | 11 | » |
|
12 |
${_(' |
|
|
12 | ${_('new pull request')} | |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="main()"> |
|
16 | 16 | |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | </div> |
|
22 | 22 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
|
23 | 23 | <div style="float:left;padding:0px 30px 30px 30px"> |
|
24 | 24 | <input type="hidden" name="rev_start" value="${request.GET.get('rev_start')}" /> |
|
25 | 25 | <input type="hidden" name="rev_end" value="${request.GET.get('rev_end')}" /> |
|
26 | 26 | |
|
27 | 27 | ##ORG |
|
28 | 28 | <div style="float:left"> |
|
29 | 29 | <div> |
|
30 | 30 | <span style="font-size: 20px"> |
|
31 | 31 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} |
|
32 | 32 | </span> |
|
33 | 33 | <div style="padding:5px 3px 3px 42px;">${c.rhodecode_db_repo.description}</div> |
|
34 | 34 | </div> |
|
35 | 35 | <div style="clear:both;padding-top: 10px"></div> |
|
36 | 36 | </div> |
|
37 | 37 | <div style="float:left;font-size:24px;padding:0px 20px"> |
|
38 | 38 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> |
|
39 | 39 | </div> |
|
40 | 40 | |
|
41 | 41 | ##OTHER, most Probably the PARENT OF THIS FORK |
|
42 | 42 | <div style="float:left"> |
|
43 | 43 | <div> |
|
44 | 44 | <span style="font-size: 20px"> |
|
45 | 45 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_other_ref,c.default_other_refs,class_='refs')} |
|
46 | 46 | </span> |
|
47 | 47 | <div id="other_repo_desc" style="padding:5px 3px 3px 42px;"></div> |
|
48 | 48 | </div> |
|
49 | 49 | <div style="clear:both;padding-top: 10px"></div> |
|
50 | 50 | </div> |
|
51 | 51 | <div style="clear:both;padding-top: 10px"></div> |
|
52 | 52 | ## overview pulled by ajax |
|
53 | 53 | <div style="float:left" id="pull_request_overview"></div> |
|
54 | 54 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> |
|
55 | 55 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> |
|
56 | 56 | </div> |
|
57 | 57 | </div> |
|
58 | 58 | <div style="float:left; border-left:1px dashed #eee"> |
|
59 | 59 | <h4>${_('Pull request reviewers')}</h4> |
|
60 | 60 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
61 | 61 | ## members goes here ! |
|
62 | 62 | <div class="group_members_wrap"> |
|
63 | 63 | <ul id="review_members" class="group_members"> |
|
64 | 64 | %for member in c.review_members: |
|
65 | 65 | <li id="reviewer_${member.user_id}"> |
|
66 | 66 | <div class="reviewers_member"> |
|
67 | 67 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
68 | 68 | <div style="float:left">${member.full_name} (${_('owner')})</div> |
|
69 | 69 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
70 | 70 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
71 | 71 | </div> |
|
72 | 72 | </li> |
|
73 | 73 | %endfor |
|
74 | 74 | </ul> |
|
75 | 75 | </div> |
|
76 | 76 | |
|
77 | 77 | <div class='ac'> |
|
78 | 78 | <div class="reviewer_ac"> |
|
79 | 79 | ${h.text('user', class_='yui-ac-input')} |
|
80 | 80 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
81 | 81 | <div id="reviewers_container"></div> |
|
82 | 82 | </div> |
|
83 | 83 | </div> |
|
84 | 84 | </div> |
|
85 | 85 | </div> |
|
86 | 86 | <h3>${_('Create new pull request')}</h3> |
|
87 | 87 | |
|
88 | 88 | <div class="form"> |
|
89 | 89 | <!-- fields --> |
|
90 | 90 | |
|
91 | 91 | <div class="fields"> |
|
92 | 92 | |
|
93 | 93 | <div class="field"> |
|
94 | 94 | <div class="label"> |
|
95 | 95 | <label for="pullrequest_title">${_('Title')}:</label> |
|
96 | 96 | </div> |
|
97 | 97 | <div class="input"> |
|
98 | 98 | ${h.text('pullrequest_title',size=30)} |
|
99 | 99 | </div> |
|
100 | 100 | </div> |
|
101 | 101 | |
|
102 | 102 | <div class="field"> |
|
103 | 103 | <div class="label label-textarea"> |
|
104 | 104 | <label for="pullrequest_desc">${_('description')}:</label> |
|
105 | 105 | </div> |
|
106 | 106 | <div class="textarea text-area editor"> |
|
107 | 107 | ${h.textarea('pullrequest_desc',size=30)} |
|
108 | 108 | </div> |
|
109 | 109 | </div> |
|
110 | 110 | |
|
111 | 111 | <div class="buttons"> |
|
112 | 112 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
|
113 | 113 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
114 | 114 | </div> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | ${h.end_form()} |
|
118 | 118 | |
|
119 | 119 | </div> |
|
120 | 120 | |
|
121 | 121 | <script type="text/javascript"> |
|
122 | 122 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
123 | 123 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
124 | 124 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
125 | 125 | |
|
126 | 126 | var other_repos_info = ${c.other_repos_info|n}; |
|
127 | 127 | |
|
128 | 128 | var loadPreview = function(){ |
|
129 | 129 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display','none'); |
|
130 | 130 | //url template |
|
131 | 131 | var url = "${h.url('compare_url', |
|
132 | 132 | repo_name='__other_repo__', |
|
133 | 133 | org_ref_type='__other_ref_type__', |
|
134 | 134 | org_ref='__other_ref__', |
|
135 | 135 | other_repo='__org_repo__', |
|
136 | 136 | other_ref_type='__org_ref_type__', |
|
137 | 137 | other_ref='__org_ref__', |
|
138 | 138 | as_form=True, |
|
139 | 139 | rev_start=request.GET.get('rev_start',''), |
|
140 | 140 | rev_end=request.GET.get('rev_end',''))}"; |
|
141 | 141 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; |
|
142 | 142 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); |
|
143 | 143 | |
|
144 | 144 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; |
|
145 | 145 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); |
|
146 | 146 | |
|
147 | 147 | var select_refs = YUQ('#pull_request_form select.refs') |
|
148 | 148 | var rev_data = { |
|
149 | 149 | 'org_repo': org_repo, |
|
150 | 150 | 'org_ref': org_ref[1], |
|
151 | 151 | 'org_ref_type': org_ref[0], |
|
152 | 152 | 'other_repo': other_repo, |
|
153 | 153 | 'other_ref': other_ref[1], |
|
154 | 154 | 'other_ref_type': other_ref[0], |
|
155 | 155 | }; // gather the org/other ref and repo here |
|
156 | 156 | |
|
157 | 157 | for (k in rev_data){ |
|
158 | 158 | url = url.replace('__'+k+'__',rev_data[k]); |
|
159 | 159 | } |
|
160 | 160 | |
|
161 | 161 | ypjax(url,'pull_request_overview', function(data){ |
|
162 | 162 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; |
|
163 | 163 | var repo_name = sel_box.options[sel_box.selectedIndex].value; |
|
164 | 164 | var _data = other_repos_info[repo_name]; |
|
165 | 165 | YUD.get('pull_request_overview_url').href = url; |
|
166 | 166 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); |
|
167 | 167 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; |
|
168 | 168 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; |
|
169 | 169 | // select back the revision that was just compared |
|
170 | 170 | setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); |
|
171 | 171 | // reset && add the reviewer based on selected repo |
|
172 | 172 | YUD.get('review_members').innerHTML = ''; |
|
173 | 173 | addReviewMember(_data.user.user_id, _data.user.firstname, |
|
174 | 174 | _data.user.lastname, _data.user.username, |
|
175 | 175 | _data.user.gravatar_link); |
|
176 | 176 | }) |
|
177 | 177 | } |
|
178 | 178 | |
|
179 | 179 | ## refresh automatically when something changes (org_repo can't change) |
|
180 | 180 | |
|
181 | 181 | YUE.on('org_ref', 'change', function(e){ |
|
182 | 182 | loadPreview(); |
|
183 | 183 | }); |
|
184 | 184 | |
|
185 | 185 | YUE.on('other_repo', 'change', function(e){ |
|
186 | 186 | var repo_name = e.currentTarget.value; |
|
187 | 187 | // replace the <select> of changed repo |
|
188 | 188 | YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; |
|
189 | 189 | loadPreview(); |
|
190 | 190 | }); |
|
191 | 191 | |
|
192 | 192 | YUE.on('other_ref', 'change', function(e){ |
|
193 | 193 | loadPreview(); |
|
194 | 194 | }); |
|
195 | 195 | |
|
196 | 196 | //lazy load overview after 0.5s |
|
197 | 197 | setTimeout(loadPreview, 500) |
|
198 | 198 | |
|
199 | 199 | </script> |
|
200 | 200 | |
|
201 | 201 | </%def> |
@@ -1,44 +1,44 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${c.repo_name} ${_('all pull requests')} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} | |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
11 | 11 | » |
|
12 |
${_(' |
|
|
12 | ${_('pull requests')} | |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="main()"> |
|
16 | 16 | |
|
17 | 17 | <div class="box"> |
|
18 | 18 | <!-- box / title --> |
|
19 | 19 | <div class="title"> |
|
20 | 20 | ${self.breadcrumbs()} |
|
21 | 21 | </div> |
|
22 | 22 | |
|
23 | 23 | %for pr in c.pull_requests: |
|
24 | 24 | <div> |
|
25 | 25 | <h4 style="border:0px;padding:0px"> |
|
26 | 26 | %if pr.is_closed(): |
|
27 | 27 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
28 | 28 | %endif |
|
29 | 29 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(pr.last_review_status))}" /> |
|
30 | 30 | <a href="${h.url('pullrequest_show',repo_name=c.repo_name,pull_request_id=pr.pull_request_id)}"> |
|
31 | 31 | ${_('Pull request #%s opened by %s on %s') % (pr.pull_request_id, pr.author.full_name, h.fmt_date(pr.created_on))} |
|
32 | 32 | </a> |
|
33 | 33 | </h4> |
|
34 | 34 | <h5 style="border:0px;padding-bottom:0px">${_('Title')}: ${pr.title}</h5> |
|
35 | 35 | <div style="padding:0px 24px">${pr.description}</div> |
|
36 | 36 | <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div> |
|
37 | 37 | </div> |
|
38 | 38 | %endfor |
|
39 | 39 | |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | 42 | <script type="text/javascript"></script> |
|
43 | 43 | |
|
44 | 44 | </%def> |
@@ -1,91 +1,91 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | %if c.repo_name: |
|
6 | 6 | ${_('Search repository')} ${c.repo_name} - ${c.rhodecode_name} |
|
7 | 7 | %else: |
|
8 | 8 | ${_('Search in all repositories')} |
|
9 | 9 | %endif |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="breadcrumbs_links()"> |
|
13 | 13 | %if c.repo_name: |
|
14 | 14 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
15 | 15 | » |
|
16 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
16 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
17 | 17 | » |
|
18 |
${_(' |
|
|
18 | ${_('search')} | |
|
19 | 19 | %else: |
|
20 |
${_(' |
|
|
20 | ${_('search in all repositories')} | |
|
21 | 21 | %endif |
|
22 | 22 | %if c.cur_query: |
|
23 | 23 | » |
|
24 | 24 | ${c.cur_query} |
|
25 | 25 | %endif |
|
26 | 26 | </%def> |
|
27 | 27 | |
|
28 | 28 | <%def name="page_nav()"> |
|
29 | 29 | %if c.repo_name: |
|
30 | 30 | ${self.menu('options')} |
|
31 | 31 | %else: |
|
32 | 32 | ${self.menu('search')} |
|
33 | 33 | %endif |
|
34 | 34 | </%def> |
|
35 | 35 | <%def name="main()"> |
|
36 | 36 | |
|
37 | 37 | <div class="box"> |
|
38 | 38 | <!-- box / title --> |
|
39 | 39 | <div class="title"> |
|
40 | 40 | ${self.breadcrumbs()} |
|
41 | 41 | </div> |
|
42 | 42 | <!-- end box / title --> |
|
43 | 43 | %if c.repo_name: |
|
44 | 44 | ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')} |
|
45 | 45 | %else: |
|
46 | 46 | ${h.form(h.url('search'),method='get')} |
|
47 | 47 | %endif |
|
48 | 48 | <div class="form"> |
|
49 | 49 | <div class="fields"> |
|
50 | 50 | <div class="field field-first field-noborder"> |
|
51 | 51 | <div class="label"> |
|
52 | 52 | <label for="q">${_('Search term')}</label> |
|
53 | 53 | </div> |
|
54 | 54 | <div class="input">${h.text('q',c.cur_query,class_="small")} |
|
55 | 55 | <div class="button highlight"> |
|
56 | 56 | <input type="submit" value="${_('Search')}" class="ui-button"/> |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | <div style="font-weight: bold;clear:Both;margin-left:200px">${c.runtime}</div> |
|
60 | 60 | </div> |
|
61 | 61 | |
|
62 | 62 | <div class="field"> |
|
63 | 63 | <div class="label"> |
|
64 | 64 | <label for="type">${_('Search in')}</label> |
|
65 | 65 | </div> |
|
66 | 66 | <div class="select"> |
|
67 | 67 | ${h.select('type',c.cur_type,[('content',_('File contents')), |
|
68 | 68 | ('commit',_('Commit messages')), |
|
69 | 69 | ('path',_('File names')), |
|
70 | 70 | ##('repository',_('Repository names')), |
|
71 | 71 | ])} |
|
72 | 72 | </div> |
|
73 | 73 | </div> |
|
74 | 74 | |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | 77 | ${h.end_form()} |
|
78 | 78 | <div class="search"> |
|
79 | 79 | %if c.cur_type == 'content': |
|
80 | 80 | <%include file='search_content.html'/> |
|
81 | 81 | %elif c.cur_type == 'path': |
|
82 | 82 | <%include file='search_path.html'/> |
|
83 | 83 | %elif c.cur_type == 'commit': |
|
84 | 84 | <%include file='search_commit.html'/> |
|
85 | 85 | %elif c.cur_type == 'repository': |
|
86 | 86 | <%include file='search_repository.html'/> |
|
87 | 87 | %endif |
|
88 | 88 | </div> |
|
89 | 89 | </div> |
|
90 | 90 | |
|
91 | 91 | </%def> |
@@ -1,39 +1,39 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Shortlog') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
11 | 11 | » |
|
12 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
13 | 13 | » |
|
14 | 14 | %if c.file_history: |
|
15 | 15 | ${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} |
|
16 | 16 | » |
|
17 | 17 | ${c.file_history} |
|
18 | 18 | %else: |
|
19 | 19 | ${_('shortlog')} |
|
20 | 20 | %endif |
|
21 | 21 | </%def> |
|
22 | 22 | |
|
23 | 23 | <%def name="page_nav()"> |
|
24 | 24 | ${self.menu('shortlog')} |
|
25 | 25 | </%def> |
|
26 | 26 | <%def name="main()"> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <!-- box / title --> |
|
29 | 29 | <div class="title"> |
|
30 | 30 | ${self.breadcrumbs()} |
|
31 | 31 | </div> |
|
32 | 32 | <!-- end box / title --> |
|
33 | 33 | <div class="table"> |
|
34 | 34 | <div id="shortlog_data"> |
|
35 | 35 | ${c.shortlog_data} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | </div> |
|
39 | 39 | </%def> |
@@ -1,725 +1,725 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Summary') % c.repo_name} - ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | 8 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
9 | 9 | » |
|
10 | ${h.repo_link(c.dbrepo.groups_and_repo)} | |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
11 | 11 | » |
|
12 | 12 | ${_('summary')} |
|
13 | 13 | </%def> |
|
14 | 14 | |
|
15 | 15 | <%def name="page_nav()"> |
|
16 | 16 | ${self.menu('summary')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="head_extra()"> |
|
20 | 20 | <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" /> |
|
21 | 21 | <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" /> |
|
22 | 22 | </%def> |
|
23 | 23 | |
|
24 | 24 | <%def name="main()"> |
|
25 | 25 | <% |
|
26 | 26 | summary = lambda n:{False:'summary-short'}.get(n) |
|
27 | 27 | %> |
|
28 | 28 | %if c.show_stats: |
|
29 | 29 | <div class="box box-left"> |
|
30 | 30 | %else: |
|
31 | 31 | <div class="box"> |
|
32 | 32 | %endif |
|
33 | 33 | <!-- box / title --> |
|
34 | 34 | <div class="title"> |
|
35 | 35 | ${self.breadcrumbs()} |
|
36 | 36 | </div> |
|
37 | 37 | <!-- end box / title --> |
|
38 | 38 | <div class="form"> |
|
39 | 39 | <div id="summary" class="fields"> |
|
40 | 40 | |
|
41 | 41 | <div class="field"> |
|
42 | 42 | <div class="label-summary"> |
|
43 | 43 | <label>${_('Name')}:</label> |
|
44 | 44 | </div> |
|
45 | 45 | <div class="input ${summary(c.show_stats)}"> |
|
46 | 46 | <div style="float:right;padding:5px 0px 0px 5px"> |
|
47 | 47 | %if c.rhodecode_user.username != 'default': |
|
48 | 48 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')} |
|
49 | 49 | %else: |
|
50 | 50 | ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')} |
|
51 | 51 | %endif |
|
52 | 52 | </div> |
|
53 | 53 | %if c.rhodecode_user.username != 'default': |
|
54 | 54 | %if c.following: |
|
55 | 55 | <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}" |
|
56 | 56 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
|
57 | 57 | </span> |
|
58 | 58 | %else: |
|
59 | 59 | <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}" |
|
60 | 60 | onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
|
61 | 61 | </span> |
|
62 | 62 | %endif |
|
63 | 63 | <div style="float:right;padding:0px 0px 0px 0px"> |
|
64 | 64 | <span class="reposize tooltip" title="${_('Click to show size of repository')}" |
|
65 | 65 | onclick="javascript:showRepoSize('repo_size','${c.dbrepo.repo_name}','${str(h.get_token())}')"> |
|
66 | 66 | </span> |
|
67 | 67 | <span id="repo_size"></span> |
|
68 | 68 | </div> |
|
69 | 69 | %endif: |
|
70 | 70 | |
|
71 | 71 | ## locking icon |
|
72 | 72 | %if c.rhodecode_db_repo.enable_locking: |
|
73 | 73 | %if c.rhodecode_db_repo.locked[0]: |
|
74 | 74 | <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> |
|
75 | 75 | %else: |
|
76 | 76 | <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span> |
|
77 | 77 | %endif |
|
78 | 78 | %endif |
|
79 | 79 | ##REPO TYPE |
|
80 | 80 | %if h.is_hg(c.dbrepo): |
|
81 | 81 | <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
82 | 82 | %endif |
|
83 | 83 | %if h.is_git(c.dbrepo): |
|
84 | 84 | <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
85 | 85 | %endif |
|
86 | 86 | |
|
87 | 87 | ##PUBLIC/PRIVATE |
|
88 | 88 | %if c.dbrepo.private: |
|
89 | 89 | <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
|
90 | 90 | %else: |
|
91 | 91 | <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
|
92 | 92 | %endif |
|
93 | 93 | |
|
94 | 94 | ##REPO NAME |
|
95 | 95 | <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span> |
|
96 | 96 | |
|
97 | 97 | ##FORK |
|
98 | 98 | %if c.dbrepo.fork: |
|
99 | 99 | <div style="margin-top:5px;clear:both""> |
|
100 | 100 | <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/> |
|
101 | 101 | ${_('Fork of')} ${c.dbrepo.fork.repo_name} |
|
102 | 102 | </a> |
|
103 | 103 | </div> |
|
104 | 104 | %endif |
|
105 | 105 | ##REMOTE |
|
106 | 106 | %if c.dbrepo.clone_uri: |
|
107 | 107 | <div style="margin-top:5px;clear:both"> |
|
108 | 108 | <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/> |
|
109 | 109 | ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)} |
|
110 | 110 | </a> |
|
111 | 111 | </div> |
|
112 | 112 | %endif |
|
113 | 113 | </div> |
|
114 | 114 | </div> |
|
115 | 115 | |
|
116 | 116 | <div class="field"> |
|
117 | 117 | <div class="label-summary"> |
|
118 | 118 | <label>${_('Description')}:</label> |
|
119 | 119 | </div> |
|
120 | 120 | %if c.visual.stylify_metatags: |
|
121 | 121 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div> |
|
122 | 122 | %else: |
|
123 | 123 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div> |
|
124 | 124 | %endif |
|
125 | 125 | </div> |
|
126 | 126 | |
|
127 | 127 | <div class="field"> |
|
128 | 128 | <div class="label-summary"> |
|
129 | 129 | <label>${_('Contact')}:</label> |
|
130 | 130 | </div> |
|
131 | 131 | <div class="input ${summary(c.show_stats)}"> |
|
132 | 132 | <div class="gravatar"> |
|
133 | 133 | <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> |
|
134 | 134 | </div> |
|
135 | 135 | ${_('Username')}: ${c.dbrepo.user.username}<br/> |
|
136 | 136 | ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> |
|
137 | 137 | ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> |
|
138 | 138 | </div> |
|
139 | 139 | </div> |
|
140 | 140 | |
|
141 | 141 | <div class="field"> |
|
142 | 142 | <div class="label-summary"> |
|
143 | 143 | <label>${_('Clone url')}:</label> |
|
144 | 144 | </div> |
|
145 | 145 | <div class="input ${summary(c.show_stats)}"> |
|
146 | 146 | <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
|
147 | 147 | <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
148 | 148 | <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> |
|
149 | 149 | <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> |
|
150 | 150 | </div> |
|
151 | 151 | </div> |
|
152 | 152 | |
|
153 | 153 | <div class="field"> |
|
154 | 154 | <div class="label-summary"> |
|
155 | 155 | <label>${_('Trending files')}:</label> |
|
156 | 156 | </div> |
|
157 | 157 | <div class="input ${summary(c.show_stats)}"> |
|
158 | 158 | %if c.show_stats: |
|
159 | 159 | <div id="lang_stats"></div> |
|
160 | 160 | %else: |
|
161 | 161 | ${_('Statistics are disabled for this repository')} |
|
162 | 162 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
163 | 163 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
164 | 164 | %endif |
|
165 | 165 | %endif |
|
166 | 166 | </div> |
|
167 | 167 | </div> |
|
168 | 168 | |
|
169 | 169 | <div class="field"> |
|
170 | 170 | <div class="label-summary"> |
|
171 | 171 | <label>${_('Download')}:</label> |
|
172 | 172 | </div> |
|
173 | 173 | <div class="input ${summary(c.show_stats)}"> |
|
174 | 174 | %if len(c.rhodecode_repo.revisions) == 0: |
|
175 | 175 | ${_('There are no downloads yet')} |
|
176 | 176 | %elif c.enable_downloads is False: |
|
177 | 177 | ${_('Downloads are disabled for this repository')} |
|
178 | 178 | %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
179 | 179 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
180 | 180 | %endif |
|
181 | 181 | %else: |
|
182 | 182 | ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} |
|
183 | 183 | <span id="${'zip_link'}">${h.link_to(_('Download as zip'), h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span> |
|
184 | 184 | <span style="vertical-align: bottom"> |
|
185 | 185 | <input id="archive_subrepos" type="checkbox" name="subrepos" /> |
|
186 | 186 | <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label> |
|
187 | 187 | </span> |
|
188 | 188 | %endif |
|
189 | 189 | </div> |
|
190 | 190 | </div> |
|
191 | 191 | </div> |
|
192 | 192 | </div> |
|
193 | 193 | </div> |
|
194 | 194 | |
|
195 | 195 | %if c.show_stats: |
|
196 | 196 | <div class="box box-right" style="min-height:455px"> |
|
197 | 197 | <!-- box / title --> |
|
198 | 198 | <div class="title"> |
|
199 | 199 | <h5>${_('Commit activity by day / author')}</h5> |
|
200 | 200 | </div> |
|
201 | 201 | |
|
202 | 202 | <div class="graph"> |
|
203 | 203 | <div style="padding:0 10px 10px 17px;"> |
|
204 | 204 | %if c.no_data: |
|
205 | 205 | ${c.no_data_msg} |
|
206 | 206 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
207 | 207 | ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
|
208 | 208 | %endif |
|
209 | 209 | %else: |
|
210 | 210 | ${_('Stats gathered: ')} ${c.stats_percentage}% |
|
211 | 211 | %endif |
|
212 | 212 | </div> |
|
213 | 213 | <div id="commit_history" style="width:450px;height:300px;float:left"></div> |
|
214 | 214 | <div style="clear: both;height: 10px"></div> |
|
215 | 215 | <div id="overview" style="width:450px;height:100px;float:left"></div> |
|
216 | 216 | |
|
217 | 217 | <div id="legend_data" style="clear:both;margin-top:10px;"> |
|
218 | 218 | <div id="legend_container"></div> |
|
219 | 219 | <div id="legend_choices"> |
|
220 | 220 | <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> |
|
221 | 221 | </div> |
|
222 | 222 | </div> |
|
223 | 223 | </div> |
|
224 | 224 | </div> |
|
225 | 225 | %endif |
|
226 | 226 | |
|
227 | 227 | <div class="box"> |
|
228 | 228 | <div class="title"> |
|
229 | 229 | <div class="breadcrumbs"> |
|
230 | 230 | %if c.repo_changesets: |
|
231 | 231 | ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))} |
|
232 | 232 | %else: |
|
233 | 233 | ${_('Quick start')} |
|
234 | 234 | %endif |
|
235 | 235 | </div> |
|
236 | 236 | </div> |
|
237 | 237 | <div class="table"> |
|
238 | 238 | <div id="shortlog_data"> |
|
239 | 239 | <%include file='../shortlog/shortlog_data.html'/> |
|
240 | 240 | </div> |
|
241 | 241 | </div> |
|
242 | 242 | </div> |
|
243 | 243 | |
|
244 | 244 | %if c.readme_data: |
|
245 | 245 | <div id="readme" class="anchor"> |
|
246 | 246 | <div class="box" style="background-color: #FAFAFA"> |
|
247 | 247 | <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}"> |
|
248 | 248 | <div class="breadcrumbs"> |
|
249 | 249 | <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a> |
|
250 | 250 | <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> |
|
251 | 251 | </div> |
|
252 | 252 | </div> |
|
253 | 253 | <div class="readme"> |
|
254 | 254 | <div class="readme_box"> |
|
255 | 255 | ${c.readme_data|n} |
|
256 | 256 | </div> |
|
257 | 257 | </div> |
|
258 | 258 | </div> |
|
259 | 259 | </div> |
|
260 | 260 | %endif |
|
261 | 261 | |
|
262 | 262 | <script type="text/javascript"> |
|
263 | 263 | var clone_url = 'clone_url'; |
|
264 | 264 | YUE.on(clone_url,'click',function(e){ |
|
265 | 265 | if(YUD.hasClass(clone_url,'selected')){ |
|
266 | 266 | return |
|
267 | 267 | } |
|
268 | 268 | else{ |
|
269 | 269 | YUD.addClass(clone_url,'selected'); |
|
270 | 270 | YUD.get(clone_url).select(); |
|
271 | 271 | } |
|
272 | 272 | }) |
|
273 | 273 | |
|
274 | 274 | YUE.on('clone_by_name','click',function(e){ |
|
275 | 275 | // show url by name and hide name button |
|
276 | 276 | YUD.setStyle('clone_url','display',''); |
|
277 | 277 | YUD.setStyle('clone_by_name','display','none'); |
|
278 | 278 | |
|
279 | 279 | // hide url by id and show name button |
|
280 | 280 | YUD.setStyle('clone_by_id','display',''); |
|
281 | 281 | YUD.setStyle('clone_url_id','display','none'); |
|
282 | 282 | |
|
283 | 283 | }) |
|
284 | 284 | YUE.on('clone_by_id','click',function(e){ |
|
285 | 285 | |
|
286 | 286 | // show url by id and hide id button |
|
287 | 287 | YUD.setStyle('clone_by_id','display','none'); |
|
288 | 288 | YUD.setStyle('clone_url_id','display',''); |
|
289 | 289 | |
|
290 | 290 | // hide url by name and show id button |
|
291 | 291 | YUD.setStyle('clone_by_name','display',''); |
|
292 | 292 | YUD.setStyle('clone_url','display','none'); |
|
293 | 293 | }) |
|
294 | 294 | |
|
295 | 295 | |
|
296 | 296 | var tmpl_links = {}; |
|
297 | 297 | %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
|
298 | 298 | tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}'; |
|
299 | 299 | %endfor |
|
300 | 300 | |
|
301 | 301 | YUE.on(['download_options','archive_subrepos'],'change',function(e){ |
|
302 | 302 | var sm = YUD.get('download_options'); |
|
303 | 303 | var new_cs = sm.options[sm.selectedIndex]; |
|
304 | 304 | |
|
305 | 305 | for(k in tmpl_links){ |
|
306 | 306 | var s = YUD.get(k+'_link'); |
|
307 | 307 | if(s){ |
|
308 | 308 | var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}"; |
|
309 | 309 | title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text); |
|
310 | 310 | title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
|
311 | 311 | |
|
312 | 312 | var url = tmpl_links[k].replace('__CS__',new_cs.value); |
|
313 | 313 | var subrepos = YUD.get('archive_subrepos').checked; |
|
314 | 314 | url = url.replace('__SUB__',subrepos); |
|
315 | 315 | url = url.replace('__NAME__',title_tmpl); |
|
316 | 316 | s.innerHTML = url |
|
317 | 317 | } |
|
318 | 318 | } |
|
319 | 319 | }); |
|
320 | 320 | </script> |
|
321 | 321 | %if c.show_stats: |
|
322 | 322 | <script type="text/javascript"> |
|
323 | 323 | var data = ${c.trending_languages|n}; |
|
324 | 324 | var total = 0; |
|
325 | 325 | var no_data = true; |
|
326 | 326 | var tbl = document.createElement('table'); |
|
327 | 327 | tbl.setAttribute('class','trending_language_tbl'); |
|
328 | 328 | var cnt = 0; |
|
329 | 329 | for (var i=0;i<data.length;i++){ |
|
330 | 330 | total+= data[i][1].count; |
|
331 | 331 | } |
|
332 | 332 | for (var i=0;i<data.length;i++){ |
|
333 | 333 | cnt += 1; |
|
334 | 334 | no_data = false; |
|
335 | 335 | |
|
336 | 336 | var hide = cnt>2; |
|
337 | 337 | var tr = document.createElement('tr'); |
|
338 | 338 | if (hide){ |
|
339 | 339 | tr.setAttribute('style','display:none'); |
|
340 | 340 | tr.setAttribute('class','stats_hidden'); |
|
341 | 341 | } |
|
342 | 342 | var k = data[i][0]; |
|
343 | 343 | var obj = data[i][1]; |
|
344 | 344 | var percentage = Math.round((obj.count/total*100),2); |
|
345 | 345 | |
|
346 | 346 | var td1 = document.createElement('td'); |
|
347 | 347 | td1.width = 150; |
|
348 | 348 | var trending_language_label = document.createElement('div'); |
|
349 | 349 | trending_language_label.innerHTML = obj.desc+" ("+k+")"; |
|
350 | 350 | td1.appendChild(trending_language_label); |
|
351 | 351 | |
|
352 | 352 | var td2 = document.createElement('td'); |
|
353 | 353 | td2.setAttribute('style','padding-right:14px !important'); |
|
354 | 354 | var trending_language = document.createElement('div'); |
|
355 | 355 | var nr_files = obj.count+" ${_('files')}"; |
|
356 | 356 | |
|
357 | 357 | trending_language.title = k+" "+nr_files; |
|
358 | 358 | |
|
359 | 359 | if (percentage>22){ |
|
360 | 360 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>"; |
|
361 | 361 | } |
|
362 | 362 | else{ |
|
363 | 363 | trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>"; |
|
364 | 364 | } |
|
365 | 365 | |
|
366 | 366 | trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner'); |
|
367 | 367 | trending_language.style.width=percentage+"%"; |
|
368 | 368 | td2.appendChild(trending_language); |
|
369 | 369 | |
|
370 | 370 | tr.appendChild(td1); |
|
371 | 371 | tr.appendChild(td2); |
|
372 | 372 | tbl.appendChild(tr); |
|
373 | 373 | if(cnt == 3){ |
|
374 | 374 | var show_more = document.createElement('tr'); |
|
375 | 375 | var td = document.createElement('td'); |
|
376 | 376 | lnk = document.createElement('a'); |
|
377 | 377 | |
|
378 | 378 | lnk.href='#'; |
|
379 | 379 | lnk.innerHTML = "${_('show more')}"; |
|
380 | 380 | lnk.id='code_stats_show_more'; |
|
381 | 381 | td.appendChild(lnk); |
|
382 | 382 | |
|
383 | 383 | show_more.appendChild(td); |
|
384 | 384 | show_more.appendChild(document.createElement('td')); |
|
385 | 385 | tbl.appendChild(show_more); |
|
386 | 386 | } |
|
387 | 387 | |
|
388 | 388 | } |
|
389 | 389 | |
|
390 | 390 | YUD.get('lang_stats').appendChild(tbl); |
|
391 | 391 | YUE.on('code_stats_show_more','click',function(){ |
|
392 | 392 | l = YUD.getElementsByClassName('stats_hidden') |
|
393 | 393 | for (e in l){ |
|
394 | 394 | YUD.setStyle(l[e],'display',''); |
|
395 | 395 | }; |
|
396 | 396 | YUD.setStyle(YUD.get('code_stats_show_more'), |
|
397 | 397 | 'display','none'); |
|
398 | 398 | }); |
|
399 | 399 | </script> |
|
400 | 400 | <script type="text/javascript"> |
|
401 | 401 | /** |
|
402 | 402 | * Plots summary graph |
|
403 | 403 | * |
|
404 | 404 | * @class SummaryPlot |
|
405 | 405 | * @param {from} initial from for detailed graph |
|
406 | 406 | * @param {to} initial to for detailed graph |
|
407 | 407 | * @param {dataset} |
|
408 | 408 | * @param {overview_dataset} |
|
409 | 409 | */ |
|
410 | 410 | function SummaryPlot(from,to,dataset,overview_dataset) { |
|
411 | 411 | var initial_ranges = { |
|
412 | 412 | "xaxis":{ |
|
413 | 413 | "from":from, |
|
414 | 414 | "to":to, |
|
415 | 415 | }, |
|
416 | 416 | }; |
|
417 | 417 | var dataset = dataset; |
|
418 | 418 | var overview_dataset = [overview_dataset]; |
|
419 | 419 | var choiceContainer = YUD.get("legend_choices"); |
|
420 | 420 | var choiceContainerTable = YUD.get("legend_choices_tables"); |
|
421 | 421 | var plotContainer = YUD.get('commit_history'); |
|
422 | 422 | var overviewContainer = YUD.get('overview'); |
|
423 | 423 | |
|
424 | 424 | var plot_options = { |
|
425 | 425 | bars: {show:true,align:'center',lineWidth:4}, |
|
426 | 426 | legend: {show:true, container:"legend_container"}, |
|
427 | 427 | points: {show:true,radius:0,fill:false}, |
|
428 | 428 | yaxis: {tickDecimals:0,}, |
|
429 | 429 | xaxis: { |
|
430 | 430 | mode: "time", |
|
431 | 431 | timeformat: "%d/%m", |
|
432 | 432 | min:from, |
|
433 | 433 | max:to, |
|
434 | 434 | }, |
|
435 | 435 | grid: { |
|
436 | 436 | hoverable: true, |
|
437 | 437 | clickable: true, |
|
438 | 438 | autoHighlight:true, |
|
439 | 439 | color: "#999" |
|
440 | 440 | }, |
|
441 | 441 | //selection: {mode: "x"} |
|
442 | 442 | }; |
|
443 | 443 | var overview_options = { |
|
444 | 444 | legend:{show:false}, |
|
445 | 445 | bars: {show:true,barWidth: 2,}, |
|
446 | 446 | shadowSize: 0, |
|
447 | 447 | xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
|
448 | 448 | yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
|
449 | 449 | grid: {color: "#999",}, |
|
450 | 450 | selection: {mode: "x"} |
|
451 | 451 | }; |
|
452 | 452 | |
|
453 | 453 | /** |
|
454 | 454 | *get dummy data needed in few places |
|
455 | 455 | */ |
|
456 | 456 | function getDummyData(label){ |
|
457 | 457 | return {"label":label, |
|
458 | 458 | "data":[{"time":0, |
|
459 | 459 | "commits":0, |
|
460 | 460 | "added":0, |
|
461 | 461 | "changed":0, |
|
462 | 462 | "removed":0, |
|
463 | 463 | }], |
|
464 | 464 | "schema":["commits"], |
|
465 | 465 | "color":'#ffffff', |
|
466 | 466 | } |
|
467 | 467 | } |
|
468 | 468 | |
|
469 | 469 | /** |
|
470 | 470 | * generate checkboxes accordindly to data |
|
471 | 471 | * @param keys |
|
472 | 472 | * @returns |
|
473 | 473 | */ |
|
474 | 474 | function generateCheckboxes(data) { |
|
475 | 475 | //append checkboxes |
|
476 | 476 | var i = 0; |
|
477 | 477 | choiceContainerTable.innerHTML = ''; |
|
478 | 478 | for(var pos in data) { |
|
479 | 479 | |
|
480 | 480 | data[pos].color = i; |
|
481 | 481 | i++; |
|
482 | 482 | if(data[pos].label != ''){ |
|
483 | 483 | choiceContainerTable.innerHTML += |
|
484 | 484 | '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \ |
|
485 | 485 | <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label); |
|
486 | 486 | } |
|
487 | 487 | } |
|
488 | 488 | } |
|
489 | 489 | |
|
490 | 490 | /** |
|
491 | 491 | * ToolTip show |
|
492 | 492 | */ |
|
493 | 493 | function showTooltip(x, y, contents) { |
|
494 | 494 | var div=document.getElementById('tooltip'); |
|
495 | 495 | if(!div) { |
|
496 | 496 | div = document.createElement('div'); |
|
497 | 497 | div.id="tooltip"; |
|
498 | 498 | div.style.position="absolute"; |
|
499 | 499 | div.style.border='1px solid #fdd'; |
|
500 | 500 | div.style.padding='2px'; |
|
501 | 501 | div.style.backgroundColor='#fee'; |
|
502 | 502 | document.body.appendChild(div); |
|
503 | 503 | } |
|
504 | 504 | YUD.setStyle(div, 'opacity', 0); |
|
505 | 505 | div.innerHTML = contents; |
|
506 | 506 | div.style.top=(y + 5) + "px"; |
|
507 | 507 | div.style.left=(x + 5) + "px"; |
|
508 | 508 | |
|
509 | 509 | var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2); |
|
510 | 510 | anim.animate(); |
|
511 | 511 | } |
|
512 | 512 | |
|
513 | 513 | /** |
|
514 | 514 | * This function will detect if selected period has some changesets |
|
515 | 515 | for this user if it does this data is then pushed for displaying |
|
516 | 516 | Additionally it will only display users that are selected by the checkbox |
|
517 | 517 | */ |
|
518 | 518 | function getDataAccordingToRanges(ranges) { |
|
519 | 519 | |
|
520 | 520 | var data = []; |
|
521 | 521 | var new_dataset = {}; |
|
522 | 522 | var keys = []; |
|
523 | 523 | var max_commits = 0; |
|
524 | 524 | for(var key in dataset){ |
|
525 | 525 | |
|
526 | 526 | for(var ds in dataset[key].data){ |
|
527 | 527 | commit_data = dataset[key].data[ds]; |
|
528 | 528 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ |
|
529 | 529 | |
|
530 | 530 | if(new_dataset[key] === undefined){ |
|
531 | 531 | new_dataset[key] = {data:[],schema:["commits"],label:key}; |
|
532 | 532 | } |
|
533 | 533 | new_dataset[key].data.push(commit_data); |
|
534 | 534 | } |
|
535 | 535 | } |
|
536 | 536 | if (new_dataset[key] !== undefined){ |
|
537 | 537 | data.push(new_dataset[key]); |
|
538 | 538 | } |
|
539 | 539 | } |
|
540 | 540 | |
|
541 | 541 | if (data.length > 0){ |
|
542 | 542 | return data; |
|
543 | 543 | } |
|
544 | 544 | else{ |
|
545 | 545 | //just return dummy data for graph to plot itself |
|
546 | 546 | return [getDummyData('')]; |
|
547 | 547 | } |
|
548 | 548 | } |
|
549 | 549 | |
|
550 | 550 | /** |
|
551 | 551 | * redraw using new checkbox data |
|
552 | 552 | */ |
|
553 | 553 | function plotchoiced(e,args){ |
|
554 | 554 | var cur_data = args[0]; |
|
555 | 555 | var cur_ranges = args[1]; |
|
556 | 556 | |
|
557 | 557 | var new_data = []; |
|
558 | 558 | var inputs = choiceContainer.getElementsByTagName("input"); |
|
559 | 559 | |
|
560 | 560 | //show only checked labels |
|
561 | 561 | for(var i=0; i<inputs.length; i++) { |
|
562 | 562 | var checkbox_key = inputs[i].name; |
|
563 | 563 | |
|
564 | 564 | if(inputs[i].checked){ |
|
565 | 565 | for(var d in cur_data){ |
|
566 | 566 | if(cur_data[d].label == checkbox_key){ |
|
567 | 567 | new_data.push(cur_data[d]); |
|
568 | 568 | } |
|
569 | 569 | } |
|
570 | 570 | } |
|
571 | 571 | else{ |
|
572 | 572 | //push dummy data to not hide the label |
|
573 | 573 | new_data.push(getDummyData(checkbox_key)); |
|
574 | 574 | } |
|
575 | 575 | } |
|
576 | 576 | |
|
577 | 577 | var new_options = YAHOO.lang.merge(plot_options, { |
|
578 | 578 | xaxis: { |
|
579 | 579 | min: cur_ranges.xaxis.from, |
|
580 | 580 | max: cur_ranges.xaxis.to, |
|
581 | 581 | mode:"time", |
|
582 | 582 | timeformat: "%d/%m", |
|
583 | 583 | }, |
|
584 | 584 | }); |
|
585 | 585 | if (!new_data){ |
|
586 | 586 | new_data = [[0,1]]; |
|
587 | 587 | } |
|
588 | 588 | // do the zooming |
|
589 | 589 | plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
|
590 | 590 | |
|
591 | 591 | plot.subscribe("plotselected", plotselected); |
|
592 | 592 | |
|
593 | 593 | //resubscribe plothover |
|
594 | 594 | plot.subscribe("plothover", plothover); |
|
595 | 595 | |
|
596 | 596 | // don't fire event on the overview to prevent eternal loop |
|
597 | 597 | overview.setSelection(cur_ranges, true); |
|
598 | 598 | |
|
599 | 599 | } |
|
600 | 600 | |
|
601 | 601 | /** |
|
602 | 602 | * plot only selected items from overview |
|
603 | 603 | * @param ranges |
|
604 | 604 | * @returns |
|
605 | 605 | */ |
|
606 | 606 | function plotselected(ranges,cur_data) { |
|
607 | 607 | //updates the data for new plot |
|
608 | 608 | var data = getDataAccordingToRanges(ranges); |
|
609 | 609 | generateCheckboxes(data); |
|
610 | 610 | |
|
611 | 611 | var new_options = YAHOO.lang.merge(plot_options, { |
|
612 | 612 | xaxis: { |
|
613 | 613 | min: ranges.xaxis.from, |
|
614 | 614 | max: ranges.xaxis.to, |
|
615 | 615 | mode:"time", |
|
616 | 616 | timeformat: "%d/%m", |
|
617 | 617 | }, |
|
618 | 618 | }); |
|
619 | 619 | // do the zooming |
|
620 | 620 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); |
|
621 | 621 | |
|
622 | 622 | plot.subscribe("plotselected", plotselected); |
|
623 | 623 | |
|
624 | 624 | //resubscribe plothover |
|
625 | 625 | plot.subscribe("plothover", plothover); |
|
626 | 626 | |
|
627 | 627 | // don't fire event on the overview to prevent eternal loop |
|
628 | 628 | overview.setSelection(ranges, true); |
|
629 | 629 | |
|
630 | 630 | //resubscribe choiced |
|
631 | 631 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]); |
|
632 | 632 | } |
|
633 | 633 | |
|
634 | 634 | var previousPoint = null; |
|
635 | 635 | |
|
636 | 636 | function plothover(o) { |
|
637 | 637 | var pos = o.pos; |
|
638 | 638 | var item = o.item; |
|
639 | 639 | |
|
640 | 640 | //YUD.get("x").innerHTML = pos.x.toFixed(2); |
|
641 | 641 | //YUD.get("y").innerHTML = pos.y.toFixed(2); |
|
642 | 642 | if (item) { |
|
643 | 643 | if (previousPoint != item.datapoint) { |
|
644 | 644 | previousPoint = item.datapoint; |
|
645 | 645 | |
|
646 | 646 | var tooltip = YUD.get("tooltip"); |
|
647 | 647 | if(tooltip) { |
|
648 | 648 | tooltip.parentNode.removeChild(tooltip); |
|
649 | 649 | } |
|
650 | 650 | var x = item.datapoint.x.toFixed(2); |
|
651 | 651 | var y = item.datapoint.y.toFixed(2); |
|
652 | 652 | |
|
653 | 653 | if (!item.series.label){ |
|
654 | 654 | item.series.label = 'commits'; |
|
655 | 655 | } |
|
656 | 656 | var d = new Date(x*1000); |
|
657 | 657 | var fd = d.toDateString() |
|
658 | 658 | var nr_commits = parseInt(y); |
|
659 | 659 | |
|
660 | 660 | var cur_data = dataset[item.series.label].data[item.dataIndex]; |
|
661 | 661 | var added = cur_data.added; |
|
662 | 662 | var changed = cur_data.changed; |
|
663 | 663 | var removed = cur_data.removed; |
|
664 | 664 | |
|
665 | 665 | var nr_commits_suffix = " ${_('commits')} "; |
|
666 | 666 | var added_suffix = " ${_('files added')} "; |
|
667 | 667 | var changed_suffix = " ${_('files changed')} "; |
|
668 | 668 | var removed_suffix = " ${_('files removed')} "; |
|
669 | 669 | |
|
670 | 670 | |
|
671 | 671 | if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";} |
|
672 | 672 | if(added==1){added_suffix=" ${_('file added')} ";} |
|
673 | 673 | if(changed==1){changed_suffix=" ${_('file changed')} ";} |
|
674 | 674 | if(removed==1){removed_suffix=" ${_('file removed')} ";} |
|
675 | 675 | |
|
676 | 676 | showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd |
|
677 | 677 | +'<br/>'+ |
|
678 | 678 | nr_commits + nr_commits_suffix+'<br/>'+ |
|
679 | 679 | added + added_suffix +'<br/>'+ |
|
680 | 680 | changed + changed_suffix + '<br/>'+ |
|
681 | 681 | removed + removed_suffix + '<br/>'); |
|
682 | 682 | } |
|
683 | 683 | } |
|
684 | 684 | else { |
|
685 | 685 | var tooltip = YUD.get("tooltip"); |
|
686 | 686 | |
|
687 | 687 | if(tooltip) { |
|
688 | 688 | tooltip.parentNode.removeChild(tooltip); |
|
689 | 689 | } |
|
690 | 690 | previousPoint = null; |
|
691 | 691 | } |
|
692 | 692 | } |
|
693 | 693 | |
|
694 | 694 | /** |
|
695 | 695 | * MAIN EXECUTION |
|
696 | 696 | */ |
|
697 | 697 | |
|
698 | 698 | var data = getDataAccordingToRanges(initial_ranges); |
|
699 | 699 | generateCheckboxes(data); |
|
700 | 700 | |
|
701 | 701 | //main plot |
|
702 | 702 | var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
|
703 | 703 | |
|
704 | 704 | //overview |
|
705 | 705 | var overview = YAHOO.widget.Flot(overviewContainer, |
|
706 | 706 | overview_dataset, overview_options); |
|
707 | 707 | |
|
708 | 708 | //show initial selection on overview |
|
709 | 709 | overview.setSelection(initial_ranges); |
|
710 | 710 | |
|
711 | 711 | plot.subscribe("plotselected", plotselected); |
|
712 | 712 | plot.subscribe("plothover", plothover) |
|
713 | 713 | |
|
714 | 714 | overview.subscribe("plotselected", function (ranges) { |
|
715 | 715 | plot.setSelection(ranges); |
|
716 | 716 | }); |
|
717 | 717 | |
|
718 | 718 | // user choices on overview |
|
719 | 719 | YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]); |
|
720 | 720 | } |
|
721 | 721 | SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n}); |
|
722 | 722 | </script> |
|
723 | 723 | %endif |
|
724 | 724 | |
|
725 | 725 | </%def> |
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Tags') % c.repo_name} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
|
11 | 11 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
12 | 12 | » |
|
13 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
13 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
14 | 14 | » |
|
15 | 15 | ${_('tags')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="page_nav()"> |
|
19 | 19 | ${self.menu('tags')} |
|
20 | 20 | </%def> |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <div class="box"> |
|
23 | 23 | <!-- box / title --> |
|
24 | 24 | <div class="title"> |
|
25 | 25 | ${self.breadcrumbs()} |
|
26 | 26 | </div> |
|
27 | 27 | <!-- end box / title --> |
|
28 | 28 | %if c.repo_tags: |
|
29 | 29 | <div class="info_box" id="compare_tags" style="clear: both;padding: 10px 19px;vertical-align: right;text-align: right;"><a href="#" class="ui-btn small">${_('Compare tags')}</a></div> |
|
30 | 30 | %endif |
|
31 | 31 | <div class="table"> |
|
32 | 32 | <%include file='tags_data.html'/> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <script type="text/javascript"> |
|
36 | 36 | YUE.on('compare_tags','click',function(e){ |
|
37 | 37 | YUE.preventDefault(e); |
|
38 | 38 | var org = YUQ('input[name=compare_org]:checked')[0]; |
|
39 | 39 | var other = YUQ('input[name=compare_other]:checked')[0]; |
|
40 | 40 | |
|
41 | 41 | if(org && other){ |
|
42 | 42 | var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='tag',org_ref='__ORG__',other_ref_type='tag',other_ref='__OTHER__')}"; |
|
43 | 43 | var u = compare_url.replace('__ORG__',org.value) |
|
44 | 44 | .replace('__OTHER__',other.value); |
|
45 | 45 | window.location=u; |
|
46 | 46 | } |
|
47 | 47 | }); |
|
48 | 48 | |
|
49 | 49 | // main table sorting |
|
50 | 50 | var myColumnDefs = [ |
|
51 | 51 | {key:"name",label:"${_('Name')}",sortable:true}, |
|
52 | 52 | {key:"date",label:"${_('Date')}",sortable:true, |
|
53 | 53 | sortOptions: { sortFunction: dateSort }}, |
|
54 | 54 | {key:"author",label:"${_('Author')}",sortable:true}, |
|
55 | 55 | {key:"revision",label:"${_('Revision')}",sortable:true, |
|
56 | 56 | sortOptions: { sortFunction: revisionSort }}, |
|
57 | 57 | {key:"compare",label:"${_('Compare')}",sortable:false,}, |
|
58 | 58 | ]; |
|
59 | 59 | |
|
60 | 60 | var myDataSource = new YAHOO.util.DataSource(YUD.get("tags_data")); |
|
61 | 61 | |
|
62 | 62 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
|
63 | 63 | |
|
64 | 64 | myDataSource.responseSchema = { |
|
65 | 65 | fields: [ |
|
66 | 66 | {key:"name"}, |
|
67 | 67 | {key:"date"}, |
|
68 | 68 | {key:"author"}, |
|
69 | 69 | {key:"revision"}, |
|
70 | 70 | {key:"compare"}, |
|
71 | 71 | ] |
|
72 | 72 | }; |
|
73 | 73 | |
|
74 | 74 | var myDataTable = new YAHOO.widget.DataTable("table_wrap", myColumnDefs, myDataSource, |
|
75 | 75 | { |
|
76 | 76 | sortedBy:{key:"name",dir:"asc"}, |
|
77 | 77 | MSG_SORTASC:"${_('Click to sort ascending')}", |
|
78 | 78 | MSG_SORTDESC:"${_('Click to sort descending')}", |
|
79 | 79 | MSG_EMPTY:"${_('No records found.')}", |
|
80 | 80 | MSG_ERROR:"${_('Data error.')}", |
|
81 | 81 | MSG_LOADING:"${_('Loading...')}", |
|
82 | 82 | } |
|
83 | 83 | ); |
|
84 | 84 | myDataTable.subscribe('postRenderEvent',function(oArgs) { |
|
85 | 85 | tooltip_activate(); |
|
86 | 86 | var func = function(node){ |
|
87 | 87 | return node.parentNode.parentNode.parentNode.parentNode.parentNode; |
|
88 | 88 | } |
|
89 | 89 | q_filter('q_filter_tags',YUQ('div.table tr td .logtags .tagtag a'),func); |
|
90 | 90 | }); |
|
91 | 91 | |
|
92 | 92 | </script> |
|
93 | 93 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now