Source

djangodash2011 / templates / projects / fileeditor.html

{% extends "_layouts/base.html" %}
{% load uni_form_tags %}
{% block page_title %}Editing {{ file.file.filename }} | Showofffr{% endblock %}
{% block page_content %}
<div class="sixteen columns">
	<div class="fourteen columns alpha">
		{% include 'projects/_breadcrumbs.html' %}
	</div>
	<div class="two columns omega colorschemes">
		<label for="editor_colors">Colorscheme</label>
		<select name="colors" id="editor_colors">
			<option value="ace/theme/dawn">Dawn</option>
			<option value="ace/theme/monokai">Monokai</option>

			<option value="ace/theme/cobalt" selected>Cobalt</option>
		</select>
	</div>


	<p class="editor-help"><strong>Reminder:</strong> Always use relative paths in your code. E.g.  
		<code>media/img/logo.png</code>, not <code>/media/img/logo.png</code></p>
	<div id="editor">{{ file.file.content }}</div>
	<div class="thirteen columns alpha">
		{% uni_form form form.helper %}
	</div>
	<div class="three columns omega">
		<a href="{% url project-view request.user.username slug path %}" class="full-width button 
			view-button">View this file</a>
	</div>
{% endblock %}

{% block extra_scripts %}
<script src="{{ STATIC_URL }}ace/ace.js"></script>
<script src="{{ STATIC_URL }}ace/mode-javascript.js"></script>
<script src="{{ STATIC_URL }}ace/mode-css.js"></script>
<script src="{{ STATIC_URL }}ace/mode-html.js"></script>
<script src="{{ STATIC_URL }}ace/theme-dawn.js"></script>
<script src="{{ STATIC_URL }}ace/theme-monokai.js"></script>
<script src="{{ STATIC_URL }}ace/theme-cobalt.js"></script>
<script src="{{ STATIC_URL }}javascripts/file-editor.js"></script>
{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.