Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Commit

Permalink
Split base into two template (i.e. base and authenticated_base)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinka-cb committed Jun 22, 2014
1 parent 16a5a1f commit 7382f64
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/kawaz/templates/authenticated_base.html
@@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block content %}
{% block content-header %}
{% endblock %}
<ol class="breadcrumb">
{% block breadcrumb %}
<li><a href="/">Home</a></li>
{% endblock %}
</ol>
{% endblock %}
23 changes: 13 additions & 10 deletions src/kawaz/templates/products/product_form.html
@@ -1,29 +1,32 @@
{% extends "base.html" %}
{% extends "authenticated_base.html" %}
{% load bootstrap %}
{% block content %}
{% block content-header %}
{% if object %}
<h1>{{ object.title }}を編集する</h1>
{% else %}
<h1>新しいプロダクトを作成</h1>
{% endif %}
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
<li><a href="/products/">Products</a></li>
</ol>
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<li><a href="/products/">Products</a></li>
{% endblock %}
{% block content %}
{{ block.super }}
<ul class="nav nav-tabs">
<li class="active"><a href="#form">入力フォーム</a></li>
<li><a href="#preview">プレビュー</a></li>
<li class="active"><a href="#editor-main">入力フォーム</a></li>
<li><a href="#editor-preview">プレビュー</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="form">
<div class="tab-pane active" id="editor-main">
<form class="form-horizontal" role="form" method="POST" action=".">{% csrf_token %}
{{ form | bootstrap_horizontal }}
<div class="form-group">
<input type="submit" class="btn btn-primary" value="公開する" />
</div>
</form>
</div>
<div id="preview" class="tab-pane">
<div id="editor-preview" class="tab-pane">
プレビュー
</div>
</div>
Expand Down

1 comment on commit 7382f64

@giginet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Please sign in to comment.