From 20d47df8fbe49a011dbfdd4e9762903a48e26e9c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 1 Apr 2019 20:48:13 -0700 Subject: basic working release creation --- python/fatcat_web/templates/release_create.html | 85 +++++++++++++++++++------ 1 file changed, 64 insertions(+), 21 deletions(-) (limited to 'python/fatcat_web/templates/release_create.html') diff --git a/python/fatcat_web/templates/release_create.html b/python/fatcat_web/templates/release_create.html index e3a0c9ab..7ede5dfd 100644 --- a/python/fatcat_web/templates/release_create.html +++ b/python/fatcat_web/templates/release_create.html @@ -2,11 +2,11 @@ {% macro form_field_errors(field) -%} {% if field.errors %} - + {% endif %} {%- endmacro %} @@ -21,12 +21,12 @@ {% macro form_field_inline(field, div_classes="") -%}
-
+
{{ field.label }}
-
+
{{ field() }} {{ form_field_errors(field) }}
@@ -44,17 +44,32 @@
{{ form.hidden_tag() }} -

Edit Meta

- {{ form_field_inline(form.editgroup_id) }} - {{ form_field_inline(form.editgroup_description) }} - {{ form_field_inline(form.edit_description) }} +
+
+
+

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 %} + {{ form_field_inline(form.editgroup_id) }} + {{ form_field_inline(form.editgroup_description) }} +

+
+

The Basics

- {{ form_field_basic(form.release_type) }} + {{ form_field_basic(form.release_type, "required") }} {{ form_field_basic(form.release_status) }}
@@ -76,6 +91,7 @@
+

Contributors

{% for cform in form.contribs %} @@ -84,10 +100,14 @@
- {{ cform.role }} +
+ {{ cform.role }} +
- {{ cform.raw_name}} +
+ {{ cform.raw_name}} +
@@ -101,27 +121,47 @@
+

Identifers


{{ form_field_inline(form.doi) }} {{ form_field_inline(form.wikidata_qid) }} {{ form_field_inline(form.isbn13) }} -
- {{ form_field_basic(form.pmid) }} - {{ form_field_basic(form.pmcid) }} +
+
+
+
+ {{ form_field_basic(form.pmid) }} + {{ form_field_basic(form.pmcid) }} +
+
+
+

Container


{{ form_field_inline(form.container_id) }} {{ form_field_inline(form.publisher) }}
-
- {{ form_field_basic(form.pages) }} - {{ form_field_basic(form.volume) }} - {{ form_field_basic(form.issue) }} +
+
+
+
+ {{ form_field_basic(form.pages) }} + {{ form_field_basic(form.volume) }} + {{ form_field_basic(form.issue) }} +
+
+
+

+

Submit

+ {{ form_field_basic(form.edit_description) }} + This description will be attached to this specific action, not to the + editgroup as a whole. +

@@ -135,8 +175,11 @@ $(document).ready(function() { - $('#release_type').dropdown(); - $('#release_status').dropdown(); + // these javascript dropdowns hide the original , which breaks browser + // form focusing (eg, for required fields) :( + //$('#release_type').dropdown(); + //$('#release_status').dropdown(); + $('.ui.accordion').accordion(); var fixup_contrib_numbering = function(group_item) { items = Array.from(group_item.querySelectorAll(".list-group-item")) -- cgit v1.2.3