~yeliabmas/sloecode/sloecode-template

« back to all changes in this revision

Viewing changes to sloecode/templates/wiki/newfile.html

  • Committer: Sam Bailey
  • Date: 2012-10-30 03:41:50 UTC
  • Revision ID: yeliabmas@gmail.com-20121030034150-o554fsbpuucn7p7i
newfile button on wiki pages now creates a new file at the current directory level. Only provides template options at root directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
    function getVariables() {
11
11
      return {'arrowDown': "{{ h.url('/images/icons/chevron-expand.png') }}", 
12
12
              'arrowUp': "{{ h.url('/images/icons/chevron.png') }}", 
13
 
              'templateLoadUrl': "{{ h.url(controller='wiki', action='load_template', filename='GETS_REPLACED') }}"};
 
13
              'templateLoadUrl': "{{ h.url(controller='wiki', action='load_page_template', filename='GETS_REPLACED') }}"};
14
14
    };
15
15
  </script>
16
16
  {{ h.javascript_link(h.url('/js/wiki-newfile.js')) }}
30
30
  <div id="page_header" class="yui3-u-1">
31
31
    <div class="content-left content-right">
32
32
      {{ h.form(h.url(controller='wiki', action='process_new_file', project_name=project_name), method="post", name="wiki") }}
33
 
 
 
33
        {{ h.hidden('path', path) }}
34
34
        <table>
35
 
          <tr>
36
 
            <td>Template:<br />
37
 
              <span class='field-helper'>You can pre-populate your file with content from
38
 
              a template by selecting one of these.</span></td>
39
 
            <td>{{ h.select('template', None, template_names) }}</td>
40
 
          </tr>
 
35
          {% if path == "" %}
 
36
            <tr>
 
37
              <td>Template:<br />
 
38
                <span class='field-helper'>You can pre-populate your file with content from
 
39
                a template by selecting one of these.</span></td>
 
40
              <td>{{ h.select('template', None, template_names) }}</td>
 
41
            </tr>
 
42
          {% endif %}
41
43
          <tr>
42
44
            <td>Filename:<br />
43
45
            <span class="entry-hint">This is what your new file will be called. 
51
53
            <td>{{ h.textarea('description', cols=45, rows=5) }}</td>
52
54
          </tr>
53
55
        </table>
54
 
 
55
56
        <div id="template_load_content" class='edit-content'>
56
57
          {{ h.textarea('template_content', '', rows=20, style='width:100%') }}
57
58
        </div>
58
 
 
59
 
        <div id="advanced_settings_header">
60
 
          <img src="{{ h.url('/images/icons/chevron-expand.png') }}" alt="Arrow" class="arrow" />
61
 
          Advanced Settings
62
 
        </div>
63
 
        <div id="advanced_settings">
64
 
          <table>
65
 
            <tr>
66
 
              <td>Save Location:<br />
67
 
              <span class="entry-hint">This is the folder that your new file will go into.</span></td>
68
 
              <td>{{ h.text('save_location', '') }}</td>
69
 
            </tr>
70
 
          </table>
71
 
        </div>
 
59
        {% if path == "" %}
 
60
          <div id="advanced_settings_header">
 
61
            <img src="{{ h.url('/images/icons/chevron-expand.png') }}" alt="Arrow" class="arrow" />
 
62
            Advanced Settings
 
63
          </div>
 
64
          <div id="advanced_settings">
 
65
            <table>
 
66
              <tr>
 
67
                <td>Save Location:<br />
 
68
                <span class="entry-hint">This is the folder that your new file will go into.</span></td>
 
69
                <td>{{ h.text('save_location', '') }}</td>
 
70
              </tr>
 
71
            </table>
 
72
          </div>
 
73
        {% endif %}
72
74
        {{ h.submit('save', 'Save') }}
73
75
      {{ h.end_form() }}
74
76
    </div>