Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Side by Side Diff: MoinMoin/templates/modify.html

Issue 10427043: Fixes onclick from templates
Patch Set: Fixes unused variables, unnecessary global functions, variables, linter ready, using objects. Created 11 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 {% import "forms.html" as forms %} 1 {% import "forms.html" as forms %}
2 {% import "utils.html" as utils %} 2 {% import "utils.html" as utils %}
3 {% extends theme("show.html") %} 3 {% extends theme("show.html") %}
4 4
5 {% from form.meta_template import meta_editor %} 5 {% from form.meta_template import meta_editor %}
6 {# Import macros data_editor and extra_head from content_form's template. 6 {# Import macros data_editor and extra_head from content_form's template.
7 extra_head is optional, so instead of a simple "import from" we need to do 7 extra_head is optional, so instead of a simple "import from" we need to do
8 this manually #} 8 this manually #}
9 {% import form['content_form'].template as content_template %} 9 {% import form['content_form'].template as content_template %}
10 {% set extra_head = content_template.extra_head %} 10 {% set extra_head = content_template.extra_head %}
11 {% set data_editor = content_template.data_editor %} 11 {% set data_editor = content_template.data_editor %}
12 12
13 {% set title = _("Modifying '%(item_name)s'", item_name=item_name) %} 13 {% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}
14 14
15 {% block head %} 15 {% block head %}
16 {{ super() }} 16 {{ super() }}
17 {% if extra_head %} 17 {% if extra_head %}
18 {{ extra_head() }} 18 {{ extra_head() }}
19 {% endif %} 19 {% endif %}
20 {% endblock %} 20 {% endblock %}
21 21
22 {% block subitem_navigation %} 22 {% block subitem_navigation %}
23 {% call(fullname, shortname, contenttype, has_children) utils.render_subitem _navigation(item_name, True) %} 23 {% call(fullname, shortname, contenttype, has_children) utils.render_subitem _navigation(item_name, True) %}
24 {% set shortname = shortname|json_dumps %} 24 {% set shortname = shortname|json_dumps %}
TheSheep 2013/06/20 20:25:14 shortname seems to be unused?
25 {% set fullname = fullname|json_dumps %} 25 <button class="moin-insertname-action" data-name="{{ fullname }}"
26 <button class="moin-insertname-action" onclick='InsertName({{ fullname } })'
27 title="{{ _('Insert Name') }}">{{ _('Insert Name') }}</button> 26 title="{{ _('Insert Name') }}">{{ _('Insert Name') }}</button>
28 {% endcall %} 27 {% endcall %}
29 {% endblock %} 28 {% endblock %}
30 29
31 30
32 {% block content %} 31 {% block content %}
33 <h1>{{ title }}</h1> 32 <h1>{{ title }}</h1>
34 <div id="moin-modify" class="moin-form"> 33 <div id="moin-modify" class="moin-form">
35 {{ gen.form.open(form, method='post', enctype='multipart/form-data') }} 34 {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
36 {{ forms.render_errors(form) }} 35 {{ forms.render_errors(form) }}
(...skipping 24 matching lines...) Expand all
61 #} 60 #}
62 {{ gen.form.close() }} 61 {{ gen.form.close() }}
63 </div> 62 </div>
64 {% endblock %} 63 {% endblock %}
65 64
66 {% block options_for_javascript %} 65 {% block options_for_javascript %}
67 {%- if user.scroll_page_after_edit -%} 66 {%- if user.scroll_page_after_edit -%}
68 <br id="moin-scroll-page-after-edit" /> 67 <br id="moin-scroll-page-after-edit" />
69 {%- endif %} 68 {%- endif %}
70 {% endblock %} 69 {% endblock %}
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b