Added the jquery adapter for ckeditor (not sure if needed)
[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    <% ELSIF wantsck %>
31    <script type="text/javascript"
32            src="<% request.uri_base %>/js/jquery.js"></script>
33    <link rel="stylesheet" type="text/css"
34          href="<% request.uri_base %>/css/smoothness/jquery-ui-1.8.18.custom.css" />
35    <script type="text/javascript"
36            src="<% request.uri_base %>/js/jquery-ui-1.8.18.custom.min.js">
37    </script>
38    <script type="text/javascript"
39            src="<% request.uri_base %>/js/ckeditor/ckeditor.js">
40    </script>
41    <script type="text/javascript"
42            src="/js/ckeditor/adapters/jquery.js">
43    </script>
44    <% ELSIF wantsjquery %>
45    <script type="text/javascript"
46            src="<% request.uri_base %>/js/jquery.js"></script>
47    <% END %>
48
49
50    <%# title block %>
51    <title>
52      <%- USE HTML -%>
53      <%- IF pagename -%>
54        <%- IF pagename == "index" -%>
55        The Anarchist Library | An archive of anarchist literature
56        <%- ELSE -%>
57        <%- HTML.escape(pagename) FILTER ucfirst %> | The Anarchist Library
58        <%- END -%>
59      <%- ELSIF nav -%>
60        <% HTML.escape(nav) FILTER ucfirst %>
61        <%- IF nav == "search" -%>
62          | <% HTML.escape(params.query) -%>
63        <% END %>
64      <%- ELSIF (directives.title AND directives.author) -%>
65      «<% directives.title FILTER remove('<.+?>') %>»
66      by <% directives.author FILTER remove('<.+?>') -%>
67      <%- ELSE -%>
68      The Anarchist Library | An archive of anarchist literature
69      <%- END -%>
70    </title>
71  </head>
72  <body>
73    <% IF session.user %>
74    <div class="loggedin">
75      Logged is as “<% session.user %>”: 
76      <a href="/admin">Go to the queue manager</a> | <a href="/logout">Logout</a>
77    </div>
78    <% END %>
79     <div id="vwbanner">
80       <div id="wbanner">
81         <div id="banner">
82           <div id="searchbox">
83             <form id="formsearchbox" action="/search">
84               <p id="searchp">
85                 <input type="text" name="query" value="" size="12" /><br />
86                 <input type="submit" value="Full text search" /></p>
87             </form>
88           </div>
89           <div id="bannerimage">
90             <a title="The Anarchist Library" href="/">
91               <img 
92                  title="Beneath the Library the stones, beneath the stones the beach!"
93                  alt="The Anarchist Library" src="/images/titlebanner.png"
94                  id="title-banner-img" />
95             </a>
96           </div>
97         </div>
98         <div id="nav">
99           <ul>
100             <li><a href="/special/about" title="info and contacts">About</a></li>
101             <li><a href="/authors"
102                    <% IF nav == 'authors' %>id="current"<% END %>
103                 title="texts sorted by author">Authors</a></li>
104             <li><a href="/library"
105                    <% IF nav == 'titles' %>id="current"<% END %>
106                    title="texts sorted by title">Titles</a></li>
107             <li><a href="/topics"
108                    <% IF nav == 'topics' %>id="current"<% END %>
109                    title="texts sorted by topics">Topics</a></li>
110             <li><a href="/special/distro" 
111                    <% IF request.path  == "/specialdistro" %>
112                    id="current"
113                    <% END %>
114                    title="distribution">Distro</a></li>
115             <li>
116               <% IF directives.file %>
117               <a href="/library/<% directives.file %>?edit">
118                 Edit this text
119               </a>
120               <% IF session.user %>
121               <a href="/library/<%- directives.file -%>/history">History</a>
122               <% END %>
123               <% ELSE %>
124               <a href="/new"
125                    <% IF request.path  == "/new" %>
126                    id="current"
127                    <% END %>
128                    title="Add a new text to the library">
129                 Add to Library
130               </a>
131               <% END %>
132             </li>
133             <li>
134               <a href="http://bookshelf.theanarchistlibrary.org"
135                  title="general help, documentation, personal pages...">
136                 Wiki
137               </a>
138             </li>
139             <li>
140               <% IF directives.file %>
141               <a href="/bookbuilder?addme=<% directives.file %>">
142                  Add this text to your book
143               </a>
144               <% ELSE %>
145               <a href="/bookbuilder"
146                    <% IF request.path  == "/bookbuilder" %>
147                    id="current"
148                    <% END %>
149                    title="Create custom PDFs (almost) on the fly">
150                   Book builder
151               </a>
152               <% END %>
153             </li>
154           </ul>
155         </div>
156       </div>
157     </div>
158
159
160
161    <%# the flash message %>
162    <% IF flash.committed %>
163    <div class="flashmessage">
164      Thanks, <% flash.committed %> files committed;
165    </div>
166    <% END %>
167    <% IF flash.bookcreated %>
168    <div class="flashmessage">
169      Your book has been created and is waiting to be compiled. This
170      operation may take about 10 minutes. Please
171      visit <a href="/bookbuilder">this page to check the status</a>
172    </div>
173    <% ELSIF (session.latestbook && (request.path != '/bookbuilder')) %>
174    <div class="flashmessage">
175      You have a book waiting <a href="/bookbuilder">here</a>
176    </div>
177    <% END %>
178    <div id="page">
179      <% content %>
180    </div>
181    <div id="footer">
182      <a href="/rss.xml">
183        <img src="/images/feed-icon-28x28.png" alt="syndicate" id="rssicon" />
184        Syndicate
185      </a>
186    </div>
187  </body>
188  </html>