diff options
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/items')
9 files changed, 190 insertions, 109 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja index 07212ff..d4910ab 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja @@ -20,13 +20,13 @@ in a proprietary work, I am not going to enforce this in court. #} {% extends "base.html.jinja" %} -{% macro versioned_identifier_with_repo(info) %} +{% macro versioned_identifier_with_repo(info) -%} {{ info.info.version_string }} - {% if not info.is_local %} + {%- if not info.is_local %} @ {{ info.info.repo }} - {% endif %} -{% endmacro %} + {%- endif %} +{%- endmacro %} {% block style %} {{ super() }} @@ -37,15 +37,25 @@ in a proprietary work, I am not going to enforce this in court. color: #777; } {% endblock %} + {% block main %} {% block main_info %} <h3>{% block heading required %}{% endblock %}</h3> {% endblock %} - {% if display_info.all_versions|length > 0 %} + + {% + if display_info.all_versions|length > 1 or + (display_info.all_versions|length == 1 and + (version_display_info is not defined or + version_display_info.ref != display_info.all_versions[0].ref)) + %} + <div class="horizontal-separator"></div> + <h4> {% block version_list_heading required %} {% endblock %} </h4> + <ul id="item_list"> {% for info in display_info.all_versions %} {% diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja index de62330..f1d34cc 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja @@ -19,44 +19,52 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "items/item_view.html.jinja" %} + {% block main_info %} {% if file_installation_error is defined %} - <aside class="error-note"> - {{ _('web_ui.err.file_installation_error') }} - </aside> + {{ error_note(_('web_ui.err.file_installation_error')) }} {% endif %} + {% if uninstall_disallowed is defined %} - <aside class="error-note"> - {{ _('web_ui.err.uninstall_disallowed') }} - </aside> + {{ error_note(_('web_ui.err.uninstall_disallowed')) }} {% endif %} + {% if repo_communication_error is defined %} - <aside class="error-note"> - {{ _('web_ui.err.repo_communication_error') }} - </aside> + {{ error_note(_('web_ui.err.repo_communication_error')) }} {% endif %} {{ super() }} - <div class="item-identifier"> - {{ versioned_identifier_with_repo(version_display_info) }} - </div> + <p> + {{ + _('web_ui.items.single_version.version_{}') + .format(versioned_identifier_with_repo(version_display_info)) + }} + </p> + + <div class="horizontal-separator"></div> {% block main_info_bulk %} - TODO: add more info... + <p> + TODO: add more info... + </p> + + <div class="horizontal-separator"></div> {% endblock %} - {% if version_display_info.active == ActiveStatus.REQUIRED %} - <div>{% block item_required_msg required %}{% endblock %}</div> - {% elif version_display_info.active == ActiveStatus.AUTO %} - <div>{% block item_auto_activated_msg required %}{% endblock %}</div> - {% else %} - {# version_display_info.active == ActiveStatus.NOT_ACTIVE #} - <div>{% block item_not_activated_msg required %}{% endblock %}</div> - {% endif %} + <p> + {% if version_display_info.active == ActiveStatus.REQUIRED %} + {% block item_required_msg required %}{% endblock %} + {% elif version_display_info.active == ActiveStatus.AUTO %} + {% block item_auto_activated_msg required %}{% endblock %} + {% else %} + {# version_display_info.active == ActiveStatus.NOT_ACTIVE #} + {% block item_not_activated_msg required %}{% endblock %} + {% endif %} + </p> - {% set install_but_classes = ['green-button', 'button-bordering-left'] %} - {% set uninstall_but_classes = ['green-button', 'button-bordering-right'] %} + {% set install_but_classes = ['green-button'] %} + {% set uninstall_but_classes = ['green-button'] %} {% if version_display_info.installed == InstalledStatus.FAILED_TO_INSTALL %} {% set install_text = diff --git a/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja index 77874cb..aa12246 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja @@ -19,7 +19,9 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "base.html.jinja" %} + {% block title %} {{ _('web_ui.libraries.title') }} {% endblock %} + {% block style %} {{ super() }} @@ -32,8 +34,10 @@ in a proprietary work, I am not going to enforce this in court. min-height: 2.2em; } {% endblock %} + {% block main %} <h3>{{ _('web_ui.libraries.heading') }}</h3> + <ul id="item_list"> {% for info in display_infos %} <li> diff --git a/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja index b7d0d60..76736bc 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja @@ -19,18 +19,24 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "items/item_view.html.jinja" %} + {% block title %} {{ _('web_ui.items.single.library.title') }} {% endblock %} + {% block heading %} {{ _('web_ui.items.single.library.heading.name_{}') .format(display_info.identifier) }} {% endblock %} + {% block main_info %} {{ super() }} - TODO: add more info... + <p> + TODO: add more info... + </p> {% endblock %} + {% block version_list_heading %} {{ _('web_ui.items.single.library.version_list_heading') }} {% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja index 9e0a32e..7e045ad 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja @@ -57,3 +57,9 @@ in a proprietary work, I am not going to enforce this in court. {% block version_list_heading %} {{ _('web_ui.items.single_version.library.version_list_heading') }} {% endblock %} + +{% block main_info_bulk %} + <p> + TODO: add more info... + </p> +{% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja index 84ade45..30179dd 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja @@ -19,7 +19,9 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "base.html.jinja" %} + {% block title %} {{ _('web_ui.load_from_disk.title') }} {% endblock %} + {% block style %} {{ super() }} @@ -27,20 +29,37 @@ in a proprietary work, I am not going to enforce this in court. input[type="file"]::file-selector-button { display: none; } + + input[type="file"] { + display: block; + font-size: inherit; + font-style: inherit; + } {% endblock %} + {% block main %} <h3>{{ _('web_ui.load_from_disk.heading') }}</h3> + <form method="POST" enctype="multipart/form-data"> - <div> - <input id="items_zipfile" name="items_zipfile" type="file" - accept=".zip,application/zip" required=""> - </div> - <div> - <label class="green-button" for="items_zipfile"> - {{ _('web_ui.load_from_disk.choose_zipfile_button') }} - </label> - </div> - <div> + {% if uploaded_file_not_zip is defined %} + {{ error_note(_('web_ui.err.uploaded_file_not_zip')) }} + {% endif %} + + {% if invalid_uploaded_malcontent is defined %} + {{ error_note(_('web_ui.err.invalid_uploaded_malcontent')) }} + {% endif %} + + <input id="items_zipfile" name="items_zipfile" type="file" + accept=".zip,application/zip" required="" + class="block-with-bottom-margin"> + + <label class="green-button block-with-bottom-margin" for="items_zipfile"> + {{ _('web_ui.load_from_disk.choose_zipfile_button') }} + </label> + + <div class="horizontal-separator"></div> + + <div class="flex-row"> <button class="green-button"> {{ _('web_ui.load_from_disk.install_button') }} </button> diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja index 8df2d4d..ef04eb1 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja @@ -19,18 +19,24 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "items/item_view.html.jinja" %} + {% block title %} {{ _('web_ui.items.single.package.title') }} {% endblock %} + {% block heading %} {{ _('web_ui.items.single.package.heading.name_{}') .format(display_info.identifier) }} {% endblock %} + {% block main_info %} {{ super() }} - TODO: add more info... + <p> + TODO: add more info... + </p> {% endblock %} + {% block version_list_heading %} {{ _('web_ui.items.single.package.version_list_heading') }} {% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja index ea8b7d3..1eb9878 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja @@ -59,33 +59,33 @@ in a proprietary work, I am not going to enforce this in court. {% endblock %} {% block main_info_bulk %} - TODO: add more info... - - {% set enable_but_classes = ['blue-button', 'button-bordering-left'] %} - {% - set unenable_but_classes = [ - 'green-button', - 'button-bordering-right', - 'button-bordering-left' - ] - %} - {% set disable_but_classes = ['red-button', 'button-bordering-right'] %} + <p> + TODO: add more info... + </p> + + <div class="horizontal-separator"></div> + + {% set enable_but_classes = ['blue-button'] %} + {% set unenable_but_classes = ['green-button'] %} + {% set disable_but_classes = ['red-button'] %} {% set unenable_text = _('web_ui.items.single_version.unenable_button') %} {% set disable_text = _('web_ui.items.single_version.disable_button') %} {% set enable_text = _('web_ui.items.single_version.enable_button') %} - {% if display_info.enabled == EnabledStatus.NO_MARK %} - {% do unenable_but_classes.append('disabled-button') %} - <div> {{ _('web_ui.items.single_version.item_not_marked') }} </div> - {% elif display_info.enabled == EnabledStatus.DISABLED %} - {% do disable_but_classes.append('disabled-button') %} - <div> {{ _('web_ui.items.single_version.item_disabled') }} </div> - {% else %} - {# display_info.enabled == EnabledStatus.ENABLED #} - {% do enable_but_classes.append('disabled-button') %} - <div> {{ _('web_ui.items.single_version.item_enabled') }} </div> - {% endif %} + <p> + {% if display_info.enabled == EnabledStatus.NO_MARK %} + {% do unenable_but_classes.append('disabled-button') %} + {{ _('web_ui.items.single_version.item_not_marked') }} + {% elif display_info.enabled == EnabledStatus.DISABLED %} + {% do disable_but_classes.append('disabled-button') %} + {{ _('web_ui.items.single_version.item_disabled') }} + {% else %} + {# display_info.enabled == EnabledStatus.ENABLED #} + {% do enable_but_classes.append('disabled-button') %} + {{ _('web_ui.items.single_version.item_enabled') }} + {% endif %} + </p> {{ button_row([ @@ -95,74 +95,90 @@ in a proprietary work, I am not going to enforce this in court. ]) }} + <div class="horizontal-separator"></div> + {% if display_info.enabled == EnabledStatus.ENABLED %} - {% set unpin_but_classes = ['green-button', 'button-bordering-right'] %} - {% - set pin_repo_but_classes = [ - 'green-button', - 'button-bordering-right', - 'button-bordering-left' - ] - %} - {% set pin_ver_but_classes = ['green-button', 'button-bordering-left'] %} + {% set unpin_but_classes = ['green-button'] %} + {% set pin_repo_but_classes = ['green-button'] %} + {% set pin_ver_but_classes = ['green-button'] %} {% set unpin_text = _('web_ui.items.single_version.unpin_button') %} - {% if display_info.frozen == FrozenStatus.NOT_FROZEN %} - {% do unpin_but_classes.append('disabled-button') %} - <div> {{ _('web_ui.items.single_version.not_pinned') }} </div> - {% endif %} + <p> + {% if display_info.frozen == FrozenStatus.NOT_FROZEN %} + {% do unpin_but_classes.append('disabled-button') %} + {{ _('web_ui.items.single_version.not_pinned') }} + {% endif %} - {% if display_info.frozen == FrozenStatus.REPOSITORY %} - {% if display_info.active_version.is_local %} - <div> {{ _('web_ui.items.single_version.pinned_repo_local') }} </div> - {% else %} - <div> + {% if display_info.frozen == FrozenStatus.REPOSITORY %} + {% if display_info.active_version.is_local %} + {{ _('web_ui.items.single_version.pinned_repo_local') }} + {% else %} {{ _('web_ui.items.single_version.pinned_repo_{}') .format(display_info.active_version.info.repo) }} - </div> - {% endif %} - {% - if display_info.active_version.info.repo == - version_display_info.info.repo - %} - {% if version_display_info.is_local %} + {% endif %} + {% + if display_info.active_version.info.repo == + version_display_info.info.repo + %} + {% if version_display_info.is_local %} + {% + set pin_repo_text = + _('web_ui.items.single_version.pin_local_repo_button') + %} + {% else %} + {% + set pin_repo_text = + _('web_ui.items.single_version.pin_repo_button') + %} + {% endif %} + {% do pin_repo_but_classes.append('disabled-button') %} + {% else %} {% set pin_repo_text = - _('web_ui.items.single_version.pin_local_repo_button') + _('web_ui.items.single_version.repin_repo_button') + %} + {% endif %} + {% else %}{# display_info.frozen == FrozenStatus.REPOSITORY #} + {% + set pin_repo_text = + _('web_ui.items.single_version.pin_repo_button') + %} + {% endif %}{# else/ display_info.frozen == FrozenStatus.REPOSITORY #} + + {% if display_info.frozen == FrozenStatus.EXACT_VERSION %} + {% if display_info.active_version.ref == version_display_info.ref %} + {% + set pin_ver_text = + _('web_ui.items.single_version.pin_ver_button') %} + {% do pin_ver_but_classes.append('disabled-button') %} + {{ _('web_ui.items.single_version.pinned_ver') }} {% else %} {% - set pin_repo_text = _('web_ui.items.single_version.pin_repo_button') + set pin_ver_text = _('web_ui.items.single_version.repin_ver_button') %} + {{ _('web_ui.items.single_version.pinned_other_ver') }} {% endif %} - {% do pin_repo_but_classes.append('disabled-button') %} {% else %} - {% - set pin_repo_text = - _('web_ui.items.single_version.repin_repo_button') - %} - {% endif %} - {% else %}{# display_info.frozen == FrozenStatus.REPOSITORY #} - {% set pin_repo_text = _('web_ui.items.single_version.pin_repo_button') %} - {% endif %}{# else/ display_info.frozen == FrozenStatus.REPOSITORY #} + {% set pin_ver_text = _('web_ui.items.single_version.pin_ver_button') %} + {% endif %}{# else/ display_info.frozen == FrozenStatus.EXACT_VERSION #} - {% if display_info.frozen == FrozenStatus.EXACT_VERSION %} {% if display_info.active_version.ref == version_display_info.ref %} - {% set pin_ver_text = _('web_ui.items.single_version.pin_ver_button') %} - {% do pin_ver_but_classes.append('disabled-button') %} - <div> {{ _('web_ui.items.single_version.pinned_ver') }} </div> + {% if display_info.frozen != FrozenStatus.EXACT_VERSION %} + {{ _('web_ui.items.single_version.active_ver_is_this_one') }} + {% endif %} {% else %} - {% - set pin_ver_text = _('web_ui.items.single_version.repin_ver_button') - %} - <div> {{ _('web_ui.items.single_version.pinned_other_ver') }} </div> + {{ + _('web_ui.items.single_version.active_ver_is_{}') + .format( + versioned_identifier_with_repo(display_info.active_version) + ) + }} {% endif %} - {% else %} - {% set pin_ver_text = _('web_ui.items.single_version.pin_ver_button') %} - {% endif %}{# else/ display_info.frozen == FrozenStatus.EXACT_VERSION #} + </p> {{ button_row([ @@ -171,5 +187,7 @@ in a proprietary work, I am not going to enforce this in court. (pin_ver_but_classes, pin_ver_text, 'freeze_to_version') ]) }} + + <div class="horizontal-separator"></div> {% endif %}{# display_info.enabled == EnabledStatus.ENABLED #} {% endblock main_info_bulk %} diff --git a/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja index 093570d..3c2b241 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja @@ -19,7 +19,9 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "base.html.jinja" %} + {% block title %} {{ _('web_ui.packages.title') }} {% endblock %} + {% block style %} {{ super() }} @@ -32,8 +34,10 @@ in a proprietary work, I am not going to enforce this in court. min-height: 2.2em; } {% endblock %} + {% block main %} <h3>{{ _('web_ui.packages.heading') }}</h3> + <ul id="item_list"> {% for info in display_infos %} {% set entry_classes = [] %} |