GdriveFolder code
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{% extends "interface/project_base.html" %}
|
||||
|
||||
{% block admin %}
|
||||
<a href="{% url 'work_detail' collection=collection.pk pk=object.pk %}" class="button is-link is-light">
|
||||
<span>Back to work</span>
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block page %}
|
||||
<h3 class="subtitle"><a href="{% url 'work_detail' collection.pk object.pk %}">{{ object.name }}</a></h3>
|
||||
<div class="m-3">
|
||||
<p>This page lets you link a work to a google drive folder. You can either paste a public link to a folder to enable syncing or a file to add individually</p>
|
||||
</div>
|
||||
<div class="m-3">
|
||||
<p>
|
||||
{% if meta.folderid %}
|
||||
This work is currently linked to <b>{{ meta.folderid }}</b>. Pasting a new folder link will overwrite this.
|
||||
{% else %}
|
||||
There is currently no shared drive folder linked to this work - paste one here to enable syncing.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<form method="post">
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<input name="link" class="input is-expanded" type="text" placeholder="Shared link">
|
||||
</div>
|
||||
{% for error in form.errors.link %}
|
||||
<p class="help is-danger">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<button class="button is-info" type="submit">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -128,10 +128,17 @@
|
||||
</div>
|
||||
{% if request.is_admin %}
|
||||
<div class="column is-one-quarter">
|
||||
<h4 class="is-size-5">Upload files</h4>
|
||||
<h4 class="is-size-5">Add Files</h4>
|
||||
{% if "gdrive" in methods %}
|
||||
<div class="has-text-centered mt-3">
|
||||
<a class="button button-primary" href="{% url 'work_gdrive' collection.pk object.pk %}">Link Google Drive Files</a><br/>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if "upload" in methods %}
|
||||
<form action="{% url 'document_add' collection.pk object.pk %}" class="dropzone" id="doc-upload" style="-moz-user-select: none">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user