Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 100 lines (97 sloc) 2.72 KB
{% load url from future %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1.0">
<title>Sample App</title>
<script src="{{STATIC_URL}}js/jquery-2.0.2.js"></script>
<script src="{% url 'django.views.i18n.javascript_catalog' packages='rest2backbone'%}"></script>
<script src="{{STATIC_URL}}js/underscore.js"></script>
<script src="{{STATIC_URL}}js/backbone.js"></script>
<script src="{% url 'rest-api' %}"></script>
<script src="{{STATIC_URL}}js/api-forms.js"></script>
<script src="{{STATIC_URL}}js/app.js"></script>
<link rel="stylesheet" href="{{STATIC_URL}}css/app.css">
</head>
<body>
<header>
<div id="header">
<h1>Sample application for Backbone.js with Django REST Framework</h1>
<input class="search-field" type="search" title="Enter search sring and press Enter"
name="q" value="" placeholder="Search …">
<div id="main_menu">
<nav>
<ul id="main_tabs">
<li id="add_new"><img src="/static/img/plus.png"></li>
<li id="publishers_tab">Publishers</li>
<li id="authors_tab">Authors</li>
<li id="books_tab">Books</li>
</ul>
</nav>
</div>
</div>
</header>
<section>
<div id=main>
<div class='list_section'></div>
</div>
</section>
<footer><div id="footer">
A footer
</div></footer>
<script type="text/template" id="general_list">
<ul class="list"></ul>
<div id="list_footer">
<% if (previousPage) { %>
<a id="previous">&lt;&lt;</a>
<% } %>
<% if (nextPage) { %>
<a id="next" >&gt;&gt;</a>
<% } %>
</div>
</script>
<script type="text/template" id="new_list_item">
<li class="list_item new">
<div class="list_item_bar">
<span class="item_title expanded new">&lt;New <%= name %>&gt;</span>
<div class="item_delete"></div>
</div>
</li>
</script>
<script type="text/template" id="template_list_item">
<li data-pk="<%= id %>" class="list_item">
<div class="list_item_bar">
<span class="item_title"><%= title %></span>
<div class="item_delete"></div>
</div>
</li>
</script>
<script type="text/template" id="publisher_list_title">
<%= name %>
</script>
<script type="text/template" id="author_list_title">
<%= last_name %><% if (first_name) { print(', '+first_name) }%>
</script>
<script type="text/template" id="book_list_title">
<%= title %><span class="item_authors"> by <%= author_names.join('; ')%></span>
</script>
<script type="text/template" id="detail_template">
<div class="view_only">
<div id="r2b_edit_btn" class="r2b_top_form_btn">Edit</div>
<%= form_ro %>
</div>
<div class="edit_form" style="display:none">
<%= form %>
<div id="r2b_view_btn" class="r2b_top_form_btn">View</div>
<div id="r2b_save_btn" class="r2b_form_btn">Save</div>
</div>
</script>
<!-- Templates generated by rest2backbone -->
{%if params%}
{{params.forms.render_all}}
{%else%}
{{forms.render_all}}
{%endif%}
</body>
</html>