diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-02 18:34:22 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-02 18:34:22 -0700 |
commit | e192f20bb7f950bbbd4ea88724340eb1f5b66357 (patch) | |
tree | 50a8e282a74f1083bab2229724400e3b98c7b39e | |
parent | 428f8872d15aff319602697f16ffb51868c86c12 (diff) | |
download | fatcat-e192f20bb7f950bbbd4ea88724340eb1f5b66357.tar.gz fatcat-e192f20bb7f950bbbd4ea88724340eb1f5b66357.zip |
editgroup_dropdown() macro refactor
-rw-r--r-- | python/fatcat_web/templates/container_edit.html | 19 | ||||
-rw-r--r-- | python/fatcat_web/templates/edit_macros.html | 20 | ||||
-rw-r--r-- | python/fatcat_web/templates/release_edit.html | 18 |
3 files changed, 23 insertions, 34 deletions
diff --git a/python/fatcat_web/templates/container_edit.html b/python/fatcat_web/templates/container_edit.html index 4dbcfbd5..2a3f6f5f 100644 --- a/python/fatcat_web/templates/container_edit.html +++ b/python/fatcat_web/templates/container_edit.html @@ -10,23 +10,8 @@ {% endblock %} {{ form.hidden_tag() }} - <div class="ui accordion"> - <div class="{% if not editgroup_id %}active{% endif %} title"> - <h3><i class="dropdown icon"></i>Editgroup Meta</h3> - </div> - <div class="{% if not editgroup_id %}active{% endif %} content"> - {% if editgroup_id %} - <p>You have an editgroup in progress, and this edit will be included by - default. You can override this below. - {% else %} - <p>No existing editgroup is in progress (or at least, not is selected). - An existing ID can be pasted in, or if you leave that blank but give a - description, a new editgroup will be created for this edit. - {% endif %} - {{ edit_macros.form_field_inline(form.editgroup_id) }} - {{ edit_macros.form_field_inline(form.editgroup_description) }} - </div> - </div> + <br> + {{ edit_macros.editgroup_dropdown(form) }} <h3 class="ui dividing header">The Basics</h3> <br> diff --git a/python/fatcat_web/templates/edit_macros.html b/python/fatcat_web/templates/edit_macros.html index ad563066..9bd14596 100644 --- a/python/fatcat_web/templates/edit_macros.html +++ b/python/fatcat_web/templates/edit_macros.html @@ -34,3 +34,23 @@ </div> </div> {%- endmacro %} + +{% macro editgroup_dropdown(form) -%} + <div class="ui accordion"> + <div class="{% if not editgroup_id %}active{% endif %} title"> + <h3><i class="dropdown icon"></i>Editgroup Meta</h3> + </div> + <div class="{% if not editgroup_id %}active{% endif %} content"> + {% if editgroup_id %} + <p>You have an editgroup in progress, and this edit will be included by + default. You can override this below. + {% else %} + <p>No existing editgroup is in progress (or at least, not is selected). + An existing ID can be pasted in, or if you leave that blank but give a + description, a new editgroup will be created for this edit. + {% endif %} + {{ form_field_inline(form.editgroup_id) }} + {{ form_field_inline(form.editgroup_description) }} + </div> + </div> +{%- endmacro %} diff --git a/python/fatcat_web/templates/release_edit.html b/python/fatcat_web/templates/release_edit.html index 518a499d..16c189ab 100644 --- a/python/fatcat_web/templates/release_edit.html +++ b/python/fatcat_web/templates/release_edit.html @@ -11,23 +11,7 @@ {{ form.hidden_tag() }} <br> - <div class="ui accordion"> - <div class="{% if not editgroup_id %}active{% endif %} title"> - <h3><i class="dropdown icon"></i>Editgroup Meta</h3> - </div> - <div class="{% if not editgroup_id %}active{% endif %} content"> - {% if editgroup_id %} - <p>You have an editgroup in progress, and this edit will be included by - default. You can override this below. - {% else %} - <p>No existing editgroup is in progress (or at least, not is selected). - An existing ID can be pasted in, or if you leave that blank but give a - description, a new editgroup will be created for this edit. - {% endif %} - {{ edit_macros.form_field_inline(form.editgroup_id) }} - {{ edit_macros.form_field_inline(form.editgroup_description) }} - </div> - </div> + {{ edit_macros.editgroup_dropdown(form) }} <br> <h3 class="ui dividing header">The Basics</h3> |