Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/take-new-snapshot.html
{% comment %} | {% comment %} | ||||
Copyright (C) 2019 The Software Heritage developers | Copyright (C) 2019 The Software Heritage developers | ||||
See the AUTHORS file at the top-level directory of this distribution | See the AUTHORS file at the top-level directory of this distribution | ||||
License: GNU Affero General Public License version 3, or any later version | License: GNU Affero General Public License version 3, or any later version | ||||
See top-level LICENSE file for more information | See top-level LICENSE file for more information | ||||
{% endcomment %} | {% endcomment %} | ||||
{% load static %} | {% load static %} | ||||
{% load swh_templatetags %} | {% load swh_templatetags %} | ||||
{% if snapshot_context and snapshot_context.origin_info and snapshot_context.origin_info.type|origin_type_savable %} | {% if snapshot_context and snapshot_context.visit_info and snapshot_context.visit_info.type|visit_type_savable %} | ||||
<!-- entry in the Actions menu --> | <!-- entry in the Actions menu --> | ||||
<div class="dropdown-submenu"> | <div class="dropdown-submenu"> | ||||
<button class="dropdown-item" type="button" tabindex="-1" data-toggle="modal" data-target="#swh-take-new-snapshot-modal"> | <button class="dropdown-item" type="button" tabindex="-1" data-toggle="modal" data-target="#swh-take-new-snapshot-modal"> | ||||
<i class="fa fa-camera fa-fw" aria-hidden="true"></i>Take a new snapshot | <i class="fa fa-camera fa-fw" aria-hidden="true"></i>Take a new snapshot | ||||
</button> | </button> | ||||
</div> | </div> | ||||
Show All 15 Lines | <div class="modal-dialog"> | ||||
</p> | </p> | ||||
Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. | Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. | ||||
You can then check its processing state by visiting this <a href="{% url 'origin-save' %}#requests">dedicated page</a>. | You can then check its processing state by visiting this <a href="{% url 'origin-save' %}#requests">dedicated page</a>. | ||||
</p> | </p> | ||||
<form id="swh-take-new-snapshot-form" class="mt-3"> | <form id="swh-take-new-snapshot-form" class="mt-3"> | ||||
{% csrf_token %} | {% csrf_token %} | ||||
<div class="form-row"> | <div class="form-row"> | ||||
<div class="form-group col-md-3"> | <div class="form-group col-md-3"> | ||||
<label for="swh-input-origin-type">Origin type</label> | <label for="swh-input-visit-type">Visit type</label> | ||||
<input id="swh-input-origin-type" class="form-control" value="{{ snapshot_context.origin_info.type }}" disabled> | <input id="swh-input-visit-type" class="form-control" value="{{ snapshot_context.visit_info.type }}" disabled> | ||||
</div> | </div> | ||||
<div class="form-group col-md-9"> | <div class="form-group col-md-9"> | ||||
<label for="swh-input-origin-url">Origin url</label> | <label for="swh-input-origin-url">Origin url</label> | ||||
<input type="text" class="form-control" id="swh-input-origin-url" value="{{ snapshot_context.origin_info.url }}" disabled> | <input type="text" class="form-control" id="swh-input-origin-url" value="{{ snapshot_context.origin_info.url }}" disabled> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="form-row"> | <div class="form-row"> | ||||
<div class="col-md-4"></div> | <div class="col-md-4"></div> | ||||
Show All 16 Lines | See top-level LICENSE file for more information | ||||
</div> | </div> | ||||
<script> | <script> | ||||
swh.save.initTakeNewSnapshot(); | swh.save.initTakeNewSnapshot(); | ||||
</script> | </script> | ||||
{% endif %} | {% endif %} | ||||
No newline at end of file | No newline at end of file |