]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/packages/create_edit.html
Add git support for importing meta
[cheatdb.git] / app / templates / packages / create_edit.html
1 {% extends "base.html" %}
2
3 {% block title %}
4         {{ package.title or "Create Package" }}
5         {% if not package and author != current_user %}
6                 for {{ author.display_name }}
7         {% endif %}
8 {% endblock %}
9
10 {% block content %}
11         <h1>Create Package</h1>
12
13         <div class="box box_grey alert alert-info">
14                 Have you read the Package Inclusion Policy and Guidance yet?
15
16                 <a class="alert_right button" href="{{ url_for('flatpage', path='policy_and_guidance') }}">View</a>
17         </div>
18
19
20         {% from "macros/forms.html" import render_field, render_submit_field, form_includes, render_multiselect_field, render_mpackage_field, render_deps_field, package_lists %}
21         {{ form_includes() }}
22         {{ package_lists() }}
23
24         <form method="POST" action="" class="tableform">
25                 {{ form.hidden_tag() }}
26
27                 <h2 class="pkg_meta">Package</h2>
28
29                 {{ render_field(form.type, class_="pkg_meta") }}
30                 {{ render_field(form.name, class_="pkg_meta") }}
31                 {{ render_field(form.title, class_="pkg_meta") }}
32                 {{ render_field(form.shortDesc, class_="pkg_meta") }}
33                 {{ render_field(form.desc, class_="pkg_meta") }}
34                 {{ render_multiselect_field(form.tags, class_="pkg_meta") }}
35                 <div class="pkg_meta">
36                         {{ render_field(form.license, class_="not_txp") }}
37                 </div>
38                 {{ render_field(form.media_license, class_="pkg_meta") }}
39
40                 <div class="pkg_meta">
41                         <h2 class="not_txp">Dependency Info</h2>
42
43                         {{ render_mpackage_field(form.provides_str, class_="not_txp", placeholder="Comma separated list") }}
44                         {{ render_deps_field(form.harddep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
45                         {{ render_deps_field(form.softdep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
46                 </div>
47
48                 <h2 class="pkg_meta">Repository and Links</h2>
49
50                 <div class="pkg_wiz_1">
51                         <p>Enter the repo URL for the package.
52                         If the repo uses git then the metadata will be automatically imported.</p>
53
54                         <p>Leave blank if you don't have a repo.</p>
55                 </div>
56
57                 {{ render_field(form.repo, class_="pkg_repo") }}
58
59                 <div class="pkg_wiz_1">
60                         <a id="pkg_wiz_1_next" class="button button-primary">Next</a>
61                 </div>
62
63                 <div class="pkg_wiz_2">
64                         Importing... (This may take a while)
65                 </div>
66
67                 {{ render_field(form.website, class_="pkg_meta") }}
68                 {{ render_field(form.issueTracker, class_="pkg_meta") }}
69                 {{ render_field(form.forums, class_="pkg_meta") }}
70                 <div class="pkg_meta">{{ render_submit_field(form.submit) }}</div>
71         </form>
72
73         {% if enable_wizard %}
74                 <script src="/static/url.min.js"></script>
75                 <script src="/static/polltask.js"></script>
76                 <script src="/static/package_create.js"></script>
77                 <noscript>
78                         <div class="box box_grey alert alert-warning">
79                                 <span class="icon_message"></span>
80                                 Javascript is needed to automatically import metadata from VCS.
81                         </div>
82                 </noscript>
83         {% endif %}
84         <script src="/static/package_edit.js"></script>
85 {% endblock %}