Remove most CSS, clean up templates

- Assume the existing site has its own styles
This commit is contained in:
Scot Hacker 2014-11-07 22:26:53 -08:00
parent 30127a23de
commit b388aece1b
7 changed files with 201 additions and 281 deletions

View file

@ -24,12 +24,6 @@ a.showlink {
text-decoration: underline; text-decoration: underline;
} }
#tasktable a {
font-weight: bold;
font-family: "Arial";
text-decoration: none;
color: #474747;
}
label { label {
display: block; display: block;
@ -50,20 +44,6 @@ input#id_priority {
width: 30px; width: 30px;
} }
.todo-button {
border: 1px solid #9B9B9B;
background: #E0E0E0;
padding-bottom: 2px;
font-weight: bold;
}
hr {
color: #E5E5E5;
}
#slideToggle {
color: #4A8251;
}
.todo-break { .todo-break {
margin-top: 30px; margin-top: 30px;
@ -74,25 +54,6 @@ table.nocolor, table.nocolor tr, table.nocolor td {
background-color: transparent; background-color: transparent;
} }
table#tasktable td, table#tasktable th {
padding: 5px;
/* font-size:0.9em;*/
}
table#tasktable th {
text-align: left;
/* background-color: #9BCAE4; */
background-color: #046380;
color: #fff;
}
table#tasktable tr.row1 {
background-color: #AEF0BB;
}
table#tasktable tr.row2 {
background-color: #B6F3D5;
}
.minor { .minor {
font-style: italic; font-style: italic;

View file

@ -5,79 +5,69 @@
{% block content %} {% block content %}
{% if messages %} <h2>{{ task }}</h2>
<ul class="messages">
{% for message in messages %} <form action="" method="POST">
<li>{{ message }}</li> {% csrf_token %}
{% endfor %}
</ul>
{% endif %}
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<h2>{{ task }}</h2> <div id="TaskEdit">
<h3>File Trouble Ticket</h3>
<p>Trouble with a computer or other technical system at the J-School? <br />
Use this form to report the difficulty - we'll get right back to you. </p>
<form action="" method="POST"> {% if form.errors %}
{% csrf_token %}
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<div id="TaskEdit">
<h3>File Trouble Ticket</h3>
<p>Trouble with a computer or other technical system at the J-School? <br />
Use this form to report the difficulty - we'll get right back to you. </p>
{% if form.errors %}
{% for error in form.errors %} {% for error in form.errors %}
<ul class="errorlist"> <ul class="errorlist">
<li><strong>The {{ error|escape }} field is required.</strong></li> <li><strong>The {{ error|escape }} field is required.</strong></li>
</ul> </ul>
{% endfor %} {% endfor %}
<br /> <br />
{% endif %} {% endif %}
<table> <table>
{{ form.management_form }} {{ form.management_form }}
{{ form.id }} {{ form.id }}
<tr> <tr>
<td>Summary:</td> <td>Summary:</td>
<td>{{ form.title }} <br /> <td>{{ form.title }} <br />
Include the workstation number in your summary, e.g. <br /> Include the workstation number in your summary, e.g. <br />
"Radio Lab # 4: Purple smoke pouring out the back." "Radio Lab # 4: Purple smoke pouring out the back."
</td> </td>
</tr> </tr>
<tr> <tr>
<td valign="top">Note:</td> <td valign="top">Note:</td>
<td valign="top">{{ form.note }}<br /> <td valign="top">{{ form.note }}<br />
Please describe the problem. </td> Please describe the problem. </td>
</tr> </tr>
<tr> <tr>
<td>Priority:</td> <td>Priority:</td>
<td>{{ form.priority }} <br /> <td>{{ form.priority }} <br />
Enter a number between 1 and 5, <br /> Enter a number between 1 and 5, <br />
where 5 is highest ("Computer is on fire = True"). where 5 is highest ("Computer is on fire = True").
</td> </td>
</tr> </tr>
</table> </table>
<p><input type="submit" class="todo-button" name="add_task" value="Submit"></p> <p><input type="submit" class="todo-button" name="add_task" value="Submit"></p>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}

View file

@ -4,12 +4,12 @@
{% block content %} {% block content %}
<h2>Add a list:</h2> <h2>Add a list:</h2>
<form action="" method="post"> <form action="" method="post">
{% csrf_token %} {% csrf_token %}
<table>{{ form }}</table> <table>{{ form }}</table>
<p><input type="submit" value="Submit" class="todo-button"></p> <p><input type="submit" value="Submit" class="todo-button"></p>
</form> </form>
{% endblock %} {% endblock %}

View file

@ -5,8 +5,8 @@
{% block content %} {% block content %}
{# Only admins can delete lists. #} {# Only admins can delete lists. #}
{% ifequal can_del 1 %} {% ifequal can_del 1 %}
{% if list_killed %} {% if list_killed %}
@ -42,16 +42,11 @@
{% endif %} {% endif %}
{% else %} {% else %}
<p>Sorry, you don't have permission to delete lists. Please contact your group administrator.</p> <p>Sorry, you don't have permission to delete lists. Please contact your group administrator.</p>
{% endifequal %} {% endifequal %}
{% endblock %} {% endblock %}

View file

@ -12,10 +12,6 @@
{% block content %} {% block content %}
{% if message %}
<p class="message">{{ message }}</p>
{% endif %}
{% if found_items %} {% if found_items %}
<h2>{{found_items.count}} search results for term: "{{ query_string }}"</h2> <h2>{{found_items.count}} search results for term: "{{ query_string }}"</h2>
<div class="post_list"> <div class="post_list">

View file

@ -5,18 +5,18 @@
{% block content %} {% block content %}
<script type="text/javascript"> <script type="text/javascript">
function order_tasks(data) { function order_tasks(data) {
// The JQuery plugin tableDnD provides a serialize() function which provides the re-ordered // The JQuery plugin tableDnD provides a serialize() function which provides the re-ordered
// data in a list. We pass that list as an object called "data" to a Django view // data in a list. We pass that list as an object called "data" to a Django view
// to save the re-ordered data into the database. // to save the re-ordered data into the database.
$.post("{% url 'todo-reorder_tasks' %}", data, "json"); $.post("{% url 'todo-reorder_tasks' %}", data, "json");
return false; return false;
}; };
$(document).ready(function() { $(document).ready(function() {
// Initialise the task table for drag/drop re-ordering // Initialise the task table for drag/drop re-ordering
$("#tasktable").tableDnD(); $("#tasktable").tableDnD();
@ -33,9 +33,9 @@ $(document).ready(function() {
$('#slideToggle').click(function(){ $('#slideToggle').click(function(){
$(this).siblings('#AddTask').slideToggle(); $(this).siblings('#AddTask').slideToggle();
}); });
}); });
</script> </script>
{% ifequal list_slug "mine" %} {% ifequal list_slug "mine" %}
@ -48,15 +48,6 @@ $(document).ready(function() {
{% endifequal %} {% endifequal %}
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% ifequal auth_ok 1 %} {% ifequal auth_ok 1 %}
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}

View file

@ -5,9 +5,9 @@
{% block content %} {% block content %}
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
// Initially hide the TaskEdit form // Initially hide the TaskEdit form
$('#TaskEdit').hide(); $('#TaskEdit').hide();
@ -15,105 +15,92 @@ $(document).ready(function() {
$('#slideToggle').click(function(){ $('#slideToggle').click(function(){
$(this).siblings('#TaskEdit').slideToggle(); $(this).siblings('#TaskEdit').slideToggle();
}); });
}); });
</script> </script>
{% if messages %} {% ifequal auth_ok 1 %}
<ul class="messages">
{% for message in messages %} <h2>{{ task }}</h2>
<li>{{ message }}</li>
{% endfor %} <form action="" method="POST">
</ul> {% csrf_token %}
{% endif %} <p id="slideToggle" ><strong>&rarr; Click to edit details &larr;</strong></p>
<p><strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br />
<strong>Assigned to:</strong> {{ task.assigned_to.first_name }} {{ task.assigned_to.last_name }}<br />
<strong>Created by:</strong> {{ task.created_by.first_name }} {{ task.created_by.last_name }}<br />
<strong>Due date:</strong> {{ task.due_date }}<br />
<strong>Completed:</strong> {{ form.completed }}<br />
</p>
{% ifequal auth_ok 1 %} {% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<h2>{{ task }}</h2> <div id="TaskEdit">
<h3>Edit Task</h3>
<form action="" method="POST"> <table>
{% csrf_token %}
<p id="slideToggle" ><strong>&rarr; Click to edit details &larr;</strong></p>
<p><strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br />
<strong>Assigned to:</strong> {{ task.assigned_to.first_name }} {{ task.assigned_to.last_name }}<br />
<strong>Created by:</strong> {{ task.created_by.first_name }} {{ task.created_by.last_name }}<br />
<strong>Due date:</strong> {{ task.due_date }}<br />
<strong>Completed:</strong> {{ form.completed }}<br />
</p>
{% if task.note %}
<div class="task_note"><strong>Note:</strong> {{ task.note|safe|urlize|linebreaks }}</div>
{% endif %}
<div id="TaskEdit">
<h3>Edit Task</h3>
<table>
{{ form.management_form }} {{ form.management_form }}
{{ form.id }} {{ form.id }}
<tr> <tr>
<td>Title:</td> <td>Title:</td>
<td>{{ form.title }} </td> <td>{{ form.title }} </td>
</tr> </tr>
<tr> <tr>
<td>List:</td> <td>List:</td>
<td>{{ form.list }} </td> <td>{{ form.list }} </td>
</tr> </tr>
<tr>
<tr>
<td>Due:</td> <td>Due:</td>
<td>{{ form.due_date }} </td> <td>{{ form.due_date }} </td>
</tr> </tr>
<tr>
<tr>
<td>Assigned to:</td> <td>Assigned to:</td>
<td>{{ form.assigned_to }} </td> <td>{{ form.assigned_to }} </td>
</tr> </tr>
<tr> <tr>
<td valign="top">Note:</td> <td valign="top">Note:</td>
<td>{{ form.note }} </td> <td>{{ form.note }} </td>
</tr> </tr>
<tr> <tr>
<td>Priority:</td> <td>Priority:</td>
<td>{{ form.priority }} </td> <td>{{ form.priority }} </td>
</tr> </tr>
</table> </table>
<p><input type="submit" class="todo-button" name="edit_task" value="Edit task"></p> <p><input type="submit" class="todo-button" name="edit_task" value="Edit task"></p>
</div> </div>
<hr /> <hr />
<h3>Add comment</h3> <h3>Add comment</h3>
<textarea name="comment-body"></textarea> <textarea name="comment-body"></textarea>
<p><input class="todo-button"type="submit" value="Submit"></p> <p><input class="todo-button"type="submit" value="Submit"></p>
</form> </form>
<h3>Comments on this task</h3> <h3>Comments on this task</h3>
<div class="task_comments"> <div class="task_comments">
{% for comment in comment_list %} {% for comment in comment_list %}
<p><strong>{{ comment.author.first_name }} {{ comment.author.last_name }}, {{ comment.date|date:"F d Y P" }}</strong> </p> <p><strong>{{ comment.author.first_name }} {{ comment.author.last_name }}, {{ comment.date|date:"F d Y P" }}</strong> </p>
{{ comment.body|safe|urlize|linebreaks }} {{ comment.body|safe|urlize|linebreaks }}
{% empty %} {% empty %}
<p>No Comments</p> <p>No Comments</p>
{% endfor %} {% endfor %}
</div> </div>
{% endifequal %} {% endifequal %}
{% endblock %} {% endblock %}