S3 upload working
This commit is contained in:
@@ -17,16 +17,21 @@
|
||||
|
||||
{% block header %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<a class="navbar-brand" href="#"><i class="fas fa-random"></i> Polyphonic</a>
|
||||
<a class="navbar-brand" href="/"><i class="fas fa-random"></i> Polyphonic</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<span class="navbar-text">Virtual Ensemble Manager</span>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent"></div>
|
||||
<ul class="navbar-nav ml-auto">
|
||||
{% if request.ensemble_id %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'myprojects' %}""><i class="fas fa-music"></i> My Projects</a>
|
||||
<a class="nav-link" href="{% url 'my_projects' %}"><i class="fas fa-music"></i> My Projects</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'register' %}"><i class="fas fa-users"></i> Change Ensemble</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href=""><i class="fas fa-question"></i> About</a>
|
||||
</li>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<form class="form-horizontal" method="post">{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend>{{ title }}</legend>
|
||||
{% for field in form %}
|
||||
{% if field.errors %}
|
||||
<div class="control-group error">
|
||||
<label class="control-label">{{ field.label }}</label>
|
||||
<div class="controls">{{ field }}
|
||||
<span class="help-inline">
|
||||
{% for error in field.errors %}{{ error }}{% endfor %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ field.label }}</label>
|
||||
<div class="controls">{{ field }}
|
||||
{% if field.help_text %}
|
||||
<p class="help-inline"><small>{{ field.help_text }}</small></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
<div class="form-actions text-right">
|
||||
<button type="submit" class="btn btn-primary" >Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -7,6 +7,7 @@
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
{% block page %}
|
||||
<h3 class="text-center">Due in {{ project.deadline|timeuntil }}</h3>
|
||||
<p>There have been {{ project.submissions.count }} submissions so far...</p>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container">
|
||||
<h1>Projects for {{ ensemble.name }}</h1>
|
||||
<div class="col-md-8 offset-md-2">
|
||||
<div class="list-group">
|
||||
{% for project in ensemble.active_projects %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'project' project_id=project.id %}">
|
||||
<h4>{{ project.name }}</h4>
|
||||
<p><small>Due in {{ project.deadline|timeuntil }}</small></p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-4 offset-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header">Enter the ensemble details given to you</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="code">Ensemble Code</label>
|
||||
<input type="text" class="form-control" placeholder="xxxx-xxxx-xxxx" name="code" value="{{ code }}"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passphrase">Passphrase</label>
|
||||
<input type="password" class="form-control" name="passphrase"/>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary">Enter</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -3,29 +3,11 @@
|
||||
{% block page %}
|
||||
<p>
|
||||
Some instructions about how to submit the file
|
||||
{{ url }}
|
||||
</p>
|
||||
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" id="name" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="instrument">Instrument</label>
|
||||
<input type="text" id="instrument" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="video-file">Video File</label>
|
||||
<input type="file" accept="video/*" class="" id="video-file" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea class="form-control" id="notes"></textarea>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
{% include "interface/bootstrap-form.html" %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="col-md-4 offset-md-4">
|
||||
<form method="POST" action="{{ upload.url }}" enctype="multipart/form-data">
|
||||
{% for field, value in upload.fields.items %}
|
||||
<input type="hidden" name="{{ field }}" value="{{ value }}" />
|
||||
{% endfor %}
|
||||
File:
|
||||
<input name="file" type="file" accept="video/*"/>
|
||||
<div class="text-right">
|
||||
<a class="btn btn-secondary" href="{% url 'cancel_submission' project_id=project.pk submission_id=submission.pk %}">Cancel</a>
|
||||
<button class="btn btn-primary">Upload</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user