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

Commit

Permalink
Browse files Browse the repository at this point in the history
Views
  • Loading branch information
brianloveswords committed Oct 10, 2012
1 parent 6a33d69 commit 897e772
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 20 deletions.
15 changes: 15 additions & 0 deletions views/admin/badge-index.html
@@ -0,0 +1,15 @@
{% extends 'admin/base.html' %}
{% block 'main' %}

<ul>
{% for badge in badges %}
<li>
<a href="/admin/badge/{{ badge.shortname }}">{{ badge.name }}</a>
({{ badge.shortname }})
</li>
{% endfor %}
</ul>



{% endblock %}
60 changes: 41 additions & 19 deletions views/admin/badge.html
@@ -1,4 +1,4 @@
{% extends 'admin/admin_base.html' %}
{% extends 'admin/base.html' %}

{% block 'extra_head' %}
<script src="/js/admin.js"></script>
Expand All @@ -8,17 +8,27 @@
<div class="row">
<div class="span8">
<h2>New Badge</h2>
<form>
<form method="post" action="?">
<legend>Badge Basics</legend>
<label>Badge Name</label>
<input type="text" placeholder="My Very Fancy Badge"/>
<span class="help-block">This is the name for your badge, it should be descriptive, but also awesome.</span>
<label>Badge Description</label>
<textarea rows="5"></textarea>
<span class="help-block">A description of your badge, this will appear in every assertion created from this badge.</span>
<button id="create_badge" type="submit" class="btn">Create</button>
<div>
<label>Badge Name
<input type="text" name="name" placeholder="My Very Fancy Badge">
</label>
<span class="help-block">This is the name for your badge, it should be descriptive, but also awesome.</span>
</div>
<div>
<label>Badge Description
<textarea rows="5" name="description"></textarea>
</label>
<span class="help-block">A description of your badge, this will appear in every assertion created from this badge.</span>
</div>
<div class="form-actions">
<button id="create-badge" type="submit" class="btn btn-primary">Create</button>
</div>
</form>
</div><!--end badge creation span-->


<div class="span4">
<h3>Triggers</h3>
<ul id="triggers">
Expand All @@ -29,16 +39,28 @@ <h3>Triggers</h3>

<form>
<legend>What triggers this badge?</legend>
<label>Trigger Description</label>
<input type="text" placeholder="The user clicks the red button"/>
<span class="help-block">Describe the action the user takes to earn this badge, keep it short!</span>
<label>Trigger Tag</label>
<input type="text" placeholder="red_button"/>
<span class="help-block">The tag the js library passes to Clopenbadger, no spaces or special characters please!</span>
<label>Trigger Count</label>
<input type="text" placeholder="5"/>
<span class="help-block">The number of times the user needs to activate this trigger before the badge is awarded</span>
<button id="create_trigger" type="submit" class="btn">Add this behavior</button>
<div>
<label>Trigger Description
<input type="text" placeholder="The user clicks the red button"/>
</label>
<span class="help-block">Describe the action the user takes to earn this badge, keep it short!</span>
</div>

<div>
<label>Trigger Tag
<input type="text" placeholder="red_button"/>
</label>
<span class="help-block">The tag the js library passes to Clopenbadger, no spaces or special characters please!</span>
</div>

<div>
<label>Trigger Count
<input type="text" placeholder="5"/>
</label>
<span class="help-block">The number of times the user needs to activate this trigger before the badge is awarded</span>
</div>

<button id="create-trigger" type="submit" class="btn">Add this behavior</button>
</form>

{% endblock %}
2 changes: 1 addition & 1 deletion views/admin/admin_base.html → views/admin/base.html
Expand Up @@ -34,7 +34,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">{{ projectName }}</a>
<a class="brand" href="#">ClopenBadger</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
Expand Down
6 changes: 6 additions & 0 deletions views/admin/index.html
@@ -0,0 +1,6 @@
{% extends 'admin/base.html' %}
{% block 'main' %}
<div>
hi
</div>
{% endblock %}
55 changes: 55 additions & 0 deletions views/admin/show-badge.html
@@ -0,0 +1,55 @@
{% extends 'admin/base.html' %}

{% block 'extra_head' %}
<script src="/js/admin.js"></script>
{% endblock %}

{% block 'main' %}
<div class="row">
<div class="span8">
<h2>{{ badge.name }}</h2>
<dl>
<dt>Shortname</dt>
<dd>{{ badge.shortname }}</dd>

<dt>Description</dt>
<dd>{{ badge.description }}</dd>
</dl>
</div><!--end badge creation span-->


<div class="span4">
<h3>Triggers</h3>
<ul id="triggers">
</ul>
<p id="no_triggers">None!<p>
</div><!--end trigger list span-->
</div><!--end row 1-->

<form>
<legend>What triggers this badge?</legend>
<div>
<label>Trigger Description
<input type="text" placeholder="The user clicks the red button"/>
</label>
<span class="help-block">Describe the action the user takes to earn this badge, keep it short!</span>
</div>

<div>
<label>Trigger Tag
<input type="text" placeholder="red_button"/>
</label>
<span class="help-block">The tag the js library passes to Clopenbadger, no spaces or special characters please!</span>
</div>

<div>
<label>Trigger Count
<input type="text" placeholder="5"/>
</label>
<span class="help-block">The number of times the user needs to activate this trigger before the badge is awarded</span>
</div>

<button id="create-trigger" type="submit" class="btn">Add this behavior</button>
</form>

{% endblock %}

0 comments on commit 897e772

Please sign in to comment.