##// END OF EJS Templates
html: fixed found syntax problems
marcink -
r1283:cebaf5cb default
parent child Browse files
Show More
@@ -93,7 +93,7 b''
93 93 var auth_plugins_input = $('#auth_plugins');
94 94 var notEmpty = function(element, index, array) {
95 95 return (element != "");
96 }
96 };
97 97 var elems = auth_plugins_input.val().split(',').filter(notEmpty);
98 98 var cur_button = e.currentTarget;
99 99 var plugin_id = $(cur_button).attr('plugin_id');
@@ -243,7 +243,7 b''
243 243 }
244 244 });
245 245 };
246 }
246 };
247 247
248 248 $('.delete_integration_entry').on('click', function(e){
249 249 e.preventDefault();
@@ -49,12 +49,12 b' var run = function(){'
49 49 $('#notification_data').on('click','.delete-notification',function(e){
50 50 var notification_id = e.currentTarget.id;
51 51 deleteNotification(url_action,notification_id)
52 })
52 });
53 53 $('#notification_data').on('click','.read-notification',function(e){
54 54 var notification_id = e.currentTarget.id;
55 55 readNotification(url_action,notification_id)
56 56 })
57 }
57 };
58 58 run();
59 59 $('#mark_all_read').on('click',function(e){
60 60 //set notifications as read
@@ -68,7 +68,7 b' run();'
68 68 .fail(function(data, textStatus, errorThrown){
69 69 alert("Error while saving notifications.\nError code {0} ({1}). URL: {2}".format(data.status,data.statusText,$(this)[0].url));
70 70 });
71 })
71 });
72 72
73 73 var current_filter = $("${c.current_filter}");
74 74 if (current_filter.length){
@@ -258,8 +258,7 b' var post_old = post_cm.getValue();'
258 258 var get_data = function(type, old){
259 259 var get_tmpl = function(tmpl_name){
260 260 // unescape some stuff
261 var html = htmlEnDeCode.htmlDecode($('#'+tmpl_name+'_tmpl').html());
262 return html;
261 return htmlEnDeCode.htmlDecode($('#'+tmpl_name+'_tmpl').html());
263 262 };
264 263 return {
265 264 '#': old,
@@ -136,9 +136,9 b''
136 136 $('#username').focus();
137 137
138 138 $('#generate_password').on('click', function(e){
139 var tmpl = "(${_('generated password:')} {0})"
140 var new_passwd = generatePassword(12)
141 $('#generate_password_preview').html(tmpl.format(new_passwd))
139 var tmpl = "(${_('generated password:')} {0})";
140 var new_passwd = generatePassword(12);
141 $('#generate_password_preview').html(tmpl.format(new_passwd));
142 142 $('#password').val(new_passwd);
143 143 $('#password_confirmation').val(new_passwd);
144 144 })
@@ -10,7 +10,7 b''
10 10 <tr>
11 11 <td class="td-user">
12 12 ${base.gravatar(c.user.email, 16)}
13 <span class="user email">${c.user.email}
13 <span class="user email">${c.user.email}</span>
14 14 </td>
15 15 <td class="td-tags">
16 16 <span class="tag">${_('Primary')}</span>
@@ -47,8 +47,8 b''
47 47 target_repo=c.repo_name,
48 48 target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],
49 49 target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1],
50 merge=1)
51 }">
50 merge=1)}"
51 >
52 52 <i class="icon-loop"></i>
53 53 ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)}
54 54 </a>
@@ -285,7 +285,7 b''
285 285 $commitCheckboxes.on('click', checkboxRangeSelector);
286 286
287 287 $commitRangeClear.on('click',function(e) {
288 $commitCheckboxes.attr('checked', false)
288 $commitCheckboxes.attr('checked', false);
289 289 checkboxRangeSelector();
290 290 e.preventDefault();
291 291 });
@@ -243,7 +243,7 b''
243 243 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6)))
244 244 .replace('__title__', data.results[0].message)
245 245 .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id}));
246 _html +=' | '
246 _html +=' | ';
247 247 _html +='<a title="__title__" href="__url__">__rev__</a> '
248 248 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6)))
249 249 .replace('__title__', data.results[1].message)
@@ -279,7 +279,7 b''
279 279 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6)))
280 280 .replace('__title__', data.results[0].message)
281 281 .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id}));
282 _html +=' | '
282 _html +=' | ';
283 283 _html +='<a title="__title__" href="__url__">Parent __rev__</a>'
284 284 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6)))
285 285 .replace('__title__', data.results[1].message)
@@ -170,8 +170,7 b''
170 170 ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
171 171 ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user'))
172 172 )
173 )|n
174 }
173 )|n}
175 174 </div>
176 175 </div>
177 176 </div>
@@ -12,14 +12,14 b''
12 12
13 13 <%def name="diff_block_changeset_table(change)">
14 14 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
15 %for FID,(cs1, cs2, change, filenode_path, diff, stats, file) in change.iteritems():
15 %for FID,(cs1, cs2, change, filenode_path, diff, stats, file_data) in change.iteritems():
16 16 <div id="${h.FID('',filenode_path)}_target" ></div>
17 17 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
18 18 <div class="code-body">
19 19 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none"></div>
20 20 ${diff|n}
21 % if file["is_limited_diff"]:
22 % if file["exceeds_limit"]:
21 % if file_data["is_limited_diff"]:
22 % if file_data["exceeds_limit"]:
23 23 ${self.file_message()}
24 24 % else:
25 25 <h5>${_('Diff was truncated. File content available only in full diff.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5>
@@ -33,14 +33,14 b''
33 33
34 34 <%def name="diff_block_simple(change)">
35 35 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
36 %for op,filenode_path,diff,file in change:
36 %for op,filenode_path,diff,file_data in change:
37 37 <div id="${h.FID('',filenode_path)}_target" ></div>
38 38 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm" >
39 39 <div class="code-body">
40 40 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none;"></div>
41 41 ${diff|n}
42 % if file["is_limited_diff"]:
43 % if file["exceeds_limit"]:
42 % if file_data["is_limited_diff"]:
43 % if file_data["exceeds_limit"]:
44 44 ${self.file_message()}
45 45 % else:
46 46 <h5>${_('Diff was truncated. File content available only in full diff.')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a></h5>
@@ -2,26 +2,32 b''
2 2 return '%s_%s_%i' % (h.safeid(filename), type, line)
3 3 %></%def>
4 4
5 <%def name="action_class(action)"><%
5 <%def name="action_class(action)">
6 <%
6 7 return {
7 8 '-': 'cb-deletion',
8 9 '+': 'cb-addition',
9 10 ' ': 'cb-context',
10 11 }.get(action, 'cb-empty')
11 %></%def>
12 %>
13 </%def>
12 14
13 <%def name="op_class(op_id)"><%
15 <%def name="op_class(op_id)">
16 <%
14 17 return {
15 18 DEL_FILENODE: 'deletion', # file deleted
16 19 BIN_FILENODE: 'warning' # binary diff hidden
17 20 }.get(op_id, 'addition')
18 %></%def>
21 %>
22 </%def>
19 23
20 <%def name="link_for(**kw)"><%
24 <%def name="link_for(**kw)">
25 <%
21 26 new_args = request.GET.mixed()
22 27 new_args.update(kw)
23 28 return h.url('', **new_args)
24 %></%def>
29 %>
30 </%def>
25 31
26 32 <%def name="render_diffset(diffset, commit=None,
27 33
@@ -83,8 +89,7 b" return h.url('', **new_args)"
83 89 ('<a href="%s">%s</a>' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
84 90 ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user'))
85 91 )
86 )|n
87 }
92 )|n}
88 93 </div>
89 94 </div>
90 95 </div>
@@ -370,8 +375,9 b' from rhodecode.lib.diffs import NEW_FILE'
370 375 %>
371 376 <span class="pill">
372 377 %if filediff.source_file_path and filediff.target_file_path:
373 %if filediff.source_file_path != filediff.target_file_path: # file was renamed
374 <strong>${filediff.target_file_path}</strong><del>${filediff.source_file_path}</del>
378 %if filediff.source_file_path != filediff.target_file_path:
379 ## file was renamed
380 <strong>${filediff.target_file_path}</strong><del>${filediff.source_file_path}</del>
375 381 %else:
376 382 ## file was modified
377 383 <strong>${filediff.source_file_path}</strong>
@@ -42,9 +42,7 b''
42 42 title="Author: ${annotation.author | entity}<br>Date: ${annotation.date}<br>Message: ${annotation.message | entity}"
43 43 >
44 44 ${h.gravatar_with_user(annotation.author, 16) | n}
45 <strong class="cb-annotate-message">${
46 h.truncate(annotation.message, len(lines) * 30)
47 }</strong>
45 <strong class="cb-annotate-message">${h.truncate(annotation.message, len(lines) * 30)}</strong>
48 46 </td>
49 47 <td
50 48 class="cb-annotate-revision"
@@ -1140,7 +1140,7 b' with multiple lines</p>'
1140 1140 var val = e.currentTarget.checked;
1141 1141 $('#compare').mergely('options', {ignorews: val});
1142 1142 $('#compare').mergely('update');
1143 })
1143 });
1144 1144 $('#edit_mode').change(function(e){
1145 1145 var val = !e.currentTarget.checked;
1146 1146 $('#compare').mergely('cm', 'lhs').setOption('readOnly', val);
@@ -361,7 +361,7 b''
361 361 </tbody>
362 362 </table>
363 363 <script type="text/javascript">
364 var cache = {}
364 var cache = {};
365 365 $('.expand_commit').on('click',function(e){
366 366 var target_expand = $(this);
367 367 var cid = target_expand.data('commitId');
@@ -15,7 +15,7 b''
15 15 ## BODY GOES BELOW
16 16 <table style="text-align:left;vertical-align:top;">
17 17 <tr><td style="padding-right:20px;padding-top:15px;white-space:pre-wrap">${body}</td></tr>
18 </table
18 </table>
19 19 <p><a style="margin-top:15px;margin-left:1%;font-family:sans-serif;font-weight:100;font-size:11px;display:block;color:#666666;text-decoration:none;" href="${instance_url}">
20 20 ${self.plaintext_footer()}
21 21 </a></p> No newline at end of file
@@ -19,7 +19,7 b' A new user `${user.username}` has regist'
19 19
20 20 ## BODY GOES BELOW
21 21 <table style="text-align:left;vertical-align:middle;">
22 <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;"><h4><a href="${h.url('user_profile', username=user.username, qualified=True)}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('New user %(user)s has registered on %(date)s') % {'user': user.username, 'date': h.format_date(date)}}</h4></td></tr>
22 <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;"><h4><a href="${h.url('user_profile', username=user.username, qualified=True)}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('New user %(user)s has registered on %(date)s') % {'user': user.username, 'date': h.format_date(date)}}</a></h4></td></tr>
23 23 <tr><td style="padding-right:20px;padding-top:20px;">${_('Username')}</td><td style="line-height:1;padding-top:20px;"><img style="margin-bottom:-5px;text-align:left;border:1px solid #dbd9da" src="${h.gravatar_url(user.email, 16)}" height="16" width="16">&nbsp;${user.username}</td></tr>
24 24 <tr><td style="padding-right:20px;">${_('Full Name')}</td><td>${user.firstname} ${user.lastname}</td></tr>
25 25 <tr><td style="padding-right:20px;">${_('Email')}</td><td>${user.email}</td></tr>
@@ -56,7 +56,7 b''
56 56 %endif
57 57
58 58 %if captcha_active:
59 <div class="login-captcha"
59 <div class="login-captcha">
60 60 <label for="email">${_('Captcha')}:</label>
61 61 ${h.hidden('recaptcha_field')}
62 62 <div id="recaptcha"></div>
@@ -28,6 +28,7 b''
28 28 </%def>
29 29
30 30 <%def name="main()">
31
31 32 <script type="text/javascript">
32 33 // TODO: marcink switch this to pyroutes
33 34 AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
@@ -40,10 +41,9 b''
40 41
41 42 ${self.breadcrumbs()}
42 43
43
44 44 <div class="box pr-summary">
45 45 <div class="summary-details block-left">
46 <%summary = lambda n:{False:'summary-short'}.get(n)%>
46 <% summary = lambda n:{False:'summary-short'}.get(n) %>
47 47 <div class="pr-details-title">
48 48 <a href="${h.url('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)}
49 49 %if c.allowed_to_update:
@@ -432,7 +432,7 b' Changed files:'
432 432 </div>
433 433 % if not c.missing_commits:
434 434 <%include file="/compare/compare_commits.mako" />
435 <div class="cs_files">
435 <div class="cs_files">
436 436 <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
437 437 ${cbdiffs.render_diffset_menu()}
438 438 ${cbdiffs.render_diffset(
@@ -441,8 +441,9 b' Changed files:'
441 441 disable_new_comments=not c.allowed_to_comment,
442 442 deleted_files_comments=c.deleted_files_comments)}
443 443
444 </div>
445 % endif
444 446 </div>
445 % endif
446 447 </div>
447 448
448 449 ## template for inline comment form
@@ -31,7 +31,7 b' for line_number in matching_lines:'
31 31 %if len(matching_lines) > shown_matching_lines:
32 32 <a href="${url}">
33 33 ${len(matching_lines) - shown_matching_lines} ${_('more matches in this file')}
34 </p>
34 </a>
35 35 %endif
36 36 </%def>
37 37
@@ -88,7 +88,7 b''
88 88 <div class="right-content">
89 89
90 90 <div class="repo-size">
91 <%commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision')%>
91 <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %>
92 92
93 93 ## commits
94 94 % if commit_rev == -1:
@@ -14,11 +14,10 b''
14 14 <ul class="links icon-only-links block-right">
15 15 <li>
16 16 %if c.rhodecode_user.username != h.DEFAULT_USER:
17 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,auth_token=c.rhodecode_user.feed_token)}" title="${_('RSS Feed')}">
17 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,auth_token=c.rhodecode_user.feed_token)}" title="${_('RSS Feed')}"><i class="icon-rss-sign"></i></a>
18 18 %else:
19 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}">
19 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}"><i class="icon-rss-sign"></i></a>
20 20 %endif
21 <i class="icon-rss-sign"></i></a>
22 21 </li>
23 22 </ul>
24 23 </div>
@@ -97,9 +96,9 b''
97 96 // format of Object {text: "v0.0.3", type: "tag", id: "rev"}
98 97 var selected_cs = e.added;
99 98 var fname= e.added.raw_id + ".zip";
100 var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname})
99 var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname});
101 100 // set new label
102 $('#archive_link').html('<i class="icon-archive"></i> '+ e.added.text+".zip")
101 $('#archive_link').html('<i class="icon-archive"></i> '+ e.added.text+".zip");
103 102
104 103 // set new url to button,
105 104 $('#archive_link').attr('href', href)
General Comments 0
You need to be logged in to leave comments. Login now