Files
gollum/lib/gollum/frontend/templates/editor.mustache
T
Eston Bond 57d40c48e3 Add has_sidebar/has_footer to editor
Get data-markup-lang attribute working dynamically
2010-12-04 16:20:49 -08:00

116 lines
4.6 KiB
Plaintext
Executable File

<div id="gollum-editor" data-escaped-name="{{escaped_name}}" class="{{#is_create_page}}create{{/is_create_page}}{{#is_edit_page}}edit{{/is_edit_page}}">
{{#is_create_page}}
<form name="gollum-editor" action="/create/{{escaped_name}}" method="post">
{{/is_create_page}}
{{#is_edit_page}}
<form name="gollum-editor" action="/edit/{{escaped_name}}" method="post">
{{/is_edit_page}}
<fieldset id="gollum-editor-fields">
{{#is_create_page}}
<div id="gollum-editor-title-field" class="singleline">
<label for="page" class="jaws">Page Title</label>
<input type="text" name="page" id="gollum-editor-page-title" value="{{page_name}}">
</div>
{{/is_create_page}}
{{#is_edit_page}}
<input type="hidden" name="page" id="gollum-editor-page-title" value="{{page_name}}">
{{/is_edit_page}}
<div id="gollum-editor-function-bar">
<div id="gollum-editor-function-buttons">
<a href="#" id="function-bold" class="function-button">
<span>Bold</span></a>
<a href="#" id="function-italic" class="function-button">
<span>Italic</span></a>
<a href="#" id="function-code" class="function-button">
<span>Code</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-ul" class="function-button">
<span>Unordered List</span></a>
<a href="#" id="function-ol" class="function-button">
<span>Ordered List</span></a>
<a href="#" id="function-blockquote" class="function-button">
<span>Blockquote</span></a>
<a href="#" id="function-hr" class="function-button">
<span>Horizontal Rule</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-h1" class="function-button">
<span>h1</span></a>
<a href="#" id="function-h2" class="function-button">
<span>h2</span></a>
<a href="#" id="function-h3" class="function-button">
<span>h3</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-link" class="function-button">
<span>Link</span></a>
<a href="#" id="function-image" class="function-button">
<span>Image</span></a>
<span class="function-divider">&nbsp;</span>
<a href="#" id="function-help" class="function-button">
<span>Help</span></a>
</div>
<div id="gollum-editor-format-selector">
<select id="wiki_format" name="format">
{{#formats}}
<option {{#selected}}selected="selected" {{/selected}}value="{{id}}">
{{name}}
</option>
{{/formats}}
</select>
<label for="format">Edit Mode</label>
</div>
</div>
<div id="gollum-editor-help" class="jaws">
<ul id="gollum-editor-help-parent">
<li><a href="javascript:void(0);" class="selected">Help 1</a></li>
<li><a href="javascript:void(0);">Help 1</a></li>
<li><a href="javascript:void(0);">Help 1</a></li>
</ul>
<ul id="gollum-editor-help-list">
<li><a href="javascript:void(0);">Help 2</a></li>
<li><a href="javascript:void(0);">Help 3</a></li>
<li><a href="javascript:void(0);">Help 4</a></li>
<li><a href="javascript:void(0);">Help 5</a></li>
<li><a href="javascript:void(0);">Help 6</a></li>
<li><a href="javascript:void(0);">Help 7</a></li>
<li><a href="javascript:void(0);">Help 8</a></li>
</ul>
<div id="gollum-editor-help-wrapper">
<div id="gollum-editor-help-content">
<p>
</p>
</div>
</div>
</div>
<textarea id="gollum-editor-body"
data-markup-lang="{{format}}" name="content">{{content}}</textarea>
{{#has_footer}}
<div id="gollum-editor-edit-footer" class="collapsed">
<a href="#" class="button"><span>Expand/Collapse</span></a>
<h4>Footer</h4>
<textarea id="gollum-editor-footer" name="footer"></textarea>
</div>
{{/has_footer}}
{{#has_sidebar}}
<div id="gollum-editor-edit-sidebar" class="collapsed">
<a href="#" class="button"><span>Expand/Collapse</span></a>
<h4>Sidebar</h4>
<textarea id="gollum-editor-sidebar" name="sidebar"></textarea>
</div>
{{/has_sidebar}}
<div id="gollum-editor-edit-summary" class="singleline">
<label for="message" class="jaws">Edit message:</label>
<input type="text" name="message" id="gollum-editor-message-field" value="Write a small message here explaining this change. (Optional)">
</div>
<span class="jaws"><br></span>
<input type="submit" id="gollum-editor-submit" value="Save" title="Save current changes">
<a href="javascript:void(0)" id="gollum-editor-preview" class="minibutton" title="Preview this Page">Preview</a>
</fieldset>
</form>
</div>