author | Sverre Rabbelier <srabbelier@gmail.com> |
Sat, 11 Apr 2009 22:57:23 +0000 | |
changeset 2159 | a1f1eaaf458b |
parent 1828 | 3db2a7be7239 |
child 2330 | 068540d91bde |
permissions | -rw-r--r-- |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
1 |
{% extends "soc/base.html" %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
2 |
{% comment %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
3 |
Licensed under the Apache License, Version 2.0 (the "License"); |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
4 |
you may not use this file except in compliance with the License. |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
5 |
You may obtain a copy of the License at |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
6 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
7 |
http://www.apache.org/licenses/LICENSE-2.0 |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
8 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
9 |
Unless required by applicable law or agreed to in writing, software |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
10 |
distributed under the License is distributed on an "AS IS" BASIS, |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
11 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
12 |
See the License for the specific language governing permissions and |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
13 |
limitations under the License. |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
14 |
{% endcomment %} |
741
2dc2c65c5f76
Converted as_table to be a template tag
Sverre Rabbelier <srabbelier@gmail.com>
parents:
545
diff
changeset
|
15 |
{% load forms_helpers %} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
16 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
17 |
{% block header_title %} |
482
839740b061ad
Factor out direct use of the page object
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
18 |
{{ page_name }} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
19 |
{% if entity %} |
2159
a1f1eaaf458b
Use key.id_or_name in templates rather than key.name
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1828
diff
changeset
|
20 |
<a href="/{{ entity_type_url|lower }}/show/{{ entity.key.id_or_name }}" |
545
217921e76f50
Include name of entity in the text of the link to the read-only public view
Todd Larsen <tlarsen@google.com>
parents:
502
diff
changeset
|
21 |
>{% if entity.name %}{{ entity.name }} {% endif %}(public view)</a> |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
22 |
{% endif %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
23 |
{% endblock %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
24 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
25 |
{% block body %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
26 |
<p> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
27 |
<p> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
28 |
{% block instructions %} |
415
6488ff168b42
Fix typo in models/public.html template. Changes in Host Public Profile template (new header title and deletion of some fields).
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
409
diff
changeset
|
29 |
Please use this form to edit the {{ entity_type }}. |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
30 |
{% endblock %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
31 |
</p> |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
32 |
|
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
33 |
{% if error_message %} |
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
34 |
<div class="error">{{ error_message|safe }}</div> |
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
35 |
{% endif %} |
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
36 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
37 |
<form method="POST"> |
741
2dc2c65c5f76
Converted as_table to be a template tag
Sverre Rabbelier <srabbelier@gmail.com>
parents:
545
diff
changeset
|
38 |
<table> |
785
c740d0129cce
Added a twoline_edit.html page
Sverre Rabbelier <srabbelier@gmail.com>
parents:
741
diff
changeset
|
39 |
{% block form_table %} |
c740d0129cce
Added a twoline_edit.html page
Sverre Rabbelier <srabbelier@gmail.com>
parents:
741
diff
changeset
|
40 |
{% as_table form %} |
c740d0129cce
Added a twoline_edit.html page
Sverre Rabbelier <srabbelier@gmail.com>
parents:
741
diff
changeset
|
41 |
{% endblock %} |
741
2dc2c65c5f76
Converted as_table to be a template tag
Sverre Rabbelier <srabbelier@gmail.com>
parents:
545
diff
changeset
|
42 |
</table> |
2dc2c65c5f76
Converted as_table to be a template tag
Sverre Rabbelier <srabbelier@gmail.com>
parents:
545
diff
changeset
|
43 |
<table> |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
44 |
<tr> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
45 |
<td colspan="4"> </td> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
46 |
</tr> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
47 |
<tr> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
48 |
{% block submit_buttons %} |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
49 |
{% block save_button %} |
1828
3db2a7be7239
Changed the edit template to show a Submit button instead of Save Changes when "creating" an entity.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1499
diff
changeset
|
50 |
{% if entity %} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
51 |
<td> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
52 |
<input style="font-weight: bold" type="submit" value="Save Changes"/></span> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
53 |
</td> |
1828
3db2a7be7239
Changed the edit template to show a Submit button instead of Save Changes when "creating" an entity.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1499
diff
changeset
|
54 |
{% else %} |
3db2a7be7239
Changed the edit template to show a Submit button instead of Save Changes when "creating" an entity.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1499
diff
changeset
|
55 |
<td> |
3db2a7be7239
Changed the edit template to show a Submit button instead of Save Changes when "creating" an entity.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1499
diff
changeset
|
56 |
<input style="font-weight: bold" type="submit" value="Submit"/></span> |
3db2a7be7239
Changed the edit template to show a Submit button instead of Save Changes when "creating" an entity.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1499
diff
changeset
|
57 |
</td> |
3db2a7be7239
Changed the edit template to show a Submit button instead of Save Changes when "creating" an entity.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1499
diff
changeset
|
58 |
{% endif %} |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
59 |
{% endblock %} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
60 |
<td> |
1035
04229d710ce9
Allow for setting a edit_cancel_redirect
Sverre Rabbelier <srabbelier@gmail.com>
parents:
858
diff
changeset
|
61 |
{% if edit_cancel_redirect %} |
04229d710ce9
Allow for setting a edit_cancel_redirect
Sverre Rabbelier <srabbelier@gmail.com>
parents:
858
diff
changeset
|
62 |
<input type="button" onclick="location.href='{{ edit_cancel_redirect }}'" value="Cancel"/> |
04229d710ce9
Allow for setting a edit_cancel_redirect
Sverre Rabbelier <srabbelier@gmail.com>
parents:
858
diff
changeset
|
63 |
{% else %} |
04229d710ce9
Allow for setting a edit_cancel_redirect
Sverre Rabbelier <srabbelier@gmail.com>
parents:
858
diff
changeset
|
64 |
<input type="button" value="Back to Previous Page" onClick="javascript: history.go(-1)"> |
04229d710ce9
Allow for setting a edit_cancel_redirect
Sverre Rabbelier <srabbelier@gmail.com>
parents:
858
diff
changeset
|
65 |
{% endif %} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
66 |
</td> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
67 |
{% if entity %} |
1049
cc6aedbde28d
Fixed the edit site view having a delete button
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1035
diff
changeset
|
68 |
{% block delete_button %} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
69 |
<td> |
1448
abb676cb0094
Added an 'are you sure' message to the delete button
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1359
diff
changeset
|
70 |
|
1499
1dec049246d3
Fix the delete button submitting the form
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1448
diff
changeset
|
71 |
<input type="button" class="button" value="Delete" |
1448
abb676cb0094
Added an 'are you sure' message to the delete button
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1359
diff
changeset
|
72 |
onclick="if(confirm('Are you sure you want to delete this {{ entity_type }}?')) { |
1499
1dec049246d3
Fix the delete button submitting the form
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1448
diff
changeset
|
73 |
location.href='/{{ entity_type_url|lower }}/delete/{{ entity_suffix }}'; |
1dec049246d3
Fix the delete button submitting the form
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1448
diff
changeset
|
74 |
}"/> |
1448
abb676cb0094
Added an 'are you sure' message to the delete button
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1359
diff
changeset
|
75 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
76 |
</td> |
1049
cc6aedbde28d
Fixed the edit site view having a delete button
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1035
diff
changeset
|
77 |
{% endblock %} |
858
e79e7a22326f
Add an export() view, and implement it as text/text for Document.
Todd Larsen <tlarsen@google.com>
parents:
785
diff
changeset
|
78 |
{% if export_link %} |
e79e7a22326f
Add an export() view, and implement it as text/text for Document.
Todd Larsen <tlarsen@google.com>
parents:
785
diff
changeset
|
79 |
<td> |
e79e7a22326f
Add an export() view, and implement it as text/text for Document.
Todd Larsen <tlarsen@google.com>
parents:
785
diff
changeset
|
80 |
<input type="button" onclick="location.href='/{{ entity_type_url|lower }}/export/{{ entity_suffix }}'" value="Export"/> |
e79e7a22326f
Add an export() view, and implement it as text/text for Document.
Todd Larsen <tlarsen@google.com>
parents:
785
diff
changeset
|
81 |
</td> |
e79e7a22326f
Add an export() view, and implement it as text/text for Document.
Todd Larsen <tlarsen@google.com>
parents:
785
diff
changeset
|
82 |
{% endif %} |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
83 |
{% endif %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
84 |
{% endblock %} |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
85 |
</tr> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
86 |
</table> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
87 |
</form> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
88 |
</p> |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
89 |
{% endblock %} |