diff options
Diffstat (limited to 'python/fatcat_web/templates')
| -rw-r--r-- | python/fatcat_web/templates/release_save.html | 73 | ||||
| -rw-r--r-- | python/fatcat_web/templates/release_view.html | 26 | 
2 files changed, 98 insertions, 1 deletions
| diff --git a/python/fatcat_web/templates/release_save.html b/python/fatcat_web/templates/release_save.html new file mode 100644 index 00000000..29875d3d --- /dev/null +++ b/python/fatcat_web/templates/release_save.html @@ -0,0 +1,73 @@ +{% set release = entity %} +{% set entity_view = "save" %} +{% set entity_type = "release" %} +{% import "entity_macros.html" as entity_macros %} +{% import "edit_macros.html" as edit_macros %} +{% extends "entity_base.html" %} + +{% block entity_main %} + +<div class="ui container text" style="margin-top: 2em;"> +<div class="ui segment" style="padding: 3em;"> +<h1 class="ui header">"Save Paper Now"</h1> + +{% if spn_status == "not-configured" %} + +<div class="ui error message" style="margin: 2em;"> +  <div class="header">Error</div> +  <p>Save Paper Now feature isn't configured, sorry about that. +</div> + +{% elif spn_status == "kafka-error" %} + +<div class="ui error message" style="margin: 2em;"> +  <div class="header">Error</div> +  <p>Whoops, something went wrong and we couldn't enqueue your request. This +  didn't have anything to do with the URL you supplied; please try again later. +</div> + +{% elif spn_status == "success" %} + +<div class="ui positive message" style="margin: 2em;"> +  <div class="header">Success</div> +  <p>URL has been submitted to the bot queue for crawling. If fulltext content +  is found, it will be imported into the catalog for review. Keep an eye on the +  <a href="/reviewable">reviewable editgroups</a> list (can take 5-10 minutes +  depending on throughput and batch sizes). +</div> + +{% else %} +<form class="ui form" id="save_release_form" method="POST" action="/release/{{ release.ident }}/save"> +  <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> + +  <br> +  <p>Know of a legit fulltext copy of this publication on the public web? +  Tell us the URL and we will crawl it and provide free perpetual access. + +  {{ edit_macros.form_field_basic(form.base_url) }} + +  <p style="margin-top: 2em; margin-bottom: 2em;"><b>Important:</b> check the publication stage of the file you are +  submitting. We distinguish between pre-prints, manuscripts, and the +  published version of record (if applicable). + +  <div class="ui equal width fields"> +    {{ edit_macros.form_field_basic(form.release_stage) }} +    {{ edit_macros.form_field_basic(form.ingest_type) }} +  </div> + +  <br> +  <input class="ui primary submit button big left floated" type="submit" value="Submit URL" style="margin-right: 1em;"> +  <div> +    <i>Your request will automatically be enqueued for our bots to crawl and +    process. All new files will be reviewed before being included in the +    catalog +    </i> +  </div> + +</form> +{% endif %} + +</div> +</div> + +{% endblock %} diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index 11b67148..b4e0ba25 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -257,7 +257,31 @@  {% elif entity.state == 'active' and entity.webcaptures != [] and entity.webcaptures[0].archive_urls != [] and entity.webcaptures[0].archive_urls[0].rel == "wayback" %}  <a href="{{ entity.webcaptures[0].archive_urls[0].url }}{{ entity.webcaptures[0]._wayback_suffix }}" class="ui top attached fluid huge green button"><i class="file archive outline icon"></i>View Web Archive</a>  {% elif entity.state == 'active' %} -<span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Full Text Available</span> +<span class="ui top attached fluid huge grey button"><i class="ban icon"></i>No Full Text Available</span> + +<a href="/release/{{ release.ident }}/save" class="ui attached fluid huge blue button"> +  <i class="cloud download icon"></i>"Save Paper Now" +  <div style="margin-top: 0.8em; font-size: smaller; text-align: left;"> +    Know of a fulltext copy of on the public web? Submit a URL and we will archive it +  </div> +</a> + +{# alternative SPN +<div class="ui segment attached"> +  <center> +    <a class="ui blue huge button" href="/release/{{ release.ident }}/save" title="save paper now">Save Paper Now</a> +  </center> +  <p style="margin-top: 0.5em;">Know of a fulltext copy on the public web? Submit a URL and we'll archive it +</div> +#} + +{# alternative SPN +<div class="ui segment attached yellow inverted accordion"> +  <b><a href="/release/{{ release.ident }}/save" title="save paper now" style="color: black;">Save Paper Now</a></b> +  <br>know of a fulltext copy on the public web? submit a URL and we'll archive it +</div> +#} +  {% endif %}  {% if release.release_type or release.release_stage or release.release_year %} | 
