app/shell/templates/shell.html
changeset 2335 366e64ecba91
equal deleted inserted replaced
2334:6f5f6a9965c6 2335:366e64ecba91
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       
     2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
       
     3 <html>
       
     4 <head>
       
     5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
       
     6 <title> Interactive Shell </title>
       
     7 <script type="text/javascript" src="/static/shell.js"></script>
       
     8 <style type="text/css">
       
     9 body {
       
    10   font-family: monospace;
       
    11   font-size: 10pt;
       
    12 }
       
    13 
       
    14 p {
       
    15   margin: 0.5em;
       
    16 }
       
    17 
       
    18 .prompt, #output {
       
    19   width: 45em;
       
    20   border: 1px solid silver;
       
    21   background-color: #f5f5f5;
       
    22   font-size: 10pt;
       
    23   margin: 0.5em;
       
    24   padding: 0.5em;
       
    25   padding-right: 0em;
       
    26   overflow-x: hidden;
       
    27 }
       
    28 
       
    29 #toolbar {
       
    30   margin-left: 0.5em;
       
    31   padding-left: 0.5em;
       
    32 }
       
    33 
       
    34 #caret {
       
    35   width: 2.5em;
       
    36   margin-right: 0px;
       
    37   padding-right: 0px;
       
    38   border-right: 0px;
       
    39 }
       
    40 
       
    41 #statement {
       
    42   width: 43em;
       
    43   margin-left: -1em;
       
    44   padding-left: 0px;
       
    45   border-left: 0px;
       
    46   background-position: top right;
       
    47   background-repeat: no-repeat;
       
    48 }
       
    49 
       
    50 .processing {
       
    51   background-image: url("/static/spinner.gif");
       
    52 }
       
    53 
       
    54 #ajax-status {
       
    55   font-weight: bold;
       
    56 }
       
    57 
       
    58 .message {
       
    59   color: #8AD;
       
    60   font-weight: bold;
       
    61   font-style: italic;
       
    62 }
       
    63 
       
    64 .error {
       
    65   color: #F44;
       
    66 }
       
    67 
       
    68 .username {
       
    69   font-weight: bold;
       
    70 }
       
    71 
       
    72 </style>
       
    73 </head>
       
    74 
       
    75 <body>
       
    76 
       
    77 <p> Interactive server-side Python shell 
       
    78     (<a href="http://code.google.com/p/google-app-engine-samples/source/browse/#svn/trunk/shell">original source</a>)
       
    79 </p>
       
    80 <p>
       
    81     <a href="/">Return to main home</a>
       
    82 </p>
       
    83 
       
    84 <textarea id="output" rows="30" readonly="readonly">
       
    85 {{ server_software }}
       
    86 Python {{ python_version }}
       
    87 </textarea>
       
    88 
       
    89 <form id="form" action="/admin/shell/shell.do" method="get">
       
    90   <nobr>
       
    91   <textarea class="prompt" id="caret" readonly="readonly" rows="4"
       
    92             onfocus="document.getElementById('statement').focus()"
       
    93             >&gt;&gt;&gt;</textarea>
       
    94   <textarea class="prompt" name="statement" id="statement" rows="4"
       
    95             onkeypress="return shell.onPromptKeyPress(event);"></textarea>
       
    96   </nobr>
       
    97   <input type="hidden" name="session" value="{{ session }}" />
       
    98   <input type="submit" style="display: none" />
       
    99 </form>
       
   100 
       
   101 <p id="ajax-status"></p>
       
   102 
       
   103 <p id="toolbar">
       
   104 {% if user %}
       
   105   <span class="username">{{ user.nickname }}</span>
       
   106   (<a href="{{ logout_url }}">log out</a>)
       
   107 {% else %}
       
   108   <a href="{{ login_url }}">log in</a>
       
   109 {% endif %}
       
   110  | Shift-Up/Down for history |
       
   111 <select id="submit_key">
       
   112   <option value="enter">Enter</option>
       
   113   <option value="ctrl-enter" selected="selected">Ctrl-Enter</option>
       
   114 </select>
       
   115 <label for="submit_key">submits</label>
       
   116 </p>
       
   117 
       
   118 <script type="text/javascript">
       
   119 document.getElementById('statement').focus();
       
   120 </script>
       
   121 
       
   122 </body>
       
   123 </html>
       
   124