Document upload and metadata input working
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Page not found{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Page not found</h1>
|
||||
|
||||
<p>Sorry, but the requested page could not be found.</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Page unavailable</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Page unavailable</h1>
|
||||
|
||||
<p>Sorry, but the requested page is unavailable due to a
|
||||
server problem.</p>
|
||||
|
||||
<p>Administrators have been notified, so check back later.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
{% load i18n %}
|
||||
{% if title %}
|
||||
{% if striptags %}
|
||||
{{ title|capfirst|striptags }}
|
||||
{% else %}
|
||||
{{ title|capfirst|safe }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if read_only %}
|
||||
{% if object_name %}
|
||||
{% blocktrans %}Details for {{ object_name }}: {{ object }}{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans %}Details for: {{ object }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if object %}
|
||||
{% if object_name %}
|
||||
{% blocktrans %}Edit {{ object_name }}:{% endblocktrans %} {% if not striptags %}<a href="{{ object.get_absolute_url }}">{% endif %}{{ object|capfirst }}{% if not striptags %}</a>{% endif %}
|
||||
{% else %}
|
||||
{% trans "Edit" %}: {% if not striptags %}<a href="{{ object.get_absolute_url }}">{% endif %}{{ object|capfirst }}{% if not striptags %}</a>{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if object_name %}
|
||||
{% blocktrans %}Create new {{ object_name }}{% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans "Create" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,43 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %} :: {% blocktrans %}Assign {{ title }} {{ object }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<style>
|
||||
#id_right_list,#id_left_list { min-width: 28em; min-height: 13em; }
|
||||
</style>
|
||||
<div class="content">
|
||||
<h2 class="title">{{ title|safe }}</h2>
|
||||
|
||||
<form method='POST' action='' id='assign_remove'>{% csrf_token %}
|
||||
<input name='action' value='' type='hidden' />
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style='text-align:center;'>{{ left_list_title }}</th><td></td><th style='text-align:center;'>{{ right_list_title }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ form.left_list }}{{ form.left_list.errors }}
|
||||
</td>
|
||||
<td>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><button class="button" onclick='document.forms["assign_remove"].action.value="assign";document.forms["assign_remove"].submit();'>></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button class="button" onclick='document.forms["assign_remove"].action.value="remove";document.forms["assign_remove"].submit();'><</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td>{{ form.right_list }}{{ form.right_list.errors }}</td>
|
||||
</tr>
|
||||
{{ form.media|safe }}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %} :: {% trans 'Confirm' %} {{ title }}{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% for subtemplate in subtemplates %}
|
||||
{% include subtemplate %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="box">
|
||||
<div class="block" id="block-login">
|
||||
{% if delete_view %}
|
||||
<h2>{% trans 'Confirm delete' %}</h2>
|
||||
{% else %}
|
||||
<h2>{% trans 'Confirm' %}</h2>
|
||||
{% endif %}
|
||||
<div class="content login">
|
||||
<form action="" method="post" class="form login">{% csrf_token %}
|
||||
{% if next %}
|
||||
<input name='next' type='hidden' value='{{ next }}' />
|
||||
{% endif %}
|
||||
|
||||
{% if delete_view %}
|
||||
{% if object_name %}
|
||||
<h3>{% blocktrans %}Are you sure you wish to delete {{ object_name }}: {{ object }}?{% endblocktrans %}</h3>
|
||||
{% else %}
|
||||
<h3>{% blocktrans %}Are you sure you wish to delete: {{ object }}?{% endblocktrans %}</h3>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h3>{{ title }}</h3>
|
||||
{% endif %}
|
||||
<h4>{{ message }}</h4>
|
||||
|
||||
<div class="group navform wat-cf">
|
||||
<button class="button" type="submit">
|
||||
<img src="{{ MEDIA_URL }}web_theme_media/images/icons/tick.png" alt="{% trans 'Yes' %}" /> {% trans 'Yes' %}
|
||||
</button>
|
||||
{# TODO: Fix back button #}
|
||||
{% comment %}
|
||||
<a href="#header" onclick='{% if previous %}window.location.replace("{{ previous }}");{% else %}history.go(-1);{% endif %}' class="button">
|
||||
<img src="{{ MEDIA_URL }}web_theme_media/images/icons/cross.png" alt="{% trans 'No' %}"/> {% trans 'No' %}
|
||||
</a>
|
||||
{% endcomment %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load styling %}
|
||||
{% load generic_views_helpers %}
|
||||
{% block title %} :: {% with "true" as read_only %}{% with "true" as striptags %}{% include "calculate_form_title.html" %}{% endwith %}{% endwith %}{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#subform form :input").each(function() {
|
||||
this.disabled = true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% for subtemplate in sidebar_subtemplates %}
|
||||
{% include subtemplate %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<style type="text/css">
|
||||
#subform form textarea,
|
||||
#subform form select option,
|
||||
#subform form input,
|
||||
#subform form select,
|
||||
#subform form input { background: none; color: black; border: none; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="subform">
|
||||
{% with "true" as read_only %}
|
||||
{% include "generic_form_subtemplate.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% for subtemplate in subtemplates %}
|
||||
<div class="content">
|
||||
{% include subtemplate %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for subtemplate in subtemplates_dict %}
|
||||
{% with subtemplate.title as title %}
|
||||
{% with subtemplate.object_list as object_list %}
|
||||
{% with subtemplate.extra_columns as extra_columns %}
|
||||
{% with subtemplate.hide_object as hide_object %}
|
||||
{% with subtemplate.main_object as main_object %}
|
||||
<div class="content">
|
||||
{% include subtemplate.name %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %} :: {% with "true" as striptags %}{% include "calculate_form_title.html" %}{% endwith %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "generic_form_subtemplate.html" %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,39 @@
|
||||
{% load i18n %}
|
||||
{% load styling %}
|
||||
{{ form.media|safe }}
|
||||
{% add_classes_to_form form %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
<div class="flash">
|
||||
{% for value in form.non_field_errors %}
|
||||
<div class="message error">
|
||||
<p>{{ value }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form_display_mode_table %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<tr class="{% cycle 'odd' 'even2' %}">
|
||||
{% for field in form.visible_fields %}
|
||||
<td title="{% if field.errors %}{% for error in field.errors %}{{ error }}{% if not forloop.last %} | {% endif %}{% endfor %}{% else %}{{ field.help_text }}{% endif %}">
|
||||
{% if field.errors %}<div class="flash"><div class="error">{% endif %}
|
||||
{{ field }}
|
||||
{% if field.errors %}</div></div>{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% else %}
|
||||
{% for field in form %}
|
||||
<div class="group">
|
||||
{% if field.errors %}<div class="fieldWithErrors">{% endif %}
|
||||
<label class="label">{{ field.label_tag }}{% if field.field.required and not read_only %} ({% trans 'required' %}){% endif %}</label>
|
||||
{% if field.errors %}<span class="error">{% for error in field.errors %}{{ error }}{% if not forloop.last %} | {% endif %}{% endfor %}</span></div>{% endif %}
|
||||
{{ field }}
|
||||
{% if field.help_text %}<span class="description">{{ field.help_text }}</span>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>
|
||||
{% else %}
|
||||
<div class="content">
|
||||
<h2 class="title">
|
||||
{% endif %}
|
||||
|
||||
{% include "calculate_form_title.html" %}
|
||||
|
||||
{% if side_bar %}
|
||||
</h3>
|
||||
<div class="content">
|
||||
<p>
|
||||
{% else %}
|
||||
</h2>
|
||||
<div class="inner">
|
||||
{% endif %}
|
||||
|
||||
{% if form.is_multipart %}
|
||||
<form enctype="multipart/form-data" method="{{ submit_method|default:'post' }}" action="" class="form">
|
||||
{% else %}
|
||||
<form method="{{ submit_method|default:'post' }}" action="" class="form">
|
||||
{% endif %}
|
||||
{% if step_field %}
|
||||
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if submit_method != 'GET' and submit_method != 'get' %}
|
||||
{% csrf_token %}
|
||||
{% endif %}
|
||||
|
||||
{% for hidden_field in hidden_fields %}
|
||||
{{ hidden_field.as_hidden }}
|
||||
{% endfor %}
|
||||
|
||||
{% if form.management_form %}
|
||||
{% with form as formset %}
|
||||
{{ formset.management_form }}
|
||||
|
||||
{% if form_display_mode_table %}
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
{% for field in formset.forms.0.visible_fields %}
|
||||
<th>
|
||||
{{ field.label_tag }}{% if field.field.required and not read_only %} ({% trans 'required' %}){% endif %}
|
||||
</th>
|
||||
{#{% if field.help_text %}<span class="description">{{ field.help_text }}</span>{% endif %}#}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% for form in formset.forms %}
|
||||
{% include "generic_form_instance.html" %}
|
||||
{% endfor %}
|
||||
{% if form_display_mode_table %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "generic_form_instance.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% if not read_only %}
|
||||
<div class="group navform wat-cf">
|
||||
<button class="button" type="submit">
|
||||
<img src="{{ MEDIA_URL }}web_theme_media/images/icons/tick.png" alt="{% if object %}{% trans 'Save' %}{% else %}{% trans 'Submit' %}{% endif %}" /> {% if object %}{% trans 'Save' %}{% else %}{% trans 'Submit' %}{% endif %}
|
||||
</button>
|
||||
{% comment %}
|
||||
<a href="#header" class="button">
|
||||
<img src="{{ MEDIA_URL }}web_theme_media/images/icons/cross.png" alt="{% trans 'Cancel' %}"/> {% trans 'Cancel' %}
|
||||
</a>
|
||||
{% endcomment %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if sidebar %}
|
||||
</p></div></div>
|
||||
{% else %}
|
||||
</div></div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %} :: {% blocktrans %}List of {{ title }}{% endblocktrans %}{% endblock %}
|
||||
{#{% block secondary_links %}{{ secondary_links|safe }}{% endblock %}#}
|
||||
|
||||
{% block content %}
|
||||
{% include 'generic_list_subtemplate.html' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,71 @@
|
||||
{% load i18n %}
|
||||
{% load attribute_tags %}
|
||||
{% load pagination_tags %}
|
||||
{% load navigation %}
|
||||
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="content">
|
||||
<p>
|
||||
{% else %}
|
||||
{% autopaginate object_list %}
|
||||
<div class="content">
|
||||
<h2 class="title">
|
||||
{% ifnotequal page_obj.paginator.num_pages 1 %}
|
||||
{% blocktrans with page_obj.start_index as start and page_obj.end_index as end and page_obj.paginator.object_list|length as total %}List of {{ title }} ({{ start }} - {{ end }} out of {{ total }}){% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with page_obj.paginator.object_list|length as total %}List of {{ title }} ({{ total }}){% endblocktrans %}
|
||||
{% endifnotequal %}
|
||||
</h2>
|
||||
|
||||
<div class="inner">
|
||||
{% endif %}
|
||||
|
||||
<form action="#" class="form">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
{% if not hide_header %}
|
||||
<tr>
|
||||
{% if not hide_object %}
|
||||
<th>{% trans 'Identifier' %}</th>
|
||||
{% endif %}
|
||||
{% for column in extra_columns %}
|
||||
<th>{{ column.name|capfirst }}</th>
|
||||
{% endfor %}
|
||||
{% if not hide_links %}
|
||||
<th class=""> </th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for object in object_list %}
|
||||
<tr class="{% cycle 'odd' 'even2' %}">
|
||||
{% if not hide_object %}
|
||||
{% if main_object %}
|
||||
{% with object|object_property:main_object as object %}
|
||||
<td>{% if not hide_link %}<a href="{{ object.get_absolute_url }}">{{ object }}</a>{% else %}{{ object }}{% endif %}</td>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<td>{% if not hide_link %}<a href="{{ object.get_absolute_url }}">{{ object }}</a>{% else %}{{ object }}{% endif %}</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for column in extra_columns %}
|
||||
<td>{{ object|object_property:column.attribute|safe }}</td>
|
||||
{% endfor %}
|
||||
{% if not hide_links %}
|
||||
<td class='last'>
|
||||
{% object_navigation_template %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan=99 class="tc">{% blocktrans %}There are no {{ title }}{% endblocktrans %}</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% paginate %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% for link in object_navigation_links %}
|
||||
{% if as_li %}<li>{% endif %}
|
||||
<a href="{{ link.url }}">{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
|
||||
{% if as_li %}</li>{% endif %}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load styling %}
|
||||
{% add_classes_to_form form %}
|
||||
{% block content %}
|
||||
{% with step_title as title %}
|
||||
{% with previous_fields as hidden_fields %}
|
||||
{% if form.management_form %}
|
||||
{% with "true" as form_display_mode_table %}
|
||||
{% include "generic_form_subtemplate.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "generic_form_subtemplate.html" %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
{% extends "web_theme_login.html" %}
|
||||
{% load i18n %}
|
||||
{% load project_tags %}
|
||||
|
||||
{% block html_title %}{% project_name %} :: {% trans "Login" %}{% endblock %}
|
||||
{% block project_name %}{% project_name %}{% endblock %}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %} :: {% trans "Password change" %}{% endblock %}
|
||||
{% block content %}
|
||||
<h2>{% trans "Your password has been successfully changed." %}</h2>
|
||||
{% endblock %}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{% extends "generic_form.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %} :: {% trans "Password change" %}{% endblock %}
|
||||
|
||||
{% block form_title %}{% trans "Password change" %}{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user