diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-21 22:20:28 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-21 22:20:28 +0100 |
| commit | acad90c3123a3a879c8d5cda040a4702114d19b0 (patch) | |
| tree | d60b4044f99a0e3060a83c98cbf578ab1e03141a /app/templates | |
| parent | 47432ea7e4e7abda7021e3e125d6347fbe6534e0 (diff) | |
| download | cheatdb-acad90c3123a3a879c8d5cda040a4702114d19b0.tar.xz | |
Add dependency support
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/packages/create_edit.html | 2 | ||||
| -rw-r--r-- | app/templates/packages/view.html | 35 |
2 files changed, 37 insertions, 0 deletions
diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html index 1bd7ee6..68f4333 100644 --- a/app/templates/packages/create_edit.html +++ b/app/templates/packages/create_edit.html @@ -21,6 +21,8 @@ {{ render_field(form.type, class_="pkg_meta") }} {{ render_field(form.license, class_="pkg_meta") }} {{ render_field(form.tags, class_="pkg_meta") }} + {{ render_field(form.harddeps, class_="pkg_meta") }} + {{ render_field(form.softdeps, class_="pkg_meta") }} <div class="pkg_wiz_1"> <p>Enter the repo URL for the package. diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index 808e176..d6cb8ca 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -118,6 +118,41 @@ {% endfor %} </ul> + <table class="table-topalign"> + <tr> + <td> + <h3>Dependencies</h3> + <ul> + {% for p in package.harddeps %} + <li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }}</li> + {% else %} + {% if not package.softdeps %} + <li>No dependencies.</li> + {% endif %} + {% endfor %} + {% for p in package.softdeps %} + <li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }} [optional]</li> + {% endfor %} + </ul> + </td> + <td> + <h3>Required by</h3> + <ul> + {% for p in package.dependents %} + <li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }}</li> + {% else %} + {% if not package.softdependents %} + <li>No dependents.</li> + {% endif %} + {% endfor %} + {% for p in package.softdependents %} + <li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }} [optional]</li> + {% endfor %} + </ul> + </td> + </tr> + </table> + {% if current_user.is_authenticated or requests %} <h3>Edit Requests</h3> |
