From b14040ecb359d1575280b24eaab9bd0e4964e3f7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 30 Jul 2020 17:31:17 -0700 Subject: wire up new TOML views --- python/fatcat_web/templates/container_create.html | 4 +++- python/fatcat_web/templates/container_edit.html | 5 +++++ python/fatcat_web/templates/edit_macros.html | 2 +- python/fatcat_web/templates/editgroup_view.html | 2 +- python/fatcat_web/templates/entity_edit.html | 8 -------- python/fatcat_web/templates/entity_edit_toml.html | 12 ++++++++++++ python/fatcat_web/templates/file_create.html | 4 +++- python/fatcat_web/templates/file_edit.html | 5 +++++ python/fatcat_web/templates/home.html | 12 ++++-------- python/fatcat_web/templates/release_create.html | 4 +++- python/fatcat_web/templates/release_edit.html | 6 ++++++ 11 files changed, 43 insertions(+), 21 deletions(-) delete mode 100644 python/fatcat_web/templates/entity_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 5786d05d..be8c5671 100644 --- a/python/fatcat_web/templates/container_create.html +++ b/python/fatcat_web/templates/container_create.html @@ -9,13 +9,15 @@ a journal (eg, "New England Journal of Medicine"), conference proceedings, a book series, or a blog. Not all publications are in a container.
+

Experienced users can also use the TOML + creation form to access all metadata fields in a raw format. {% endblock %} {% block edit_form_suffix %}

- New entity will be part of the current editgroup, which needs to be + New container 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. diff --git a/python/fatcat_web/templates/container_edit.html b/python/fatcat_web/templates/container_edit.html index 5188ce0d..fd07b3da 100644 --- a/python/fatcat_web/templates/container_edit.html +++ b/python/fatcat_web/templates/container_edit.html @@ -7,6 +7,11 @@

Edit Container Entity

+ +

Experienced users can also use the TOML editing form to access all metadata + fields in a raw format. {% endblock %}

See the catalog diff --git a/python/fatcat_web/templates/edit_macros.html b/python/fatcat_web/templates/edit_macros.html index 60c17aa9..d4839373 100644 --- a/python/fatcat_web/templates/edit_macros.html +++ b/python/fatcat_web/templates/edit_macros.html @@ -55,7 +55,7 @@ {% macro editgroup_dropdown(form, editgroup=None, potential_editgroups=None) -%} {% if editgroup %}

You are updating an existing un-merged editgroup: {{ editgroup.editgroup_id }}. -

Description: {{ editgroup.description }} +

Description: {{ editgroup.description or "" }} {% else %} {% if not potential_editgroups %}

You have no un-submitted editgroups in progress; a new one will be diff --git a/python/fatcat_web/templates/editgroup_view.html b/python/fatcat_web/templates/editgroup_view.html index e8146d19..a36dc3e5 100644 --- a/python/fatcat_web/templates/editgroup_view.html +++ b/python/fatcat_web/templates/editgroup_view.html @@ -25,7 +25,7 @@ updated {% endif %} [view edit] - {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted and entity_type in ('release', 'file', 'container') %} + {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %} [re-edit] diff --git a/python/fatcat_web/templates/entity_edit.html b/python/fatcat_web/templates/entity_edit.html deleted file mode 100644 index 97f7bf46..00000000 --- a/python/fatcat_web/templates/entity_edit.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} -{% block body %} - -

Not Implemented

- -

Entity editing via the web interface isn't implemented yet. Sorry! - -{% endblock %} diff --git a/python/fatcat_web/templates/entity_edit_toml.html b/python/fatcat_web/templates/entity_edit_toml.html index 4b6e7b6d..807e4d2b 100644 --- a/python/fatcat_web/templates/entity_edit_toml.html +++ b/python/fatcat_web/templates/entity_edit_toml.html @@ -37,3 +37,15 @@ {% endblock %} {% endblock %} +{% block postscript %} + + +{% endblock %} diff --git a/python/fatcat_web/templates/file_create.html b/python/fatcat_web/templates/file_create.html index a7c99b96..affcfb6e 100644 --- a/python/fatcat_web/templates/file_create.html +++ b/python/fatcat_web/templates/file_create.html @@ -5,13 +5,15 @@

Create New File Entity

+

Experienced users can also use the TOML + creation form to access all metadata fields in a raw format. {% endblock %} {% block edit_form_suffix %}

- New entity will be part of the current editgroup, which needs to be + New file 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. diff --git a/python/fatcat_web/templates/file_edit.html b/python/fatcat_web/templates/file_edit.html index e8a421b3..b7876fc5 100644 --- a/python/fatcat_web/templates/file_edit.html +++ b/python/fatcat_web/templates/file_edit.html @@ -7,6 +7,11 @@

Edit File Entity

+ +

Experienced users can also use the TOML editing form to access all metadata + fields in a raw format. {% endblock %}

See the catalog diff --git a/python/fatcat_web/templates/home.html b/python/fatcat_web/templates/home.html index 4557e212..de32d6a4 100644 --- a/python/fatcat_web/templates/home.html +++ b/python/fatcat_web/templates/home.html @@ -171,11 +171,10 @@ Creator
authors, editors, translators +
Create {% if config.FATCAT_DOMAIN == 'fatcat.wiki' %} - Author {% else %} - Author (prod)
Dummy
Realistic @@ -206,11 +205,10 @@

File Set
datasets, suplementary materials + Create {% if config.FATCAT_DOMAIN == 'fatcat.wiki' %} - Dataset {% else %} - Dataset (prod)
Dummy
Realistic @@ -218,12 +216,11 @@ Web Capture
HTML and interactive articles, blog posts + Create {% if config.FATCAT_DOMAIN == 'fatcat.wiki' %} - D-Lib
Blog Post {% else %} - D-Lib (prod)
Dummy
Realistic @@ -231,11 +228,10 @@ Work
for grouping Releases + Create {% if config.FATCAT_DOMAIN == 'fatcat.wiki' %} - Paper {% else %} - Paper (prod)
Dummy
Realistic diff --git a/python/fatcat_web/templates/release_create.html b/python/fatcat_web/templates/release_create.html index 5ec2efe5..4f5dabd7 100644 --- a/python/fatcat_web/templates/release_create.html +++ b/python/fatcat_web/templates/release_create.html @@ -5,13 +5,15 @@

Create New Release Entity

+

Experienced users can also use the TOML + creation form to access all metadata fields in a raw format. {% endblock %} {% block edit_form_suffix %}

- New entity will be part of the current editgroup, which needs to be + New release 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. diff --git a/python/fatcat_web/templates/release_edit.html b/python/fatcat_web/templates/release_edit.html index a4a7e56f..21c8cf68 100644 --- a/python/fatcat_web/templates/release_edit.html +++ b/python/fatcat_web/templates/release_edit.html @@ -7,6 +7,11 @@

Edit Release Entity

+ +

Experienced users can also use the TOML editing form to access all metadata + fields in a raw format. {% endblock %}

See the catalog @@ -14,6 +19,7 @@ href="https://guide.fatcat.wiki/editing_quickstart.html">the editing tutorial if this is your first time making an edit. + {{ form.hidden_tag() }}

Editgroup Metadata

-- cgit v1.2.3