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