From 4987611cf602751a8248662511438acb2d1c45b7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 2 Apr 2019 16:04:37 -0700 Subject: basic container create/edit forms --- python/fatcat_web/templates/container_create.html | 167 ++-------------------- python/fatcat_web/templates/container_edit.html | 65 +++++++++ 2 files changed, 78 insertions(+), 154 deletions(-) create mode 100644 python/fatcat_web/templates/container_edit.html (limited to 'python/fatcat_web/templates') diff --git a/python/fatcat_web/templates/container_create.html b/python/fatcat_web/templates/container_create.html index 15288142..5dde37bf 100644 --- a/python/fatcat_web/templates/container_create.html +++ b/python/fatcat_web/templates/container_create.html @@ -1,7 +1,8 @@ -{% extends "base.html" %} -{% block body %} +{% extends "container_edit.html" %} + +{% block edit_form_prefix %}
-

Adding a New Container

+

Create New Container Entity

A "container" is a anything that groups publications together. For example, a journal (eg, "New England Journal of Medicine"), conference proceedings, a @@ -9,160 +10,18 @@ book series, or a blog.

Not all publications are in a container. -

- -

The Basics

- -
- - -
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - - - - -

Anything Else?

- -
Create container
- -

Entity will be created as part of the current edit group, which needs to be -submited and approved before the entity will formally be included in the -catalog. + +{% endblock %} +{% block edit_form_suffix %} +

+ +

+ New entity will be part of the current editgroup, which needs to be + submited and approved before the entity will formally be included in the + catalog.

-
{% endblock %} -{% block postscript %} - -{% endblock %} diff --git a/python/fatcat_web/templates/container_edit.html b/python/fatcat_web/templates/container_edit.html new file mode 100644 index 00000000..4dbcfbd5 --- /dev/null +++ b/python/fatcat_web/templates/container_edit.html @@ -0,0 +1,65 @@ +{% import "edit_macros.html" as edit_macros %} +{% extends "base.html" %} + +{% block body %} +{% block edit_form_prefix %} +
+

Edit Container Entity

+ +
+{% endblock %} + {{ form.hidden_tag() }} + +
+
+

Editgroup Meta

+
+
+ {% if editgroup_id %} +

You have an editgroup in progress, and this edit will be included by + default. You can override this below. + {% else %} +

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) }} +

+
+ +

The Basics

+
+ {{ edit_macros.form_field_inline(form.container_type, "required") }} + {{ edit_macros.form_field_inline(form.name, "required") }} + {{ edit_macros.form_field_inline(form.publisher) }} + {{ edit_macros.form_field_inline(form.issnl) }} + {{ edit_macros.form_field_inline(form.wikidata_qid) }} + +
+

Submit

+ {{ edit_macros.form_field_basic(form.edit_description) }} + This description will be attached to the individual edit, not to the + editgroup as a whole. +{% block edit_form_suffix %} +

+ +

+ Edit will be part of the current editgroup, which needs to be submited and + approved before the change is included in the catalog. +

+
+{% endblock %} +{% endblock %} + +{% block postscript %} + +{% endblock %} + -- cgit v1.2.3