diff options
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates')
4 files changed, 66 insertions, 9 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja index b41a106..a34d538 100644 --- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja @@ -45,6 +45,12 @@ in a proprietary work, I am not going to enforce this in court. color: inherit; } + .inline-form { + display: inline-block; + padding: 0; + margin: 0; + } + .small-print { font-size: 80%; color: #555; diff --git a/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja b/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja index beedd43..1b46da7 100644 --- a/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja @@ -25,6 +25,16 @@ in a proprietary work, I am not going to enforce this in court. {{ super() }} {% endblock %} {% block main %} + {%- if uninstall_disallowed is defined %} + <aside class="error-note"> + {{ _('web_ui.err.uninstall_disallowed') }} + </aside> + {%- endif %} + {%- if repo_communication_error is defined %} + <aside class="error-note"> + {{ _('web_ui.err.repo_communication_error') }} + </aside> + {%- endif %} <h3> {{ _('web_ui.packages.single_version.heading.name_{}') @@ -35,4 +45,45 @@ in a proprietary work, I am not going to enforce this in court. {{ display_info.info.versioned_identifier }} </div> TODO: add more info... -{% endblock %} + {%- if display_info.installed == InstalledStatus.INSTALLED %} + <div> + {{ _('web_ui.packages.single_version.package_is_installed') }} + </div> + {%- if uninstall_disallowed is not defined %} + <form method="POST"> + <input name="action" value="uninstall_package" type="hidden"> + <button class="green-button"> + {{ _('web_ui.packages.single_version.uninstall_button') }} + </button> + </form> + {%- endif %} + {%- elif display_info.installed == InstalledStatus.NOT_INSTALLED %} + <div> + {{ _('web_ui.packages.single_version.package_is_not_installed') }} + </div> + <form method="POST"> + <input name="action" value="install_package" type="hidden"> + <button class="green-button"> + {{ _('web_ui.packages.single_version.install_button') }} + </button> + </form> + {%- else %} + <div> + {{ _('web_ui.packages.single_version.package_install_failed') }} + </div> + <div> + <form method="POST" class="inline-form"> + <input name="action" value="install_package" type="hidden"> + <button class="green-button"> + {{ _('web_ui.packages.single_version.retry_install_button') }} + </button> + </form> + <form method="POST" class="inline-form"> + <input name="action" value="uninstall_package" type="hidden"> + <button class="green-button"> + {{ _('web_ui.packages.single_version.leave_uninstalled_button') }} + </button> + </form> + </div> + {%- endif %} +{%- endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja index 3fdcbd3..1b618cf 100644 --- a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja @@ -31,12 +31,12 @@ in a proprietary work, I am not going to enforce this in court. </div> {% if repo_name_invalid is defined -%} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_name_invalid') }} + {{ _('web_ui.err.repo_name_invalid') }} </aside> {%- endif %} {% if repo_name_taken is defined -%} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_name_taken') }} + {{ _('web_ui.err.repo_name_taken') }} </aside> {%- endif %} <div> @@ -49,7 +49,7 @@ in a proprietary work, I am not going to enforce this in court. </div> {% if repo_url_invalid is defined -%} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_url_invalid') }} + {{ _('web_ui.err.repo_url_invalid') }} </aside> {%- endif %} <div> diff --git a/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja index b3a4f32..a5998b8 100644 --- a/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja @@ -29,12 +29,12 @@ in a proprietary work, I am not going to enforce this in court. {% block main %} {%- if repo_communication_error is defined %} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_communication_error') }} + {{ _('web_ui.err.repo_communication_error') }} </aside> {%- endif %} {%- if repo_api_version_unsupported is defined %} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_api_version_unsupported') }} + {{ _('web_ui.err.repo_api_version_unsupported') }} </aside> {%- endif %} {%- set repo_id = display_info.ref.id %} @@ -61,12 +61,12 @@ in a proprietary work, I am not going to enforce this in court. <input type="hidden" name="action" value="update_repo_data"> {%- if repo_name_invalid is defined %} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_name_invalid') }} + {{ _('web_ui.err.repo_name_invalid') }} </aside> {%- endif %} {%- if repo_name_taken is defined %} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_name_taken') }} + {{ _('web_ui.err.repo_name_taken') }} </aside> {%- endif %} <div> @@ -109,7 +109,7 @@ in a proprietary work, I am not going to enforce this in court. <input type="hidden" name="action" value="update_repo_data"> {%- if repo_url_invalid is defined %} <aside class="error-note"> - {{ _('web_ui.repos.add.repo_url_invalid') }} + {{ _('web_ui.err.repo_url_invalid') }} </aside> {%- endif %} <div> |