~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/browser/template.html

ivle.webapp.testing: Add, with fake request and user.
ivle.webapp.base.test: Add! Test the JSONRESTView, using the new mocks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<html xmlns="http://www.w3.org/1999/xhtml"
2
 
      xmlns:py="http://genshi.edgewall.org/">
 
2
      xmlns:xi="http://www.w3.org/2001/XInclude"
 
3
      xmlns:py="http://genshi.edgewall.org/" py:strip="">
3
4
<!-- Top bar section -->
4
 
<head>
5
 
  <title>${title}</title>
6
 
</head>
7
 
<body>
 
5
<body py:strip="">
8
6
  <div id="topbar">
9
 
    <h1 id="path">
10
 
      <py:for each="segment in paths">/<a href="${segment['href_path']}" title="Navigate to ${segment['nav_path']}">${segment['path']}</a></py:for><py:if test="isdir">/</py:if><py:if test="revno is not None"> (revision ${revno})</py:if>
11
 
    </h1>
12
 
    <div id="actions">
13
 
      <span id="actions1">
14
 
        <a id="act_open" class="disabled">Open</a> :
15
 
        <a id="act_serve"
16
 
            title="View this file on the web, running your code if this is a CGI file"
17
 
            class="disabled" target="_blank">Serve</a> :
18
 
        <a id="act_run" title="Run the selected Python file in the console"
19
 
            class="disabled">Run</a> :
20
 
        <a id="act_download" class="choice">Download</a> :
21
 
        <a title="Refresh the current page" onclick="refresh()"
22
 
            class="choice">Refresh</a>
23
 
        <span id="moreactions_area"> :
24
 
          <select id="moreactions" onchange="handle_moreactions()"
25
 
              onblur="handle_moreactions()">
26
 
            <option class="moreactions" value="top"
27
 
                selected="selected">More actions...</option>
28
 
            <py:for each="(name, disablement, group) in moreactions">
29
 
 
30
 
              <optgroup label="${name}">
31
 
 
32
 
                <py:choose test="disablement">
33
 
 
34
 
                  <py:when test="True">
35
 
                    <py:for each="(id, bits) in group">
36
 
                      <option id="act_${id}" class="disabled" disabled="disabled"
37
 
                          title="${bits[1]}" value="${id}">${bits[0]}</option>
38
 
                    </py:for>
39
 
                  </py:when>
40
 
 
41
 
                  <py:otherwise>
42
 
                    <py:for each="(id, bits) in group">
43
 
                      <option id="act_${id}" title="${bits[1]}" 
44
 
                          value="${id}">${bits[0]}</option>
45
 
                    </py:for>                
46
 
                  </py:otherwise>
47
 
 
48
 
                </py:choose>
49
 
 
50
 
              </optgroup>
51
 
            </py:for>
52
 
          </select>
53
 
        </span>
54
 
      </span> <!-- actions1 -->
55
 
      <span id="actions2">
56
 
        <form id="actions2_directory"
57
 
            target="upload_iframe"
58
 
            action="${fileservice_action}"
59
 
            enctype="multipart/form-data" method="post">
60
 
          <span style="display:none" id="uploadpanel">
 
7
    <div id="path">
 
8
      <span>
 
9
        <py:for each="segment in paths">/<a href="${segment['href_path']}" title="Navigate to ${segment['nav_path']}">${segment['path']}</a></py:for><py:if test="isdir">/</py:if><py:if test="revno is not None"> (revision ${revno})</py:if>
 
10
      </span>
 
11
    </div>
 
12
    <div id="actions1">
 
13
      <a id="act_open" class="disabled">Open</a> :
 
14
      <a id="act_serve"
 
15
          title="View this file on the web, running your code if this is a CGI file"
 
16
          class="disabled" target="_blank">Serve</a> :
 
17
      <a id="act_run" title="Run the selected Python file in the console"
 
18
          class="disabled">Run</a> :
 
19
      <a id="act_download" class="choice">Download</a> :
 
20
      <a title="Refresh the current page" onclick="refresh()"
 
21
          class="choice">Refresh</a>
 
22
      <span id="moreactions_area"> :
 
23
        <select id="moreactions" onchange="handle_moreactions()"
 
24
            onblur="handle_moreactions()">
 
25
          <option class="moreactions" value="top"
 
26
              selected="selected">More actions...</option>
 
27
          <py:for each="(name, disablement, group) in moreactions">
 
28
 
 
29
            <optgroup label="${name}">
 
30
 
 
31
              <py:choose test="disablement">
 
32
 
 
33
                <py:when test="True">
 
34
                  <py:for each="(id, bits) in group">
 
35
                    <option id="act_${id}" class="disabled" disabled="disabled"
 
36
                        title="${bits[1]}" value="${id}">${bits[0]}</option>
 
37
                  </py:for>
 
38
                </py:when>
 
39
 
 
40
                <py:otherwise>
 
41
                  <py:for each="(id, bits) in group">
 
42
                    <option id="act_${id}" title="${bits[1]}" 
 
43
                        value="${id}">${bits[0]}</option>
 
44
                  </py:for>                
 
45
                </py:otherwise>
 
46
 
 
47
              </py:choose>
 
48
 
 
49
            </optgroup>
 
50
          </py:for>
 
51
        </select>
 
52
      </span>
 
53
    </div>
 
54
    <div id="actions2">
 
55
      <form id="actions2_directory"
 
56
          target="upload_iframe"
 
57
          action="${fileservice_action}"
 
58
          enctype="multipart/form-data" method="post">
 
59
        <p>
 
60
          <span id="selectallpanel">
 
61
          Select:
 
62
            <a onclick="action_selectall(true)"
 
63
                title="Select all files in this directory">All</a> :
 
64
            <a onclick="action_selectall(false)"
 
65
                title="Deselect all files in this directory">None</a>
 
66
          </span>
 
67
 
 
68
          <span style="display:none" id="uploadpanel">|
61
69
            <label for="upload_file">Upload file:</label>
62
70
            <input type="hidden" value="putfiles" name="action" />
63
71
            <input type="hidden" value="" name="path" />
71
79
               refreshing the page. (It will refresh the listing). -->
72
80
          <iframe onload="upload_callback()" style="display: none;"
73
81
              name="upload_iframe" id="upload_iframe"></iframe>
74
 
        </form>
75
 
        <span id="actions2_file">
76
 
          <input type="button" id="save_button" value="Save" onclick="save_file('${filename}')" />
77
 
          <input type="button" id="saveas_button" value="Save As..." onclick="save_file_as('${filename}')" />
78
 
          <select id="highlighting_select" onchange="highlighting_changed(this)">
79
 
            <option value="text">Text</option>
80
 
            <option value="python">Python</option>
81
 
            <option value="html">HTML</option>
82
 
            <option value="javascript">JavaScript</option>
83
 
            <option value="css">CSS</option>
84
 
          </select>
85
 
        </span>
86
 
      </span> <!-- actions2 -->
87
 
    </div> <!-- actions -->
 
82
        </p>
 
83
      </form>
 
84
      <p id="actions2_file">
 
85
        <input type="button" id="save_button" value="Save" onclick="save_file('${filename}')" />
 
86
        <input type="button" id="saveas_button" value="Save As..." onclick="save_file_as('${filename}')" />
 
87
        <select id="highlighting_select" onchange="highlighting_changed(this)">
 
88
          <option value="text">Text</option>
 
89
          <option value="python">Python</option>
 
90
          <option value="html">HTML</option>
 
91
          <option value="javascript">JavaScript</option>
 
92
          <option value="css">CSS</option>
 
93
        </select>
 
94
      </p>
 
95
    </div>
88
96
  </div>
89
97
  <!-- Body. The JavaScript places content here relevant to the path -->
90
98
  <div id="filesbody">