Nasty renaming.
[amuse-wiki:amuse-wiki.git] / AmuseWiki / views / layouts / main.tt
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5  <head>
6    <meta http-equiv="Content-type" content="application/xhtml+xml; charset=<% settings.charset %>" />
7    <link rel="stylesheet" media="all" href="<% request.uri_base %>/css/style.css" />
8    <!--[if lt IE 9]>
9     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
10    <![endif]-->
11    <meta name="viewport" content="width=device-width, initial-scale=1"/>
12    <link rel="alternate" type="application/rss+xml" title="The Anarchist Library" href="<% request.uri_base %>/rss.xml" />
13
14    <% IF wantseditor %>
15    <script type="text/javascript"
16            src="<% request.uri_base %>/js/jquery.js"></script>
17    <script type="text/javascript"
18            src="<% request.uri_base %>/js/markitup/jquery.markitup.js"></script>
19    <script type="text/javascript"
20            src="<% request.uri_base %>/js/markitup/sets/muse/set.js"></script>
21    <link rel="stylesheet" type="text/css" 
22          href="<% request.uri_base %>/js/markitup/skins/markitup/style.css" />
23    <link rel="stylesheet" type="text/css"
24          href="<% request.uri_base %>/js/markitup/sets/muse/style.css" />
25    <script type="text/javascript" >
26      $(document).ready(function() {
27      $("#maintextarea").markItUp(mySettings);
28      });
29    </script>
30    <% END %>
31
32    <%# title block %>
33    <title>
34      <%- USE HTML -%>
35      <%- IF pagename -%>
36        <%- IF pagename == "index" -%>
37        The Anarchist Library | An archive of anarchist literature
38        <%- ELSE -%>
39        <%- HTML.escape(pagename) FILTER ucfirst %> | The Anarchist Library
40        <%- END -%>
41      <%- ELSIF nav -%>
42        <% HTML.escape(nav) FILTER ucfirst %>
43        <%- IF nav == "search" -%>
44          | <% HTML.escape(params.query) -%>
45        <% END %>
46      <%- ELSIF (directives.title AND directives.author) -%>
47      «<% directives.title FILTER remove('<.+?>') %>»
48      by <% directives.author FILTER remove('<.+?>') -%>
49      <%- ELSE -%>
50      The Anarchist Library | An archive of anarchist literature
51      <%- END -%>
52    </title>
53  </head>
54  <body>
55    <% IF session.user %>
56    <div class="loggedin">
57      Logged is as “<% session.user %>”: 
58      <a href="/admin">Go to the queue manager</a> | <a href="/logout">Logout</a>
59    </div>
60    <% END %>
61     <div id="vwbanner">
62       <div id="wbanner">
63         <div id="banner">
64           <div id="searchbox">
65             <form id="formsearchbox" action="/search">
66               <p id="searchp">
67                 <input type="text" name="query" value="" size="12" /><br />
68                 <input type="submit" value="Full text search" /></p>
69             </form>
70           </div>
71           <div id="bannerimage">
72             <a title="The Anarchist Library" href="/">
73               <img 
74                  title="Beneath the Library the stones, beneath the stones the beach!"
75                  alt="The Anarchist Library" src="/images/titlebanner.png"
76                  id="title-banner-img" />
77             </a>
78           </div>
79         </div>
80         <div id="nav">
81           <ul>
82             <li><a href="/special/about" title="info and contacts">About</a></li>
83             <li><a href="/authors"
84                    <% IF nav == 'authors' %>id="current"<% END %>
85                 title="texts sorted by author">Authors</a></li>
86             <li><a href="/library"
87                    <% IF nav == 'titles' %>id="current"<% END %>
88                    title="texts sorted by title">Titles</a></li>
89             <li><a href="/topics"
90                    <% IF nav == 'topics' %>id="current"<% END %>
91                    title="texts sorted by topics">Topics</a></li>
92             <li><a href="/special/distro" 
93                    <% IF request.path  == "/specialdistro" %>
94                    id="current"
95                    <% END %>
96                    title="distribution">Distro</a></li>
97             <li>
98               <% IF directives.file %>
99               <a href="/library/<% directives.file %>?edit">
100                 Edit this text
101               </a>
102               <% IF session.user %>
103               <a href="/library/<%- directives.file -%>/history">History</a>
104               <% END %>
105               <% ELSE %>
106               <a href="/new"
107                    <% IF request.path  == "/new" %>
108                    id="current"
109                    <% END %>
110                    title="Add a new text to the library">
111                 Add to Library
112               </a>
113               <% END %>
114             </li>
115             <li>
116               <a href="http://bookshelf.theanarchistlibrary.org"
117                  title="general help, documentation, personal pages...">
118                 Wiki
119               </a>
120             </li>
121             <li>
122               <% IF directives.file %>
123               <a href="/bookbuilder?addme=<% directives.file %>">
124                  Add this text to your book
125               </a>
126               <% ELSE %>
127               <a href="/bookbuilder"
128                    <% IF request.path  == "/bookbuilder" %>
129                    id="current"
130                    <% END %>
131                    title="Create custom PDFs (almost) on the fly">
132                   Book builder
133               </a>
134               <% END %>
135             </li>
136           </ul>
137         </div>
138       </div>
139     </div>
140
141
142
143    <%# the flash message %>
144    <% IF flash.committed %>
145    <div class="flashmessage">
146      Thanks, <% flash.committed %> files committed;
147    </div>
148    <% END %>
149    <% IF flash.bookcreated %>
150    <div class="flashmessage">
151      Your book has been created and is waiting to be compiled. This
152      operation may take about 10 minutes. Please
153      visit <a href="/bookbuilder">this page to check the status</a>
154    </div>
155    <% ELSIF (session.latestbook && (request.path != '/bookbuilder')) %>
156    <div class="flashmessage">
157      You have a book waiting <a href="/bookbuilder">here</a>
158    </div>
159    <% END %>
160    <div id="page">
161      <% content %>
162    </div>
163    <div id="footer">
164      <a href="/rss.xml">
165        <img src="/images/feed-icon-28x28.png" alt="syndicate" id="rssicon" />
166        Syndicate
167      </a>
168    </div>
169  </body>
170  </html>