Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BK-702 Make current editing templates more modular

  • Loading branch information...
commit d7ed2c553688ba42700b5f8645a2ff3e3d45c17c 1 parent 71da260
@aerkalov aerkalov authored
Showing with 957 additions and 952 deletions.
  1. +10 −765 lib/booki/editor/templates/editor/edit_book.html
  2. +75 −0 lib/booki/editor/templates/editor/edit_content.html
  3. +48 −0 lib/booki/editor/templates/editor/edit_header.html
  4. +15 −0 lib/booki/editor/templates/editor/edit_sidebar.html
  5. +217 −0 lib/booki/editor/templates/editor/edit_templates.html
  6. +17 −0 lib/booki/editor/templates/editor/tab_attachments.html
  7. +209 −0 lib/booki/editor/templates/editor/tab_chapters.html
  8. 0  lib/booki/editor/templates/editor/{cover_manager.html → tab_cover.html}
  9. +8 −0 lib/booki/editor/templates/editor/tab_history.html
  10. +12 −0 lib/booki/editor/templates/editor/tab_notes.html
  11. +8 −0 lib/booki/editor/templates/editor/tab_publish.html
  12. +128 −0 lib/booki/editor/templates/editor/tab_settings.html
  13. +38 −0 lib/booki/editor/templates/editor/tab_version.html
  14. +49 −183 lib/booki/portal/templates/base.html
  15. +14 −0 lib/booki/portal/templates/booktype_extra.html
  16. +36 −0 lib/booki/portal/templates/booktype_head.html
  17. +56 −0 lib/booki/portal/templates/booktype_language.html
  18. +16 −0 lib/booki/portal/templates/booktype_strings.html
  19. +1 −4 lib/booki/site_static/js/editor.js
View
775 lib/booki/editor/templates/editor/edit_book.html
@@ -2,777 +2,22 @@
{% load i18n %}
{% block header %}
-<link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/css/editor.css" rel="Stylesheet" />
-<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/editor.js"></script>
-<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.url.js"></script>
-<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.validate.js"></script>
-<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.form.js"></script>
-<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.form.wizard.js"></script>
-<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/bbq.js"></script>
-<script type="text/javascript">
- $(function() {
- /* booki part */
- /* this is temporary here */
+ {% include "editor/edit_header.html" %}
+ {% include "editor/edit_init.html" %}
- // probably should urlencode them
- $.booki.username = "{{request.user.username|escapejs}}";
- $.booki.currentBookID = {{book.id}};
- $.booki.currentBook = "{{book.title|escapejs}}";
- $.booki.currentBookURL = "{{book.url_title|escapejs}}";
-
- $.booki.currentVersion = "{{book_version|escapejs}}";
- $.booki.sputnikDispatcherURL = "{% url sputnik.views.dispatcher %}";
- $.booki.bookViewUrlTemplate = "{% url book_view 'XXX' %}";
- $.booki.bookDraftViewUrlTemplate = "{% url draft_book 'XXX' %}";
-
- $.booki.profileThumbnailViewUrlTemplate = "{% url view_profilethumbnail 'XXX' %}";
-
- /* call when page is loaded */
-
- $.booki.editor.initEditor();
-
- /* temporarily comment search button
- $("#searchbox BUTTON").button(); */
-
- $.booki.subscribeToChannel("/booki/", function(message) {
-
- });
-
-
- // start Sputnik
- jQuery.booki.network._transport.connect();
- });
-
-
-function closeAttachmentUpload() {
- $("#insertattachment .listing").css("display", "block");
- $.booki.editor.reloadAttachments(function() { $.booki.editor.upload.redrawFiles(); });
-}
-
-
- </script>
-{% include "editor/edit_init.html" %}
-<style>
-
-.ui-button .ui-button-text { display: block; line-height: 0.6; }
-
-.ui-button-text-only .ui-button-text { padding: 0.05em 0.05em; }
-
-
-</style>
+ <style>
+ .ui-button .ui-button-text { display: block; line-height: 0.6; }
+ .ui-button-text-only .ui-button-text { padding: 0.05em 0.05em; }
+ </style>
{% endblock %}
{% block sidebar %}
-
-<!-- chat box + drop shadow -->
-<div class="block shadow"> <span class="arrow-down"></span>
- <h4 id="chattitle">{% trans "Chat" %}</h4>
- <div id="chat"></div>
-</div>
-<div class="block shadow"> <span class="arrow-down"></span>
- <h4>{% trans "Currently editing" %}</h4>
- <ul id="users">
- </ul>
-</div>
-<!-- end of chat box + drop shadow -->
-
+ {% include "editor/edit_sidebar.html" %}
{% endblock %}
{% block content %}
-<div id="notify" class="alert-box info"> some notification. this should be on top of visible page and not top of page. </div>
-
-<!--
-temporarily comment search box
-<div id="searchbox" style="float: right; padding-top: 5px">
-<form>
-<input type="text" size="20"> <button>{% trans "Search" %}</button>
-</form>
-</div>
--->
-
-<h2><a href="{% url book_info book.url_title %}">{{ book }}</a> </h2>
-<div id="tabs">
- <ul>
- {% if "chapters" in tabs %}
- <li><a href="#tabchapters">{% trans "Chapters" %}</a></li>
- {% endif %}
-
- {% if "attachments" in tabs %}
- <li><a href="#tabattachments">{% trans "Images and Files" %}</a></li>
- {% endif %}
-
- {% if "covers" in tabs %}
- <li><a href="#tabcovers">{% trans "Cover Manager" %}</a></li>
- {% endif %}
-
-
- {% if "history" in tabs %}
- <li><a href="#tabhistory">{% trans "History" %}</a></li>
- {% endif %}
-
- {% if "versions" in tabs %}
- <li><a href="#tabversions">{% trans "Versions" %}</a></li>
- {% endif %}
-
- {% if "notes" in tabs %}
- <li><a href="#tabnotes">{% trans "Notes" %}</a></li>
- {% endif %}
-
- {% if "settings" in tabs %}
- <li><a href="#tabsettings">{% trans "Settings" %}</a></li>
- {% endif %}
-
-
- {% if "export" in tabs %}
- <li><a href="#tabpublish">{% trans "Publish" %}</a></li>
- {% endif %}
- </ul>
- {% if "chapters" in tabs %}
- <div id="tabchapters">
- <!-- START Chapters TAB -->
-
- <table border="0" width="100%">
- <tr>
- <td valign="top"><div id="container"> {% if not is_browser_supported %}
- <div style="border-top: 2px solid red; border-bottom: 2px solid red; padding: 5px;"> {% trans "We are very sorry, but we are not fully compatible with your browser. We are working hard to fix this problem. Until we fix this, you can try to use this site with Firefox, Chrome, Safari, Opera or some other compatible browser. Thank you for your understanding." %} </div>
- {% endif %}
- <h3>{% trans "Table of contents" %}</h3>
- <div id="chapteraction"> <a href="javascript:void(0)" onclick='$("#newchapter").dialog("open")'>{% trans "NEW CHAPTER" %}</a><a href="javascript:void(0)" onclick='$("#newsection").dialog("open")'>{% trans "NEW SECTION" %}</a><a href="javascript:void(0)" onclick='$("#clonechapter").dialog("open")'>{% trans "IMPORT CHAPTER" %}</a> </div>
- <div id="edit-info" class="alert-box info template" style="margin-bottom:10px;">{% blocktrans %}All books should contain at least one section and can have as many chapters as you like.{% endblocktrans %}</div>
-
- <ul id="chapterslist" class="connectedSortable">
- </ul>
-
- <div id="chapteraction"> <a href="javascript:void(0)" onclick='$("#newchapter").dialog("open")'>{% trans "NEW CHAPTER" %}</a><a href="javascript:void(0)" onclick='$("#newsection").dialog("open")'>{% trans "NEW SECTION" %}</a><a href="javascript:void(0)" onclick='$("#clonechapter").dialog("open")'>{% trans "IMPORT CHAPTER" %}</a> </div>
- <div id="newdiff" title="Chapter diff">
- <div class="diffcontent"> </div>
- </div>
- <div id="newchapter" title="{% trans "New chapter" %}">
- <!-- <p id="validateTips">Enter new chapter name.</p> -->
- <form onsubmit="javascript:return false">
- <fieldset>
- <input type="text" class="text ui-widget-content ui-corner-all">
- </fieldset>
- </form>
- </div>
- <div id="clonechapter" title="{% trans "Clone chapter" %}">
- <!-- <p id="validateTips">Enter new chapter name.</p> -->
- <form onsubmit="javascript:return false">
- <fieldset>
- <input name="book" type="text" class="text ui-widget-content ui-corner-all">
- <br />
- <input name="chapter" type="text" class="text ui-widget-content ui-corner-all">
- <br />
- {% trans "New title (optional)" %}:<br />
- <input name="rename_title" type="text" class="text ui-widget-content ui-corner-all">
- </fieldset>
- </form>
- </div>
- <div id="newsection" title="{% trans "New section" %}">
- <!-- <p id="validateTips">Enter new section name.</p> -->
- <form onsubmit="return false">
- <fieldset>
- <input type="text" class="text ui-widget-content ui-corner-all">
- </fieldset>
- </form>
- </div>
-
- <!-- open attachment dialog -->
- <div id="insertattachment" title="{% trans "Insert image" %}">
- <div id="inserttabs">
- <ul>
- <li><a href="#insertimages">{% trans "Images" %}</a></li>
- <li><a href="#insertupload">{% trans "Upload image" %}</a></li>
- </ul>
- <div id="insertimages">
- <div class="listing">
- <table border="0" width="100%">
- <tr>
- <td valign="top"><div style="height: 250px; overflow: auto">
- <table border="0" width="90%" class="files">
- </table>
- </div></td>
- <td width="160" valign="top"><fieldset style="padding: 2px">
- <legend>{% trans "Preview" %}</legend>
- <div class="previewattachment"> </div>
- </fieldset></td>
- </tr>
- </table>
- </div>
- </div>
- <div id="insertupload">
- <div class="uploadform">
- <form method="POST" target="frameupload" action="../_upload/" enctype="multipart/form-data">
- <div class="uploadattachment" style="overflow: auto;"> </div>
- <div class="uploadsubmit"> </div>
- </form>
- <iframe width="0" height="0" name="frameupload" border="0" style="border: 0px"></iframe>
- </div>
- </div>
- </div>
- </div>
-
- <!-- close attachment dialog -->
-
- <!-- start of edit attachment -->
- <div id="editattachment" title="{% trans "Edit Image" %}">
- <div class="container">
- <fieldset style="float: right; width: 160px; height: 160px; border: 1px solid gray; margin-left: 10px;">
- <legend>{% trans "Preview" %}</legend>
- <span class="preview"></span>
- </fieldset>
- <fieldset>
- <legend>{% trans "Image" %}</legend>
- <table border="0">
- <tr>
- <td>{% trans "Image:" %}</td>
- <td><input type="text" name="f_image" size="40"></td>
- </tr>
- <tr>
- <td>{% trans "Alt:" %}</td>
- <td><input type="text" name="f_alt" size="40"></td>
- </tr>
- </table>
- </fieldset>
- <fieldset>
- <legend>{% trans "Positioning" %}</legend>
- <table border="0">
- <tr>
- <td>{% trans "Border:" %}</td>
- <td><input type="text" name="f_border"></td>
- </tr>
- <tr>
- <td>{% trans "Align:" %}</td>
- <td><input type="text" name="f_align"></td>
- </tr>
- <tr>
- <td>{% trans "Width:" %}</td>
- <td><input type="text" name="f_width"></td>
- </tr>
- <tr>
- <td>{% trans "Height:" %}</td>
- <td><input type="text" name="f_height"></td>
- </tr>
- </table>
- </fieldset>
- <fieldset>
- <legend>{% trans "Style" %}</legend>
- <table border="0" width="100%">
- <tr>
- <td>{% trans "CSS Class:" %}</td>
- <td><input type="text" name="f_css"></td>
- <td colspan="2">
- </tr>
- <tr>
- <td>{% trans "Padding:" %}</td>
- <td><input type="text" name="f_padding"></td>
- <td>{% trans "Margin:" %}</td>
- <td><input type="text" name="f_margin"></td>
- </tr>
- <tr>
- <td>{% trans "Background color:" %}</td>
- <td><input type="text" name="f_bgcolor"></td>
- <td>{% trans "Border color:" %}</td>
- <td><input type="text" name="f_bordercolor"></td>
- </tr>
- </table>
- </fieldset>
- </div>
- </div>
- <!-- end of edit attachment -->
-
- <div class="middleinfo"> </div>
- <h3>{% trans "Hold chapters" %}</h3>
- <ul id="holdchapterslist" class="connectedSortable">
- </ul>
- </div>
- <div id="editorcontainer"> </div>
- <div id="editor" class="template">
- <form method="GET" action="javascript: return void(0)">
- <h3 class="title"></h3>
- <div class="chapteredit">
- <input type="hidden" name="chapter_id" value=""/>
- <a name="save" href="javascript:void(0)">{% trans "Save" %}</a> <a name="savecontinue" href="javascript:void(0)">{% trans "Save and continue editing" %}</a> <a name="view" href="javascript:void(0)">{% trans "View chapter" %}</a> <a name="cancel" href="javascript:void(0)">{% trans "Cancel" %}</a> </div>
- <textarea name="myTextArea" id="myTextArea" style="width: 100%; height: 600px">
- </textarea>
- <fieldset class="plain author-comments">
- <dl>
- <dt>
- <label>
- <input type="checkbox" name="minor">
- {% trans "Minor change, don't notify." %}</label>
- </dt>
- <dd>
- <input type="text" name="comment">
- </dd>
- <dt>
- <label>{% trans "Author:" %}</label>
- </dt>
- <dd>
- <input type="text" name="author">
- </dd>
- <dt>
- <label>{% trans "Author comment:" %}</label>
- </dt>
- <dd>
- <input type="text" name="authorcomment">
- </dd>
- </dl>
- </fieldset>
- </form>
- </div>
- <div id="spalatodialog" title="Split chapters">
- <p id="validateTips">{% trans "Seems like You have changed the structure of the chapters. What do you want to do?" %}</p>
- <table border="0" width="100%">
- <tr>
- <td valign="top" width="200"> {% trans "New chapters:" %}
- <ul class="chapters" style="margin-left: 5px">
- </ul></td>
- <td width="1" bgcolor="#c0c0c0"></td>
- <td valign="top" class="content"></td>
- </tr>
- </table>
- </div></td>
- </tr>
- </table>
- </div>
- {% endif %}
-
- {% if "attachments" in tabs %}
- <div id="tabattachments">
- <h3>{% trans "Images and Files" %}</h3>
- <p>{% blocktrans %}All images added to your book are listed here as well as any additional files you have uploaded.{% endblocktrans %}</p>
- <div id="attachmentscontainer"> </div>
- <div style="margin: 0px 0 20px;"> <a name="delete" href="javascript:void(0)">{% trans "Deleted selected items" %}</a> </div>
- <h3>{% trans "Upload a new image or file" %}</h3>
- <form method="POST" target="frameupload2" action="../_upload/" enctype="multipart/form-data">
- <input type="file" name="entry0">
- <input type="hidden" name="attachmenttab" value="1"/>
- <input type="submit" value="{% trans "Upload" %}" />
- </form>
- <iframe width="0" height="0" name="frameupload2" border="0" style="border: 0px"></iframe>
- <div class="dialogs"></div>
- </div>
- {% endif %}
-
- {% if "covers" in tabs %}
- {% include "editor/cover_manager.html" %}
- {% endif %}
-
- {% if "history" in tabs %}
- <div id="tabhistory">
- <h3>{% trans "History" %}</h3>
- <p class="version"> {% blocktrans %}Here you can follow the edit history of your book.{% endblocktrans %} </p>
- <!-- START history TAB -->
- <div id="historycontainer"></div>
- </div>
- {% endif %}
-
- {% if "versions" in tabs %}
- <div id="tabversions">
- <h3>{% trans "Versions" %}</h3>
- {% if security.isAdmin or is_owner %}
- <p class="version"> {% blocktrans %}With different versions you can easily organise your book. But be careful! Other users will not be able to edit
- and work on previous versions once you create new one. Create new <i>major</i> version if you plan to make a lot of changes, and <i>minor</i> version if you plan to make just a few of them.{% endblocktrans %} </p>
- <p class="version"> <a class="major" href="javascript:void(0)">{% trans "Create major version" %}</a> <a class="minor" href="javascript:void(0)">{% trans "Create minor version" %}</a> </p>
- <div id="newversionmajor" title="{% trans "New version" %}">
- <form onsubmit="javascript:return false">
- <!-- <fieldset> -->
- {% trans "You can name this version (optional):" %}
- <input type="text" style="width: 100%" class="text ui-widget-content ui-corner-all">
- <br/>
- <i>{% trans "e.g. initial, dragon, test" %}</i><br/>
- <br/>
- {% trans "Description (optional)" %}<br/>
- <textarea style="width: 100%; height: 150px"></textarea>
- <!-- </fieldset> -->
- </form>
- </div>
- <div id="newversionminor" title="{% trans "New version" %}">
- <form onsubmit="javascript:return false">
- <!-- <fieldset> -->
- {% trans "You can name this version (optional):" %}
- <input type="text" style="width: 100%" class="text ui-widget-content ui-corner-all">
- <br/>
- <i>{% trans "e.g. initial, dragon, test" %}</i><br/>
- <br/>
- {% trans "Description (optional)" %}<br/>
- <textarea style="width: 100%; height: 150px"></textarea>
- <!-- </fieldset> -->
- </form>
- </div>
- {% endif %}
- <h3>{% trans "All versions" %}</h3>
- <div class="list list-container"></div>
- </div>
- {% endif %}
-
- {% if "export" in tabs %}
- <div id="tabpublish">
- <!-- START publish TAB -->
- <h3>{% trans "Publish" %}</h3>
- <p></p>
-
- {% include "editor/edit_publish.html" %}
- {% endif %}
-
- {% if "settings" in tabs %}
- <div id="tabsettings">
- <h3>{% trans "Settings" %}</h3>
- <p>{% blocktrans %}Manage the settings of your book.{% endblocktrans %}</p>
- <!-- START settings TAB -->
-
- <form name="formlanguages" action="javascript:void(0)" onsubmit="return false;">
- <fieldset>
- <legend>{% trans "Language" %}</legend>
- <dl>
- <dt>
- <label>{% trans "This book is written in: " %}</label>
- </dt>
- <dd>
- <select name="lang">
- </select>
- <a name="language">{% trans "Set new language" %}</a></dd>
- <dd>
- <label>
- <input type="checkbox" name="rtl">
- {% trans "Right to left text" %}</label>
- </dd>
- </dl>
- </fieldset>
- </form>
- <form name="formlicences" action="javascript:void(0)" onsubmit="return false;">
- <fieldset>
- <legend>{% trans "License" %}</legend>
- <dl>
- <dt>
- <label>{% trans "This book is licensed with:" %}</label>
- </dt>
- <dd>
- <select name="licen">
- </select>
- <a name="license">{% trans "Set new license" %}</a></dd>
- <dd></dd>
- <dd><a name="readlicense" href="javascript:void(0)">{% trans "Read full text of the license" %}</a></dd>
- <dd><a name="attribution">{% trans "Manage copyright attribution" %}</a></dd>
- </dl>
- </fieldset>
- </form>
- <div class="copyrightAttribution template" title="{% trans "Manage Copyright Attribution" %}">
- <p>{% blocktrans %}If you want to exclude some people from the copyright attribution...{% endblocktrans %}</p>
- <form onsubmit="return false" action="javascript:void(0)">
- <table border="0" width="100%">
- <tr>
- <td><b>{% trans "Contributors" %}</b></td>
- <td>&nbsp;</td>
- <td><b>{% trans "Excluded contributors" %}</b></td>
- </tr>
- <tr>
- <td width="40%" valign="top"><select size="10" style="width: 100%; height: 90%" name="available">
- </select></td>
- <td width="10%" valign="center" align="center"><a class="button" name="add">&gt;&gt;</a><br>
- <br>
- <a class="button" name="remove">&lt;&lt;</a></td>
- <td width="40%" valign="top"><select size="10" style="width: 100%; height: 90%" name="excluded">
- </select></td>
- </tr>
- </table>
- </form>
- </div>
- <fieldset>
- <legend>{% trans "Roles" %}</legend>
- <dl>
- <dt style="display:none;"></dt>
- <dd><a name="roles">{% trans "Manage roles" %}</a></dd>
- </dl>
- </fieldset>
- <div class="rolesDialog template" title="{% trans "Manage Roles" %}">
- <form onsubmit="return false" action="javascript:void(0)">
- <dl>
- <dt>
- <label>{% trans "Role" %}:</label>
- </dt>
- <dd>
- <select style="width: 99%" name="listroles">
- <option value="0" selected="selected">{% trans "Select role" %}</option>
- <option value="1">{% trans "Administrator" %}</option>
- <option value="2">{% trans "Editor" %}</option>
- </select>
- </dd>
- <dt>
- <label>{% trans "New user:" %}</label>
- </dt>
- <dd>
- <input type="text" name="newuser" style="width: 400px; margin-right:10px;">
- <a name="adduser" style="width:70px;">{% trans "Add" %}</a></dd>
- <dt>
- <label>{% trans "Role:" %}</label>
- </dt>
- <dd>
- <select size="10" style="width: 400px; float:left; margin-right:10px;" name="users">
- </select>
- <a name="removeuser" style="width:70px;">{% trans "Remove" %}</a></dd>
- </dl>
- </form>
- </div>
- <fieldset>
- <legend>{% trans "Chapter status" %}</legend>
- <dl>
- <dt>
- <p>{% trans "Available statuses:" %} <span class="currentstatuses"></span></p>
- </dt>
- <dd><a name="chapterstatus">{% trans "Manage chapter status" %}</a></dd>
- </dl>
- </fieldset>
- <form onsubmit="return false;">
- <fieldset>
- <legend>{% trans "Permissions and visibility" %}</legend>
- <dl>
- <dt>
- <label>{% trans "This book can be edited by:" %}</label>
- </dt>
- <dd>
- <select name="permissions">
- <option value="0">{% trans "anyone" %}</option>
- <option value="1">{% trans "book owner" %}</option>
- <option value="2">{% trans "admins" %}</option>
- <option value="3">{% trans "admins and editors" %}</option>
- </select>
- <a name="permissionbutton">{% trans "Set permissions" %}</a> </dd>
- </dl>
- </fieldset>
- </form>
- <div class="info"> </div>
- </div>
- {% endif %}
-
-
- {% if "notes" in tabs %}
- <div id="tabnotes">
- <h3>{% trans "Notes" %}</h3>
- <!-- START notes TAB -->
- <p> {% trans "Shared notes for this book" %} </p>
- <form onsubmit="return false;" action="" method="">
- <textarea border="0" name="notes" class="notes" rows="20" cols="65" style="width:100%; margin-bottom:12px;"></textarea>
- <button>{% trans "Save the notes" %}</button>
- </form>
- <div class="info"> </div>
- </div>
- {% endif %} </div>
-<p class="joinMsg template">{% blocktrans %}<span class="icon">JOINED</span> <span class="notice">notice</span>{% endblocktrans %}</p>
-<p class="infoMsg template">{% blocktrans %}<span class="info">INFO</span> <span class="notice">notice</span>{% endblocktrans %}</p>
-<table class="historyTable template" width="100%">
- <tr>
- <th>{% trans "action" %}</th>
- <th></th>
- <th>{% trans "user" %}</th>
- <th>{% trans "time" %}</th>
- </tr>
-</table>
-<table class="template">
- <tr class="rowCreateRename template">
- <td class="entryKind" valign="top">entry.kind</td>
- <td valign="top"><a class="setChapterLink entryChapter" style="text-decoration: underline" href="javascript:void(0)">entry.chapter</a></td>
- <td class="entryUser" valign="top">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowSave template">
- <td class="entryKind" valign="top">entry.kind</td>
- <td valign="top"><a class="setChapterLink entryChapter" style="text-decoration: underline" href="javascript:void(0)">entry.chapter</a></td>
- <td class="entryUser" valign="top">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowVersion template">
- <td>{% trans "New version" %}</td>
- <td>{% blocktrans %}Switched to <span class="entryVersion">entry.version.version</span>{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowAttachment template">
- <td>{% trans "Upload" %}</td>
- <td valign="top">{% blocktrans %}Uploaded <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowCoverUpload template">
- <td>{% trans "Upload cover" %}</td>
- <td valign="top">{% blocktrans %}Uploaded <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowCoverDelete template">
- <td>{% trans "Delete cover" %}</td>
- <td valign="top">{% blocktrans %}Deleted <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowCoverUpdate template">
- <td>{% trans "Modify cover" %}</td>
- <td valign="top">{% blocktrans %}Modified <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowClone template">
- <td>{% trans "Imported chapter" %}</td>
- <td valign="top"><a class="setChapterLink entryChapter" style="text-decoration: underline" href="javascript:void(0)">entry.chapter</a></td>
- <td class="entryUser" valign="top">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowAttachmentDelete template">
- <td>{% trans "Delete" %}</td>
- <td valign="top">{% blocktrans %}Deleted <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowChapterDelete template">
- <td>{% trans "Delete chapter" %}</td>
- <td valign="top">{% blocktrans %}Deleted <span class="entryFilename"></span>.{% endblocktrans %}</td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
- <tr class="rowGeneric template">
- <td class="entryKind">entry.kind</td>
- <td></td>
- <td class="entryUser">entry.user</td>
- <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
- <td></td>
- </tr>
-</table>
-<ul class="eventKind template">
- <li id="unknown">{% trans "Unknown" %}</li>
- <li id="create">{% trans "Create" %}</li>
- <li id="save">{% trans "Save" %}</li>
- <li id="rename">{% trans "Rename" %}</li>
- <li id="reorder">{% trans "Reorder" %}</li>
- <li id="split">{% trans "Split" %}</li>
- <li id="section_create">{% trans "Section create" %}</li>
- <li id="book_create">{% trans "Book create" %}</li>
- <li id="minor">{% trans "Minor" %}</li>
- <li id="major">{% trans "Major" %}</li>
- <li id="attachment">{% trans "Attachment" %}</li>
-</ul>
-<ul class="bookStatuses template">
- {% for s0, s1 in statuses %}
- <li id="{{s0}}">{% trans s1 %}</li>
- {% endfor %}
-</ul>
-{% include "editor/edit_strings.html" %}
-<ul class="template">
-<li class="sectionLine template ui-state-default"><span class="drag-handle"></span>
- <div class="cont">
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td width="70%"><div class="title">name</div></td>
- <td width="15%">
- <td width="15%"><div class="extra"></div></td>
- </tr>
- </table>
- </div>
-</li>
-<li class="chapterLine template ui-state-default"><span class="drag-handle"></span>
- <div class="cont">
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td><div class="title">name</div></td>
- <td width="20%" class="edit"><div class="chapterLinks"><a class="editLink" href="javascript:void(0)">{% trans "EDIT" %}</a> <a class="viewLink" href="javascript:void(0)">{% trans "VIEW" %}</a> <a class="deletechapter" href="javascript:void(0)"><span class="ui-icon ui-icon-trash"></span></a></div>
- <div class="lock"><a name="unlockLink" class="lockUser" style="color: white" href="javascript:void(0)">v</a></div></td>
- <td width="15%"><div class="status"><a class="statusLink statusName" href="javascript:void(0)">status</a></div>
- <div class="extra"></div></td>
- </tr>
- </table>
- </div>
-</li>
-</ul>
-<div class="historyDisplay template"> <a href="javascript:void(0)" class="backLink">&lt;&lt; {% trans "back to history index" %}</a> &nbsp;&nbsp;&nbsp; <a class="button compareLink" href="javascript:void(0)">{% trans "Compare revisions" %}</a> &nbsp;&nbsp;&nbsp;
- <h3 class="chapterName">chapterName</h3>
- <table class="chapterHistoryTable" width="100%">
- <tr>
- <th>{% trans "compare" %}</th>
- <th>{% trans "revision" %}</th>
- <th>{% trans "user" %}</th>
- <th>{% trans "time" %}</th>
- <th>{% trans "comment" %}</th>
- </tr>
- </table>
-</div>
-<table class="attachmentsTable template" border="0" width="100%">
- <tr>
- <td width="30"></td>
- <td><b>{% trans "name" %}</b></td>
- <td><b>{% trans "dimension" %}</b></td>
- <td><b>{% trans "size" %}</b></td>
- <td><b>{% trans "created" %}</b></td>
- </tr>
-</table>
-<div class="revisionDisplay template"> <a class="backLink" href="javascript:void(0)">&lt;&lt; {% trans "back to chapter history" %}</a> <span class="buttonset" style="padding-left: 10px">
- <input checked="checked" type="radio" id="radio1" name="radio" />
- <label for="radio1">{% trans "Normal view" %}</label>
- <input type="radio" id="radio2" name="radio" />
- <label for="radio2">{% trans "Source view" %}</label>
- </span> <a class="revertLink button" href="javascript:void(0)">{% trans "Revert to this revision" %}</a>
- <p class="err-no-revision">{% trans "No such revision." %}</p>
- <div class="revision-info">
- <h3 class="chapterName">chapterName</h3>
- <p>{% trans "User:" %} <span class="dataUser">data.user</span><br/>
- {% trans "Modified:" %} <span class="dataModified">data.modified</span><br/>
- {% trans "Version:" %} <span class="dataVersion">data.version</span><br/>
- {% trans "Revision:" %} <span class="dataRevision">data.revision</span><br/>
- <span class="revisionComment">{% trans "Comment" %}: <span class="dataComment">data.comment</span><br/>
- </span> </p>
- <span class="cont"></span> <span class="previousLinkDisplay"><a class="previousLink" href="javascript:void(0)">&lt;&lt; {% trans "previous" %}</a>&nbsp;&nbsp;&nbsp;</span> <a class="nextLink" href="javascript:void(0)">{% trans "next" %} &gt;&gt;</a> <br/>
- <br/>
- <div id="chapterrevision" class="dataContent" style="padding: 5px; border: 1px solid black; background-color: #f0f0f0"></div>
- </div>
-</div>
-<div class="diffDisplay template"> <a class="backLink" href="javascript:void(0)">&lt;&lt; {% trans "back to chapter history" %}</a> <a href="javascript:void(0)" name="side">{% trans "Show side by side" %}</a>
- <h3>{% blocktrans %}Compare revision <span class="revision1Name">revision1</span> with revision <span class="revision2Name">revision2</span>{% endblocktrans %}</h3>
- <div id="chapterdigg" class="dataOutput" style="padding: 5px; border: 1px solid black; background-color: #f0f0f0; font-size: 8pt"></div>
- <!-- <pre id="chapterdigg" class="dataOutput" style="padding: 5px; border: 1px solid black; background-color: #f0f0f0; font-size: 8pt"></pre> -->
-</div>
-<div class="statusChapterDialog template" title="{% trans "Chapter status" %}">
- <p>{% trans "Select new chapter status:" %}</p>
- <form>
- <ul style="padding-left: 10px">
- </ul>
- </form>
-</div>
-<style>
- #sortablestatus { list-style-type: none; margin: 0; padding: 0; }
- #sortablestatus li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
- #asortablestatus li span { margin-left: -1.3em; }
- #sortablestatus .ajkon { position: absolute; margin-left: -1.3em; }
-
-</style>
-<div class="statusChapterSettingsDialog template" title="{% trans "Chapter statuses" %}">
- <p></p>
- <form onsubmit="return false;">
- <table border="0">
- <tr>
- <td valign="top"><b>{% trans "New status:" %}</b></td>
- <td valign="top" width="350" align="right"><input name="newstatus" type="text" style="width: 400px;"/></td>
- <td valign="top"><a style="float: right;" name="newstatus">Add</a></td>
- </tr>
- </table>
- <p><b>{% trans "Chapter statuses:" %}</b></p>
- <ul style="padding-left: 0px" id="sortablestatus">
- </ul>
- </form>
-</div>
+ {% include "editor/edit_content.html" %}
-<div class="chapterDeleteDialog template" title="{% trans "Delete chapter" %}">
- <p>{% trans "Are you sure you would like to delete this chapter? You will lose all data associated to this chapter and you will not be able to undo this operation!" %}</p>
- <form>
- <input type="checkbox" name="agree"> {% trans "I understand and agree" %}
- </form>
-</div>
+ {% include "editor/edit_strings.html" %}
+ {% include "editor/edit_templates.html" %}
{% endblock %}
View
75 lib/booki/editor/templates/editor/edit_content.html
@@ -0,0 +1,75 @@
+{% load i18n %}
+
+<div id="notify" class="alert-box info"> </div>
+
+<h2><a href="{% url book_info book.url_title %}">{{ book }}</a> </h2>
+<div id="tabs">
+ <ul>
+ {% if "chapters" in tabs %}
+ <li><a href="#tabchapters">{% trans "Chapters" %}</a></li>
+ {% endif %}
+
+ {% if "attachments" in tabs %}
+ <li><a href="#tabattachments">{% trans "Images and Files" %}</a></li>
+ {% endif %}
+
+ {% if "covers" in tabs %}
+ <li><a href="#tabcovers">{% trans "Cover Manager" %}</a></li>
+ {% endif %}
+
+
+ {% if "history" in tabs %}
+ <li><a href="#tabhistory">{% trans "History" %}</a></li>
+ {% endif %}
+
+ {% if "versions" in tabs %}
+ <li><a href="#tabversions">{% trans "Versions" %}</a></li>
+ {% endif %}
+
+ {% if "notes" in tabs %}
+ <li><a href="#tabnotes">{% trans "Notes" %}</a></li>
+ {% endif %}
+
+ {% if "settings" in tabs %}
+ <li><a href="#tabsettings">{% trans "Settings" %}</a></li>
+ {% endif %}
+
+
+ {% if "export" in tabs %}
+ <li><a href="#tabpublish">{% trans "Publish" %}</a></li>
+ {% endif %}
+ </ul>
+
+ {% if "chapters" in tabs %}
+ {% include "editor/tab_chapters.html" %}
+ {% endif %}
+
+ {% if "attachments" in tabs %}
+ {% include "editor/tab_attachments.html" %}
+ {% endif %}
+
+ {% if "covers" in tabs %}
+ {% include "editor/tab_cover.html" %}
+ {% endif %}
+
+ {% if "history" in tabs %}
+ {% include "editor/tab_history.html" %}
+ {% endif %}
+
+ {% if "versions" in tabs %}
+ {% include "editor/tab_version.html" %}
+ {% endif %}
+
+ {% if "export" in tabs %}
+ {% include "editor/tab_publish.html" %}
+ {% endif %}
+
+ {% if "settings" in tabs %}
+ {% include "editor/tab_settings.html" %}
+ {% endif %}
+
+
+ {% if "notes" in tabs %}
+ {% include "editor/tab_notes.html" %}
+ {% endif %}
+ </div>
View
48 lib/booki/editor/templates/editor/edit_header.html
@@ -0,0 +1,48 @@
+{% load i18n %}
+ <link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/css/editor.css" rel="Stylesheet" />
+ <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/editor.js"></script>
+ <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.url.js"></script>
+ <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.validate.js"></script>
+ <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.form.js"></script>
+ <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.form.wizard.js"></script>
+ <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/bbq.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ /* booki part */
+ /* this is temporary here */
+
+ // probably should urlencode them
+ $.booki.username = "{{request.user.username|escapejs}}";
+ $.booki.currentBookID = {{book.id}};
+ $.booki.currentBook = "{{book.title|escapejs}}";
+ $.booki.currentBookURL = "{{book.url_title|escapejs}}";
+
+ $.booki.currentVersion = "{{book_version|escapejs}}";
+ $.booki.sputnikDispatcherURL = "{% url sputnik.views.dispatcher %}";
+ $.booki.bookViewUrlTemplate = "{% url book_view 'XXX' %}";
+ $.booki.bookDraftViewUrlTemplate = "{% url draft_book 'XXX' %}";
+
+ $.booki.profileThumbnailViewUrlTemplate = "{% url view_profilethumbnail 'XXX' %}";
+
+ /* call when page is loaded */
+
+ $.booki.editor.initEditor();
+
+ /* temporarily comment search button
+ $("#searchbox BUTTON").button(); */
+
+ $.booki.subscribeToChannel("/booki/", function(message) {
+
+ });
+
+
+ // start Sputnik
+ jQuery.booki.network._transport.connect();
+ });
+
+
+ function closeAttachmentUpload() {
+ $("#insertattachment .listing").css("display", "block");
+ $.booki.editor.reloadAttachments(function() { $.booki.editor.upload.redrawFiles(); });
+ }
+ </script>
View
15 lib/booki/editor/templates/editor/edit_sidebar.html
@@ -0,0 +1,15 @@
+{% load i18n %}
+
+
+<!-- chat box + drop shadow -->
+<div class="block shadow"> <span class="arrow-down"></span>
+ <h4 id="chattitle">{% trans "Chat" %}</h4>
+ <div id="chat"></div>
+</div>
+<div class="block shadow"> <span class="arrow-down"></span>
+ <h4>{% trans "Currently editing" %}</h4>
+ <ul id="users">
+ </ul>
+</div>
+<!-- end of chat box + drop shadow -->
+
View
217 lib/booki/editor/templates/editor/edit_templates.html
@@ -0,0 +1,217 @@
+{% load i18n %}
+
+<p class="joinMsg template">{% blocktrans %}<span class="icon">JOINED</span> <span class="notice">notice</span>{% endblocktrans %}</p>
+<p class="infoMsg template">{% blocktrans %}<span class="info">INFO</span> <span class="notice">notice</span>{% endblocktrans %}</p>
+<table class="historyTable template" width="100%">
+ <tr>
+ <th>{% trans "action" %}</th>
+ <th></th>
+ <th>{% trans "user" %}</th>
+ <th>{% trans "time" %}</th>
+ </tr>
+</table>
+<table class="template">
+ <tr class="rowCreateRename template">
+ <td class="entryKind" valign="top">entry.kind</td>
+ <td valign="top"><a class="setChapterLink entryChapter" style="text-decoration: underline" href="javascript:void(0)">entry.chapter</a></td>
+ <td class="entryUser" valign="top">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowSave template">
+ <td class="entryKind" valign="top">entry.kind</td>
+ <td valign="top"><a class="setChapterLink entryChapter" style="text-decoration: underline" href="javascript:void(0)">entry.chapter</a></td>
+ <td class="entryUser" valign="top">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowVersion template">
+ <td>{% trans "New version" %}</td>
+ <td>{% blocktrans %}Switched to <span class="entryVersion">entry.version.version</span>{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowAttachment template">
+ <td>{% trans "Upload" %}</td>
+ <td valign="top">{% blocktrans %}Uploaded <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowCoverUpload template">
+ <td>{% trans "Upload cover" %}</td>
+ <td valign="top">{% blocktrans %}Uploaded <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowCoverDelete template">
+ <td>{% trans "Delete cover" %}</td>
+ <td valign="top">{% blocktrans %}Deleted <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowCoverUpdate template">
+ <td>{% trans "Modify cover" %}</td>
+ <td valign="top">{% blocktrans %}Modified <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowClone template">
+ <td>{% trans "Imported chapter" %}</td>
+ <td valign="top"><a class="setChapterLink entryChapter" style="text-decoration: underline" href="javascript:void(0)">entry.chapter</a></td>
+ <td class="entryUser" valign="top">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowAttachmentDelete template">
+ <td>{% trans "Delete" %}</td>
+ <td valign="top">{% blocktrans %}Deleted <span class="entryFilename">entry.args.filename</span>.{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowChapterDelete template">
+ <td>{% trans "Delete chapter" %}</td>
+ <td valign="top">{% blocktrans %}Deleted <span class="entryFilename"></span>.{% endblocktrans %}</td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+ <tr class="rowGeneric template">
+ <td class="entryKind">entry.kind</td>
+ <td></td>
+ <td class="entryUser">entry.user</td>
+ <td class="entryModified" valign="top" style="white-space: nowrap">entry.modified</td>
+ <td></td>
+ </tr>
+</table>
+<ul class="eventKind template">
+ <li id="unknown">{% trans "Unknown" %}</li>
+ <li id="create">{% trans "Create" %}</li>
+ <li id="save">{% trans "Save" %}</li>
+ <li id="rename">{% trans "Rename" %}</li>
+ <li id="reorder">{% trans "Reorder" %}</li>
+ <li id="split">{% trans "Split" %}</li>
+ <li id="section_create">{% trans "Section create" %}</li>
+ <li id="book_create">{% trans "Book create" %}</li>
+ <li id="minor">{% trans "Minor" %}</li>
+ <li id="major">{% trans "Major" %}</li>
+ <li id="attachment">{% trans "Attachment" %}</li>
+</ul>
+<ul class="bookStatuses template">
+ {% for s0, s1 in statuses %}
+ <li id="{{s0}}">{% trans s1 %}</li>
+ {% endfor %}
+</ul>
+<ul class="template">
+<li class="sectionLine template ui-state-default"><span class="drag-handle"></span>
+ <div class="cont">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td width="70%"><div class="title">name</div></td>
+ <td width="15%">
+ <td width="15%"><div class="extra"></div></td>
+ </tr>
+ </table>
+ </div>
+</li>
+<li class="chapterLine template ui-state-default"><span class="drag-handle"></span>
+ <div class="cont">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td><div class="title">name</div></td>
+ <td width="20%" class="edit"><div class="chapterLinks"><a class="editLink" href="javascript:void(0)">{% trans "EDIT" %}</a> <a class="viewLink" href="javascript:void(0)">{% trans "VIEW" %}</a> <a class="deletechapter" href="javascript:void(0)"><span class="ui-icon ui-icon-trash"></span></a></div>
+ <div class="lock"><a name="unlockLink" class="lockUser" style="color: white" href="javascript:void(0)">v</a></div></td>
+ <td width="15%"><div class="status"><a class="statusLink statusName" href="javascript:void(0)">status</a></div>
+ <div class="extra"></div></td>
+ </tr>
+ </table>
+ </div>
+</li>
+</ul>
+<div class="historyDisplay template"> <a href="javascript:void(0)" class="backLink">&lt;&lt; {% trans "back to history index" %}</a> &nbsp;&nbsp;&nbsp; <a class="button compareLink" href="javascript:void(0)">{% trans "Compare revisions" %}</a> &nbsp;&nbsp;&nbsp;
+ <h3 class="chapterName">chapterName</h3>
+ <table class="chapterHistoryTable" width="100%">
+ <tr>
+ <th>{% trans "compare" %}</th>
+ <th>{% trans "revision" %}</th>
+ <th>{% trans "user" %}</th>
+ <th>{% trans "time" %}</th>
+ <th>{% trans "comment" %}</th>
+ </tr>
+ </table>
+</div>
+<table class="attachmentsTable template" border="0" width="100%">
+ <tr>
+ <td width="30"></td>
+ <td><b>{% trans "name" %}</b></td>
+ <td><b>{% trans "dimension" %}</b></td>
+ <td><b>{% trans "size" %}</b></td>
+ <td><b>{% trans "created" %}</b></td>
+ </tr>
+</table>
+<div class="revisionDisplay template"> <a class="backLink" href="javascript:void(0)">&lt;&lt; {% trans "back to chapter history" %}</a> <span class="buttonset" style="padding-left: 10px">
+ <input checked="checked" type="radio" id="radio1" name="radio" />
+ <label for="radio1">{% trans "Normal view" %}</label>
+ <input type="radio" id="radio2" name="radio" />
+ <label for="radio2">{% trans "Source view" %}</label>
+ </span> <a class="revertLink button" href="javascript:void(0)">{% trans "Revert to this revision" %}</a>
+ <p class="err-no-revision">{% trans "No such revision." %}</p>
+ <div class="revision-info">
+ <h3 class="chapterName">chapterName</h3>
+ <p>{% trans "User:" %} <span class="dataUser">data.user</span><br/>
+ {% trans "Modified:" %} <span class="dataModified">data.modified</span><br/>
+ {% trans "Version:" %} <span class="dataVersion">data.version</span><br/>
+ {% trans "Revision:" %} <span class="dataRevision">data.revision</span><br/>
+ <span class="revisionComment">{% trans "Comment" %}: <span class="dataComment">data.comment</span><br/>
+ </span> </p>
+ <span class="cont"></span> <span class="previousLinkDisplay"><a class="previousLink" href="javascript:void(0)">&lt;&lt; {% trans "previous" %}</a>&nbsp;&nbsp;&nbsp;</span> <a class="nextLink" href="javascript:void(0)">{% trans "next" %} &gt;&gt;</a> <br/>
+ <br/>
+ <div id="chapterrevision" class="dataContent" style="padding: 5px; border: 1px solid black; background-color: #f0f0f0"></div>
+ </div>
+</div>
+<div class="diffDisplay template"> <a class="backLink" href="javascript:void(0)">&lt;&lt; {% trans "back to chapter history" %}</a> <a href="javascript:void(0)" name="side">{% trans "Show side by side" %}</a>
+ <h3>{% blocktrans %}Compare revision <span class="revision1Name">revision1</span> with revision <span class="revision2Name">revision2</span>{% endblocktrans %}</h3>
+ <div id="chapterdigg" class="dataOutput" style="padding: 5px; border: 1px solid black; background-color: #f0f0f0; font-size: 8pt"></div>
+ <!-- <pre id="chapterdigg" class="dataOutput" style="padding: 5px; border: 1px solid black; background-color: #f0f0f0; font-size: 8pt"></pre> -->
+</div>
+<div class="statusChapterDialog template" title="{% trans "Chapter status" %}">
+ <p>{% trans "Select new chapter status:" %}</p>
+ <form>
+ <ul style="padding-left: 10px">
+ </ul>
+ </form>
+</div>
+<style>
+ #sortablestatus { list-style-type: none; margin: 0; padding: 0; }
+ #sortablestatus li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
+ #asortablestatus li span { margin-left: -1.3em; }
+ #sortablestatus .ajkon { position: absolute; margin-left: -1.3em; }
+
+</style>
+<div class="statusChapterSettingsDialog template" title="{% trans "Chapter statuses" %}">
+ <p></p>
+ <form onsubmit="return false;">
+ <table border="0">
+ <tr>
+ <td valign="top"><b>{% trans "New status:" %}</b></td>
+ <td valign="top" width="350" align="right"><input name="newstatus" type="text" style="width: 400px;"/></td>
+ <td valign="top"><a style="float: right;" name="newstatus">Add</a></td>
+ </tr>
+ </table>
+ <p><b>{% trans "Chapter statuses:" %}</b></p>
+ <ul style="padding-left: 0px" id="sortablestatus">
+ </ul>
+ </form>
+</div>
+
+<div class="chapterDeleteDialog template" title="{% trans "Delete chapter" %}">
+ <p>{% trans "Are you sure you would like to delete this chapter? You will lose all data associated to this chapter and you will not be able to undo this operation!" %}</p>
+ <form>
+ <input type="checkbox" name="agree"> {% trans "I understand and agree" %}
+ </form>
+</div>
View
17 lib/booki/editor/templates/editor/tab_attachments.html
@@ -0,0 +1,17 @@
+{% load i18n %}
+
+<div id="tabattachments">
+ <h3>{% trans "Images and Files" %}</h3>
+ <p>{% blocktrans %}All images added to your book are listed here as well as any additional files you have uploaded.{% endblocktrans %}</p>
+ <div id="attachmentscontainer"> </div>
+ <div style="margin: 0px 0 20px;"> <a name="delete" href="javascript:void(0)">{% trans "Deleted selected items" %}</a> </div>
+ <h3>{% trans "Upload a new image or file" %}</h3>
+ <form method="POST" target="frameupload2" action="../_upload/" enctype="multipart/form-data">
+ <input type="file" name="entry0">
+ <input type="hidden" name="attachmenttab" value="1"/>
+ <input type="submit" value="{% trans "Upload" %}" />
+ </form>
+ <iframe width="0" height="0" name="frameupload2" border="0" style="border: 0px"></iframe>
+ <div class="dialogs"></div>
+</div>
+
View
209 lib/booki/editor/templates/editor/tab_chapters.html
@@ -0,0 +1,209 @@
+{% load i18n %}
+ <div id="tabchapters">
+ <!-- START Chapters TAB -->
+
+ <table border="0" width="100%">
+ <tr>
+ <td valign="top"><div id="container"> {% if not is_browser_supported %}
+ <div style="border-top: 2px solid red; border-bottom: 2px solid red; padding: 5px;"> {% trans "We are very sorry, but we are not fully compatible with your browser. We are working hard to fix this problem. Until we fix this, you can try to use this site with Firefox, Chrome, Safari, Opera or some other compatible browser. Thank you for your understanding." %} </div>
+ {% endif %}
+ <h3>{% trans "Table of contents" %}</h3>
+ <div id="chapteraction"> <a href="javascript:void(0)" onclick='$("#newchapter").dialog("open")'>{% trans "NEW CHAPTER" %}</a><a href="javascript:void(0)" onclick='$("#newsection").dialog("open")'>{% trans "NEW SECTION" %}</a><a href="javascript:void(0)" onclick='$("#clonechapter").dialog("open")'>{% trans "IMPORT CHAPTER" %}</a> </div>
+ <div id="edit-info" class="alert-box info template" style="margin-bottom:10px;">{% blocktrans %}All books should contain at least one section and can have as many chapters as you like.{% endblocktrans %}</div>
+
+ <ul id="chapterslist" class="connectedSortable">
+ </ul>
+
+ <div id="chapteraction"> <a href="javascript:void(0)" onclick='$("#newchapter").dialog("open")'>{% trans "NEW CHAPTER" %}</a><a href="javascript:void(0)" onclick='$("#newsection").dialog("open")'>{% trans "NEW SECTION" %}</a><a href="javascript:void(0)" onclick='$("#clonechapter").dialog("open")'>{% trans "IMPORT CHAPTER" %}</a> </div>
+ <div id="newdiff" title="Chapter diff">
+ <div class="diffcontent"> </div>
+ </div>
+ <div id="newchapter" title="{% trans "New chapter" %}">
+ <!-- <p id="validateTips">Enter new chapter name.</p> -->
+ <form onsubmit="javascript:return false">
+ <fieldset>
+ <input type="text" class="text ui-widget-content ui-corner-all">
+ </fieldset>
+ </form>
+ </div>
+ <div id="clonechapter" title="{% trans "Clone chapter" %}">
+ <!-- <p id="validateTips">Enter new chapter name.</p> -->
+ <form onsubmit="javascript:return false">
+ <fieldset>
+ <input name="book" type="text" class="text ui-widget-content ui-corner-all">
+ <br />
+ <input name="chapter" type="text" class="text ui-widget-content ui-corner-all">
+ <br />
+ {% trans "New title (optional)" %}:<br />
+ <input name="rename_title" type="text" class="text ui-widget-content ui-corner-all">
+ </fieldset>
+ </form>
+ </div>
+ <div id="newsection" title="{% trans "New section" %}">
+ <!-- <p id="validateTips">Enter new section name.</p> -->
+ <form onsubmit="return false">
+ <fieldset>
+ <input type="text" class="text ui-widget-content ui-corner-all">
+ </fieldset>
+ </form>
+ </div>
+
+ <!-- open attachment dialog -->
+ <div id="insertattachment" title="{% trans "Insert image" %}">
+ <div id="inserttabs">
+ <ul>
+ <li><a href="#insertimages">{% trans "Images" %}</a></li>
+ <li><a href="#insertupload">{% trans "Upload image" %}</a></li>
+ </ul>
+ <div id="insertimages">
+ <div class="listing">
+ <table border="0" width="100%">
+ <tr>
+ <td valign="top"><div style="height: 250px; overflow: auto">
+ <table border="0" width="90%" class="files">
+ </table>
+ </div></td>
+ <td width="160" valign="top"><fieldset style="padding: 2px">
+ <legend>{% trans "Preview" %}</legend>
+ <div class="previewattachment"> </div>
+ </fieldset></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div id="insertupload">
+ <div class="uploadform">
+ <form method="POST" target="frameupload" action="../_upload/" enctype="multipart/form-data">
+ <div class="uploadattachment" style="overflow: auto;"> </div>
+ <div class="uploadsubmit"> </div>
+ </form>
+ <iframe width="0" height="0" name="frameupload" border="0" style="border: 0px"></iframe>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- close attachment dialog -->
+
+ <!-- start of edit attachment -->
+ <div id="editattachment" title="{% trans "Edit Image" %}">
+ <div class="container">
+ <fieldset style="float: right; width: 160px; height: 160px; border: 1px solid gray; margin-left: 10px;">
+ <legend>{% trans "Preview" %}</legend>
+ <span class="preview"></span>
+ </fieldset>
+ <fieldset>
+ <legend>{% trans "Image" %}</legend>
+ <table border="0">
+ <tr>
+ <td>{% trans "Image:" %}</td>
+ <td><input type="text" name="f_image" size="40"></td>
+ </tr>
+ <tr>
+ <td>{% trans "Alt:" %}</td>
+ <td><input type="text" name="f_alt" size="40"></td>
+ </tr>
+ </table>
+ </fieldset>
+ <fieldset>
+ <legend>{% trans "Positioning" %}</legend>
+ <table border="0">
+ <tr>
+ <td>{% trans "Border:" %}</td>
+ <td><input type="text" name="f_border"></td>
+ </tr>
+ <tr>
+ <td>{% trans "Align:" %}</td>
+ <td><input type="text" name="f_align"></td>
+ </tr>
+ <tr>
+ <td>{% trans "Width:" %}</td>
+ <td><input type="text" name="f_width"></td>
+ </tr>
+ <tr>
+ <td>{% trans "Height:" %}</td>
+ <td><input type="text" name="f_height"></td>
+ </tr>
+ </table>
+ </fieldset>
+ <fieldset>
+ <legend>{% trans "Style" %}</legend>
+ <table border="0" width="100%">
+ <tr>
+ <td>{% trans "CSS Class:" %}</td>
+ <td><input type="text" name="f_css"></td>
+ <td colspan="2">
+ </tr>
+ <tr>
+ <td>{% trans "Padding:" %}</td>
+ <td><input type="text" name="f_padding"></td>
+ <td>{% trans "Margin:" %}</td>
+ <td><input type="text" name="f_margin"></td>
+ </tr>
+ <tr>
+ <td>{% trans "Background color:" %}</td>
+ <td><input type="text" name="f_bgcolor"></td>
+ <td>{% trans "Border color:" %}</td>
+ <td><input type="text" name="f_bordercolor"></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <!-- end of edit attachment -->
+
+ <div class="middleinfo"> </div>
+ <h3>{% trans "Hold chapters" %}</h3>
+ <ul id="holdchapterslist" class="connectedSortable">
+ </ul>
+ </div>
+ <div id="editorcontainer"> </div>
+ <div id="editor" class="template">
+ <form method="GET" action="javascript: return void(0)">
+ <h3 class="title"></h3>
+ <div class="chapteredit">
+ <input type="hidden" name="chapter_id" value=""/>
+ <a name="save" href="javascript:void(0)">{% trans "Save" %}</a> <a name="savecontinue" href="javascript:void(0)">{% trans "Save and continue editing" %}</a> <a name="view" href="javascript:void(0)">{% trans "View chapter" %}</a> <a name="cancel" href="javascript:void(0)">{% trans "Cancel" %}</a> </div>
+ <textarea name="myTextArea" id="myTextArea" style="width: 100%; height: 600px">
+ </textarea>
+ <fieldset class="plain author-comments">
+ <dl>
+ <dt>
+ <label>
+ <input type="checkbox" name="minor">
+ {% trans "Minor change, don't notify." %}</label>
+ </dt>
+ <dd>
+ <input type="text" name="comment">
+ </dd>
+ <dt>
+ <label>{% trans "Author:" %}</label>
+ </dt>
+ <dd>
+ <input type="text" name="author">
+ </dd>
+ <dt>
+ <label>{% trans "Author comment:" %}</label>
+ </dt>
+ <dd>
+ <input type="text" name="authorcomment">
+ </dd>
+ </dl>
+ </fieldset>
+ </form>
+ </div>
+ <div id="spalatodialog" title="Split chapters">
+ <p id="validateTips">{% trans "Seems like You have changed the structure of the chapters. What do you want to do?" %}</p>
+ <table border="0" width="100%">
+ <tr>
+ <td valign="top" width="200"> {% trans "New chapters:" %}
+ <ul class="chapters" style="margin-left: 5px">
+ </ul></td>
+ <td width="1" bgcolor="#c0c0c0"></td>
+ <td valign="top" class="content"></td>
+ </tr>
+ </table>
+ </div></td>
+ </tr>
+ </table>
+ </div>
View
0  ...ditor/templates/editor/cover_manager.html → ...ki/editor/templates/editor/tab_cover.html
File renamed without changes
View
8 lib/booki/editor/templates/editor/tab_history.html
@@ -0,0 +1,8 @@
+{% load i18n %}
+
+<div id="tabhistory">
+ <h3>{% trans "History" %}</h3>
+ <p class="version"> {% blocktrans %}Here you can follow the edit history of your book.{% endblocktrans %} </p>
+ <!-- START history TAB -->
+ <div id="historycontainer"></div>
+</div>
View
12 lib/booki/editor/templates/editor/tab_notes.html
@@ -0,0 +1,12 @@
+{% load i18n %}
+
+<div id="tabnotes">
+ <h3>{% trans "Notes" %}</h3>
+ <!-- START notes TAB -->
+ <p> {% trans "Shared notes for this book" %} </p>
+ <form onsubmit="return false;" action="" method="">
+ <textarea border="0" name="notes" class="notes" rows="20" cols="65" style="width:100%; margin-bottom:12px;"></textarea>
+ <button>{% trans "Save the notes" %}</button>
+ </form>
+ <div class="info"> </div>
+</div>
View
8 lib/booki/editor/templates/editor/tab_publish.html
@@ -0,0 +1,8 @@
+{% load i18n %}
+
+<div id="tabpublish">
+ <!-- START publish TAB -->
+ <h3>{% trans "Publish" %}</h3>
+ <p></p>
+
+ {% include "editor/edit_publish.html" %}
View
128 lib/booki/editor/templates/editor/tab_settings.html
@@ -0,0 +1,128 @@
+{% load i18n %}
+ <div id="tabsettings">
+ <h3>{% trans "Settings" %}</h3>
+ <p>{% blocktrans %}Manage the settings of your book.{% endblocktrans %}</p>
+ <!-- START settings TAB -->
+
+ <form name="formlanguages" action="javascript:void(0)" onsubmit="return false;">
+ <fieldset>
+ <legend>{% trans "Language" %}</legend>
+ <dl>
+ <dt>
+ <label>{% trans "This book is written in: " %}</label>
+ </dt>
+ <dd>
+ <select name="lang">
+ </select>
+ <a name="language">{% trans "Set new language" %}</a></dd>
+ <dd>
+ <label>
+ <input type="checkbox" name="rtl">
+ {% trans "Right to left text" %}</label>
+ </dd>
+ </dl>
+ </fieldset>
+ </form>
+ <form name="formlicences" action="javascript:void(0)" onsubmit="return false;">
+ <fieldset>
+ <legend>{% trans "License" %}</legend>
+ <dl>
+ <dt>
+ <label>{% trans "This book is licensed with:" %}</label>
+ </dt>
+ <dd>
+ <select name="licen">
+ </select>
+ <a name="license">{% trans "Set new license" %}</a></dd>
+ <dd></dd>
+ <dd><a name="readlicense" href="javascript:void(0)">{% trans "Read full text of the license" %}</a></dd>
+ <dd><a name="attribution">{% trans "Manage copyright attribution" %}</a></dd>
+ </dl>
+ </fieldset>
+ </form>
+ <div class="copyrightAttribution template" title="{% trans "Manage Copyright Attribution" %}">
+ <p>{% blocktrans %}If you want to exclude some people from the copyright attribution...{% endblocktrans %}</p>
+ <form onsubmit="return false" action="javascript:void(0)">
+ <table border="0" width="100%">
+ <tr>
+ <td><b>{% trans "Contributors" %}</b></td>
+ <td>&nbsp;</td>
+ <td><b>{% trans "Excluded contributors" %}</b></td>
+ </tr>
+ <tr>
+ <td width="40%" valign="top"><select size="10" style="width: 100%; height: 90%" name="available">
+ </select></td>
+ <td width="10%" valign="center" align="center"><a class="button" name="add">&gt;&gt;</a><br>
+ <br>
+ <a class="button" name="remove">&lt;&lt;</a></td>
+ <td width="40%" valign="top"><select size="10" style="width: 100%; height: 90%" name="excluded">
+ </select></td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ <fieldset>
+ <legend>{% trans "Roles" %}</legend>
+ <dl>
+ <dt style="display:none;"></dt>
+ <dd><a name="roles">{% trans "Manage roles" %}</a></dd>
+ </dl>
+ </fieldset>
+ <div class="rolesDialog template" title="{% trans "Manage Roles" %}">
+ <form onsubmit="return false" action="javascript:void(0)">
+ <dl>
+ <dt>
+ <label>{% trans "Role" %}:</label>
+ </dt>
+ <dd>
+ <select style="width: 99%" name="listroles">
+ <option value="0" selected="selected">{% trans "Select role" %}</option>
+ <option value="1">{% trans "Administrator" %}</option>
+ <option value="2">{% trans "Editor" %}</option>
+ </select>
+ </dd>
+ <dt>
+ <label>{% trans "New user:" %}</label>
+ </dt>
+ <dd>
+ <input type="text" name="newuser" style="width: 400px; margin-right:10px;">
+ <a name="adduser" style="width:70px;">{% trans "Add" %}</a></dd>
+ <dt>
+ <label>{% trans "Role:" %}</label>
+ </dt>
+ <dd>
+ <select size="10" style="width: 400px; float:left; margin-right:10px;" name="users">
+ </select>
+ <a name="removeuser" style="width:70px;">{% trans "Remove" %}</a></dd>
+ </dl>
+ </form>
+ </div>
+ <fieldset>
+ <legend>{% trans "Chapter status" %}</legend>
+ <dl>
+ <dt>
+ <p>{% trans "Available statuses:" %} <span class="currentstatuses"></span></p>
+ </dt>
+ <dd><a name="chapterstatus">{% trans "Manage chapter status" %}</a></dd>
+ </dl>
+ </fieldset>
+ <form onsubmit="return false;">
+ <fieldset>
+ <legend>{% trans "Permissions and visibility" %}</legend>
+ <dl>
+ <dt>
+ <label>{% trans "This book can be edited by:" %}</label>
+ </dt>
+ <dd>
+ <select name="permissions">
+ <option value="0">{% trans "anyone" %}</option>
+ <option value="1">{% trans "book owner" %}</option>
+ <option value="2">{% trans "admins" %}</option>
+ <option value="3">{% trans "admins and editors" %}</option>
+ </select>
+ <a name="permissionbutton">{% trans "Set permissions" %}</a> </dd>
+ </dl>
+ </fieldset>
+ </form>
+ <div class="info"> </div>
+ </div>
View
38 lib/booki/editor/templates/editor/tab_version.html
@@ -0,0 +1,38 @@
+{% load i18n %}
+
+<div id="tabversions">
+ <h3>{% trans "Versions" %}</h3>
+ {% if security.isAdmin or is_owner %}
+ <p class="version"> {% blocktrans %}With different versions you can easily organise your book. But be careful! Other users will not be able to edit
+ and work on previous versions once you create new one. Create new <i>major</i> version if you plan to make a lot of changes, and <i>minor</i> version if you plan to make just a few of them.{% endblocktrans %} </p>
+ <p class="version"> <a class="major" href="javascript:void(0)">{% trans "Create major version" %}</a> <a class="minor" href="javascript:void(0)">{% trans "Create minor version" %}</a> </p>
+ <div id="newversionmajor" title="{% trans "New version" %}">
+ <form onsubmit="javascript:return false">
+ <!-- <fieldset> -->
+ {% trans "You can name this version (optional):" %}
+ <input type="text" style="width: 100%" class="text ui-widget-content ui-corner-all">
+ <br/>
+ <i>{% trans "e.g. initial, dragon, test" %}</i><br/>
+ <br/>
+ {% trans "Description (optional)" %}<br/>
+ <textarea style="width: 100%; height: 150px"></textarea>
+ <!-- </fieldset> -->
+ </form>
+ </div>
+ <div id="newversionminor" title="{% trans "New version" %}">
+ <form onsubmit="javascript:return false">
+ <!-- <fieldset> -->
+ {% trans "You can name this version (optional):" %}
+ <input type="text" style="width: 100%" class="text ui-widget-content ui-corner-all">
+ <br/>
+ <i>{% trans "e.g. initial, dragon, test" %}</i><br/>
+ <br/>
+ {% trans "Description (optional)" %}<br/>
+ <textarea style="width: 100%; height: 150px"></textarea>
+ <!-- </fieldset> -->
+ </form>
+ </div>
+ {% endif %}
+ <h3>{% trans "All versions" %}</h3>
+ <div class="list list-container"></div>
+</div>
View
232 lib/booki/portal/templates/base.html
@@ -2,54 +2,7 @@
<!DOCTYPE HTML>
<html>
<head>
- <link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/css/booki.css" rel="Stylesheet" >
- <link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/themes/base/jquery.ui.all.css" rel="Stylesheet" >
- <link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/themes/smoothness/jquery.ui.all.css" rel="Stylesheet" >
- <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/jquery-1.4.4.js"></script>
- <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/ui/jquery-ui-1.8.10.custom.js"></script>
- <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.json-1.3.js"></script>
- <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/booki.js"></script>
- <script src="{{ request.META.SCRIPT_NAME }}/site_static/js/messaging.js" type="text/javascript"></script>
- <script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/general.js"></script>
- <link href="{{ request.META.SCRIPT_NAME }}/site_static/css/jquery.bubblepopup.v2.3.1.css" rel="stylesheet" type="text/css" />
- <link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/css/jquery-ui_overrides.css" rel="Stylesheet" >
- <script src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.bubblepopup.v2.3.1.min.js" type="text/javascript"></script>
-
- {% booki_site_favicon %}
- {% booki_site_metadata %}
-
-
- <script type="text/javascript">
- $(function() {
- $.booki.sputnikDispatcherURL = "{% url sputnik_dispatcher %}";
- });
- </script>
-
- <script type="text/javascript">
- $(function() {
- // open debug window
- $.booki.debug.init();
-
- $("#dialog-sputnik-error").dialog({
- modal: true,
- autoOpen: false,
- buttons: {
- Ok: function() {
- $(this).dialog('close');
- window.location = '.';
- }
- }
- });
-
- $("A.debug").click(function() {
- $("#bookidebug").dialog("open");
- return false;
- });
-
- $("FORM.messagefield").messagefield('init', {'view_post': '{% url messaging_post %}' });
-
- });
- </script>
+ {% include "booktype_head.html" %}
{% block header %}
{% endblock %}
@@ -59,151 +12,64 @@
<body>
<div class="topbar">
- {% booki_site_name %}
+ {% booki_site_name %}
- <div class="meta-bar">
+ <div class="meta-bar">
{% if request.user.is_authenticated %}
- <ul>
- <li>
- <a href="{% url view_profile request.user.username %}"><strong>{{ request.user.username }}</strong></a>&nbsp;&nbsp;
- {% if request.user.is_superuser %}
- |&nbsp;&nbsp;<a href="{% url control_frontpage %}">{% trans "Control Center" %}</a>&nbsp;&nbsp;
- {% endif %}
- |&nbsp;&nbsp;<a href="{% url signout %}">{% trans "Sign out" %}</a>&nbsp;&nbsp;|&nbsp;&nbsp;{% messagefield_button %}
- </li>
- </ul>
+ <ul>
+ <li>
+ <a href="{% url view_profile request.user.username %}"><strong>{{ request.user.username }}</strong></a>&nbsp;&nbsp;
+ {% if request.user.is_superuser %}
+ |&nbsp;&nbsp;<a href="{% url control_frontpage %}">{% trans "Control Center" %}</a>&nbsp;&nbsp;
+ {% endif %}
+ |&nbsp;&nbsp;<a href="{% url signout %}">{% trans "Sign out" %}</a>&nbsp;&nbsp;|&nbsp;&nbsp;{% messagefield_button %}
+ </li>
+ </ul>
{% else %}
- <ul>
- <li>
- <a href="{% url signin %}?redirect={{ request.path }}">{% trans "Sign In / Create Account" %}</a>
- </li>
- </ul>
- {% endif %}
- <div style="padding-top: 10px; padding-right: 15px;">
-<br/>
-<script>
- $(function() {
- var $frm = $("FORM[name=changelang]");
-
- $("A[href=#]", $frm).click(function() {
- var lang = $(this).attr("class").substr(4);
-
- $("INPUT[name=language]", $frm).val(lang);
- $frm.submit();
-
- return false;
- });
- });
-</script>
-<form name="changelang" method="POST" action="{{ request.META.SCRIPT_NAME }}/accounts/i18n/setlang/?language=en-us">
- <input type="hidden" name="language" value="en-us">
-
- {% if request.LANGUAGE_CODE == "en" or request.LANGUAGE_CODE == "en-us" %}
- &nbsp;English&nbsp;|
- {% else %}
- &nbsp;<a class="langen" href="#">English</a>&nbsp;|
- {% endif %}
-
- {% if request.LANGUAGE_CODE == "es" %}
- &nbsp;Español&nbsp;|
- {% else %}
- &nbsp;<a class="langes" href="#">Español</a>&nbsp;|
- {% endif %}
-
- {% if request.LANGUAGE_CODE == "it" %}
- &nbsp;Italiano&nbsp;|
- {% else %}
- &nbsp;<a class="langit" href="#">Italiano</a>&nbsp;|
- {% endif %}
-
- {% if request.LANGUAGE_CODE == "pt" %}
- &nbsp;Português&nbsp;|
- {% else %}
- &nbsp;<a class="langpt" href="#">Português</a>&nbsp;|
- {% endif %}
-
- {% if request.LANGUAGE_CODE == "ru" %}
- &nbsp;Русский&nbsp;|
- {% else %}
- &nbsp;<a class="langru" href="#">Русский</a>&nbsp;|
- {% endif %}
-
- {% if request.LANGUAGE_CODE == "sq" %}
- &nbsp;Shqip
- {% else %}
- &nbsp;<a class="langsq" href="#">Shqip</a>
- {% endif %}
-
-</form>
- </div>
-
-
- </div><!-- End of .meta-bar -->
+ <ul>
+ <li>
+ <a href="{% url signin %}?redirect={{ request.path }}">{% trans "Sign In / Create Account" %}</a>
+ </li>
+ </ul>
+ {% endif %}
+ <div style="padding-top: 10px; padding-right: 15px;">
+ <br/>
+ {% include "booktype_language.html" %}
+ </div>
+
+
+ </div><!-- End of .meta-bar -->
</div><!-- End top bar -->
- <div class="menubar shadow">
- {% if request.user.is_authenticated %}
- <div class="navbox">
- <ul>
- <li><a href="{% url view_profile request.user.username %}">{% trans "My Dashboard" %}</a></li>
- </ul>
- </div>
- {% endif %}
-
- <div class="navbox">
- <ul>
- <li><a href="{% url list_books %}">{% trans "Books" %}</a></li>
- <li><a href="{% url list_groups %}">{% trans "Groups" %}</a></li>
- <li><a href="{% url list_people %}">{% trans "People" %}</a></li>
- </ul>
- </div><!-- End of .navbox -->
- </div>
+<div class="menubar shadow">
+ {% if request.user.is_authenticated %}
+ <div class="navbox">
+ <ul>
+ <li><a href="{% url view_profile request.user.username %}">{% trans "My Dashboard" %}</a></li>
+ </ul>
+ </div>
+ {% endif %}
+
+ <div class="navbox">
+ <ul>
+ <li><a href="{% url list_books %}">{% trans "Books" %}</a></li>
+ <li><a href="{% url list_groups %}">{% trans "Groups" %}</a></li>
+ <li><a href="{% url list_people %}">{% trans "People" %}</a></li>
+ </ul>
+ </div><!-- End of .navbox -->
+</div>
<div class="content-container">
- <div class="content shadow">
- <!-- Content box and the drop shadow-->
-
- {% block content %}
- {% endblock %}
-
- </div>
+ <div class="content shadow">
+ <!-- Content box and the drop shadow-->
+ {% block content %}
+ {% endblock %}
+ </div>
</div>
<!-- End of content -->
-
-<!-- DEV TOOLS -->
-<div id="bookidebug">
-</div>
-
-<!-- sputnik error page -->
-<div id="dialog-sputnik-qrac" style="display: none"></div>
-<div id="dialog-sputnik-error" title="Can't communicate with booki">
- <p>
- <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
- {% trans "There has been error in communication with Booktype server." %}
- {% trans "Not sure right now where is the problem." %}
- </p>
- <p>
- {% trans "You should refresh this page." %}
- </p>
-</div>
-
-<ul class="strings template">
- <li class="ok">{% trans "OK" %}</li>
- <li class="back">{% trans "Back" %}</li>
- <li class="create">{% trans "Create" %}</li>
- <li class="cancel">{% trans "Cancel" %}</li>
- <li class="next">{% trans "Next" %}</li>
- <li class="import">{% trans "Import" %}</li>
- <li class="savechanges">{% trans "Save changes" %}</li>
- <li class="errorcreategroup">{% trans "Couldn't create a group!" %}</li>
- <li class="msgepub">{% trans "enter epub URL" %}</li>
- <li class="msgarchive">{% trans "enter Archive.org ID" %}</li>
- <li class="msgwiki">{% trans "enter Wikibooks URL" %}</li>
- <li class="msgbooktype">{% trans "enter Booktype URL" %}</li>
- <li class="deletebook">{% trans "Delete book" %}</li>
-</ul>
-
+{% include "booktype_extra.html" %}
+{% include "booktype_strings.html" %}
</body>
</html>
View
14 lib/booki/portal/templates/booktype_extra.html
@@ -0,0 +1,14 @@
+{% load i18n %}
+
+<!-- sputnik error page -->
+<div id="dialog-sputnik-qrac" style="display: none"></div>
+<div id="dialog-sputnik-error" title="Can't communicate with booktype">
+ <p>
+ <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
+ {% trans "There has been error in communication with Booktype server." %}
+ {% trans "Not sure right now where is the problem." %}
+ </p>
+ <p>
+ {% trans "You should refresh this page." %}
+ </p>
+</div>
View
36 lib/booki/portal/templates/booktype_head.html
@@ -0,0 +1,36 @@
+{% load i18n messaging_tags booki_tags %}
+
+<link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/css/booki.css" rel="Stylesheet" >
+<link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/themes/base/jquery.ui.all.css" rel="Stylesheet" >
+<link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/themes/smoothness/jquery.ui.all.css" rel="Stylesheet" >
+<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/jquery-1.4.4.js"></script>
+<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery/ui/jquery-ui-1.8.10.custom.js"></script>
+<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.json-1.3.js"></script>
+<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/booki.js"></script>
+<script src="{{ request.META.SCRIPT_NAME }}/site_static/js/messaging.js" type="text/javascript"></script>
+<script type="text/javascript" src="{{ request.META.SCRIPT_NAME }}/site_static/js/general.js"></script>
+<link href="{{ request.META.SCRIPT_NAME }}/site_static/css/jquery.bubblepopup.v2.3.1.css" rel="stylesheet" type="text/css" />
+<link type="text/css" href="{{ request.META.SCRIPT_NAME }}/site_static/css/jquery-ui_overrides.css" rel="Stylesheet" >
+<script src="{{ request.META.SCRIPT_NAME }}/site_static/js/jquery.bubblepopup.v2.3.1.min.js" type="text/javascript"></script>
+
+{% booki_site_favicon %}
+{% booki_site_metadata %}
+
+<script type="text/javascript">
+ $(function() {
+ $.booki.sputnikDispatcherURL = "{% url sputnik_dispatcher %}";
+
+ $("#dialog-sputnik-error").dialog({
+ modal: true,
+ autoOpen: false,
+ buttons: {
+ Ok: function() {
+ $(this).dialog('close');
+ window.location = '.';
+ }
+ }
+ });
+
+ $("FORM.messagefield").messagefield('init', {'view_post': '{% url messaging_post %}' });
+ });
+</script>
View
56 lib/booki/portal/templates/booktype_language.html
@@ -0,0 +1,56 @@
+{% load i18n %}
+
+<script>
+ $(function() {
+ var $frm = $("FORM[name=changelang]");
+
+ $("A[href=#]", $frm).click(function() {
+ var lang = $(this).attr("class").substr(4);
+
+ $("INPUT[name=language]", $frm).val(lang);
+ $frm.submit();
+
+ return false;
+ });
+ });
+ </script>
+
+<form name="changelang" method="POST" action="{{ request.META.SCRIPT_NAME }}/accounts/i18n/setlang/?language=en-us">
+ <input type="hidden" name="language" value="en-us">
+
+ {% if request.LANGUAGE_CODE == "en" or request.LANGUAGE_CODE == "en-us" %}
+ &nbsp;English&nbsp;|
+ {% else %}
+ &nbsp;<a class="langen" href="#">English</a>&nbsp;|
+ {% endif %}
+
+ {% if request.LANGUAGE_CODE == "es" %}
+ &nbsp;Español&nbsp;|
+ {% else %}
+ &nbsp;<a class="langes" href="#">Español</a>&nbsp;|
+ {% endif %}
+
+ {% if request.LANGUAGE_CODE == "it" %}
+ &nbsp;Italiano&nbsp;|
+ {% else %}
+ &nbsp;<a class="langit" href="#">Italiano</a>&nbsp;|
+ {% endif %}
+
+ {% if request.LANGUAGE_CODE == "pt" %}
+ &nbsp;Português&nbsp;|
+ {% else %}
+ &nbsp;<a class="langpt" href="#">Português</a>&nbsp;|
+ {% endif %}
+
+ {% if request.LANGUAGE_CODE == "ru" %}
+ &nbsp;Русский&nbsp;|
+ {% else %}
+ &nbsp;<a class="langru" href="#">Русский</a>&nbsp;|
+ {% endif %}
+
+ {% if request.LANGUAGE_CODE == "sq" %}
+ &nbsp;Shqip
+ {% else %}
+ &nbsp;<a class="langsq" href="#">Shqip</a>
+ {% endif %}
+</form>
View
16 lib/booki/portal/templates/booktype_strings.html
@@ -0,0 +1,16 @@
+{% load i18n %}
+<ul class="strings template">
+ <li class="ok