-
Notifications
You must be signed in to change notification settings - Fork 12
/
edit.html
149 lines (129 loc) · 5.45 KB
/
edit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{% extends "layout.html" %}
{% import "macros/platforms.html" as platforms %}
{% import "macros/oses.html" as oses %}
{% import "macros/statuses.html" as statuses %}
{% block title %}
Plugin Editor :: {{plugin.name | e}}
{% endblock %}
{% block js_includes %}
{% parent %}
<script type="text/javascript" src="{{media_url}}js/PluginDir/Editor.js"></script>
{% endblock %}
{% block js_defines %}
{% parent %}
PluginDir.Editor.json_url =
{% if plugin.sandbox_profile_id %}
"{{base_url}}profiles/{{screen_name|e}}/plugins/detail/{{plugin.pfs_id|e}}.json";
{% else %}
"{{base_url}}plugins/detail/{{plugin.pfs_id|e}}.json";
{% endif %}
PluginDir.Editor.plugin_properties = {{ properties | json }};
PluginDir.Editor.csrf_crumb = "{{ crumb }}";
{% endblock %}
{% block content %}
{% if plugin.sandbox_profile_id %}
{% set plugin_base as base_url ~ "profiles/" ~ screen_name|e ~ "/plugins/detail/" ~ plugin.pfs_id|urlencode|e %}
{% else %}
{% set plugin_base as base_url ~ "plugins/detail/" ~ plugin.pfs_id|urlencode|e %}
{% endif %}
<form id="editor">
<input type="hidden" name="crumb" value="{{ crumb }}" />
<fieldset>
<legend>{% trans "Options" %}</legend>
<ul class="fields">
<li>
<button id="save">{% trans "Save now" %}</button>
—
<span id="save_message"></span>
—
<a href="{{plugin_base}}">{% trans "Plugin details" %}</a>
—
<a href="{{plugin_base}}.json">{% trans "Saved JSON data" %}</a>
—
<a href="" id="json-out-link">{% trans "Current JSON data" %}</a>
</li>
</ul>
</fieldset>
<fieldset>
<legend>{% trans "Plugin metadata and release defaults" %}</legend>
<ul class="controls">
<li>{% blocktrans %}
<a href="#" class="show">Show</a> /
<a href="#" class="hide">Hide</a>
empty properties.
{% endblocktrans %}</li>
</ul>
<ul id="meta-fields" class="fields"></ul>
</fieldset>
<fieldset>
<legend>{% trans "MIME types and aliases" %}</legend>
<ul id="mimes_aliases" class="fields">
<li class="field textarea mimes">
<label>{% trans "MIME types" %}</label>
<textarea name="mimes" id="mimes"></textarea>
<p class="notes">{% trans "MIME types of content handled by this plugin" %}</p>
</li>
<li class="field textarea literal_aliases">
<label>{% trans "Literal aliases" %}</label>
<textarea name="literal_aliases" id="literal_aliases"></textarea>
<p class="notes">{% trans "The literal names by which this plugin has been known" %}</p>
</li>
<li class="field textarea regex_aliases">
<label>{% trans "Regex aliases" %}</label>
<textarea name="regex_aliases" id="regex_aliases"></textarea>
<p class="notes">{% trans "Regexes matching names by which this plugin has been known" %}</p>
</li>
</ul>
</fieldset>
<fieldset>
<legend>{% trans "Releases" %}</legend>
<ul class="controls">
<li><a href="#" id="add_blank_release">{% trans "[ + ] Add new release" %}</a></li>
</ul>
<ul id="releases">
</ul>
</fieldset>
</form>
<div class="templates">
<ul class="releases">
<li class="release">
<fieldset class="closed">
<legend>{% trans "Release" %}</legend>
<ul class="controls">
<li>{% blocktrans %}
<a href="#" class="show">Show</a> /
<a href="#" class="hide">Hide</a>
empty properties.
{% endblocktrans %}</li>
<li>
<a href="#" class="delete">{% trans "[ x ] Delete release" %}</a>
</li>
</ul>
<ul class="fields"></ul>
</fieldset>
</li>
</ul>
<ul class="fields">
<li class="field template text">
<label>...</label>
<input class="text" type="text" size="40" name="..." />
<p class="notes">...</p>
</li>
<li class="field template textarea">
<label>...</label>
<textarea name="..." class="textarea"></textarea>
<p class="notes">...</p>
</li>
<li class="field template status">
<label>...</label>
<select name="..." class="select">
<option value="latest">{% trans "Latest" %}</option>
<option value="outdated">{% trans "Outdated" %}</option>
<option value="vulnerable">{% trans "Vulnerable" %}</option>
<option value="should_disable">{% trans "Should be disabled" %}</option>
</select>
<p class="notes">...</p>
</li>
</ul>
</div>
{% endblock %}