~yeliabmas/sloecode/sloecode-template

« back to all changes in this revision

Viewing changes to sloecode/templates/admin/template-view.html

  • Committer: Sam Bailey
  • Date: 2012-10-30 03:45:30 UTC
  • Revision ID: yeliabmas@gmail.com-20121030034530-1obbt428wynab8lh
Tidied up most of the page template interfaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
{% block title %} Wiki {% endblock %}
4
4
 
5
5
{% block content %}
 
6
 
 
7
<div class="yui3-g">
 
8
  <div id="page_header" class="yui3-u-1">
 
9
    <div class="content-left">
 
10
      <h2>
 
11
      {% if template %}
 
12
        {{template.name}}:
 
13
      {% else %}
 
14
        {{filename}}:
 
15
      {% endif %}
 
16
      </h2>
 
17
    </div>
 
18
  </div>
 
19
</div>
 
20
 
 
21
<div class="yui3-g">
 
22
  <div id="page_header" class="yui3-u-1">
 
23
    <div class="content-left content-right">
 
24
      {% if template %}
 
25
        <table>
 
26
          <tr>
 
27
            <td>Name:</td>
 
28
            <td>{{ template.name }}</td>
 
29
          </tr>
 
30
          <tr>
 
31
            <td>Description:</td>
 
32
            <td>{{ template.description }}</td>
 
33
          </tr>
 
34
          <tr>
 
35
            <td>Save Location:</td>
 
36
            <td>{{ template.save_location }}</td>
 
37
          </tr>
 
38
          <tr>
 
39
            <td>Actions:</td>
 
40
            <td>
 
41
              {{ h.link_to("Edit", h.url(controller="admin/wiki", 
 
42
                                         action="edit_page_template", 
 
43
                                         filename=filename)) }}, 
 
44
              {{ h.link_to("Delete", h.url(controller="admin/wiki",
 
45
                                           action="delete_page_template",
 
46
                                           filename=filename),
 
47
                           confirm="Are you sure you wish to delete this page template?") }}
 
48
            </td>
 
49
          </tr>
 
50
        </table>
 
51
        Content:
 
52
        <table width="99%">
 
53
          <tr>
 
54
            <td>
 
55
              {{ formatter.format(template.name, 
 
56
                                  template.content, 
 
57
                                  strip_html=False).replace('\n', '<br>') }}
 
58
            </td>
 
59
          </tr>
 
60
        </table>
 
61
        
 
62
      {% else %}
 
63
        There is no template with this name.<br>
 
64
        {{h.link_to('Click here to create it', h.url(controller='admin/wiki',
 
65
                          action='edit_page_template',
 
66
                          filename=filename))}}
 
67
      {% endif %}
 
68
    </div>
 
69
  </div>
 
70
</div>
6
71
 
7
 
{% if template %}
8
 
  {{ h.link_to("Edit", h.url(controller="admin/wiki", action="edit_template", filename=filename))}}<br>
9
 
  Name: {{ template.name }}<br>
10
 
  Description: {{ template.description }}<br>
11
 
  Save Location: {{ template.save_location }}<br>
12
 
  Content: 
13
 
  {{ formatter.format(template.name, template.content.replace('\n', '<br>'), strip_html=False) }}<br>
14
 
{% else %}
15
 
  There is no template with that name.<br>
16
 
  {{h.link_to('Click here to create it', h.url(controller='admin/wiki',
17
 
                    action='edit_template',
18
 
                    filename=filename))}}
19
 
{% endif %}
 
72
 
20
73
 
21
74
{% endblock %}
 
 
b'\\ No newline at end of file'