Permalink
Browse files

public: more template work

  • Loading branch information...
1 parent 69c1cc5 commit cb593ee2336e04ccadede3ce79e3ff0c6eb03fc6 @twneale twneale committed May 1, 2012
@@ -5,9 +5,127 @@
{% block title %}{{bill.bill_id }}{% endblock %}
-{% block sidebar %}{% states_sidebar abbr %}{% endblock %}
-
{% block content %}
+ <div class="fullWidth mainModule">
+ <ol id="billAction">
+ <li class="active">
+ <span class="textReplace" id="stage1">Introduced</span>
+ <span class="tip">Sept 12, 2011</span>
+ </li>
+ <li>
+ <span class="textReplace" id="stage2">Passes Senate</span>
+ <span></span>
+ </li>
+ <li>
+ <span class="textReplace" id="stage3">Passes House</span>
+ </li>
+ <li>
+ <span class="textReplace" id="stage4">Governor Signs</span>
+ </li>
+ <li>
+ <span class="textReplace" id="stage5">Bill Becomes Law</span>
+ </li>
+ </ol>
+ <h2 class="withTimeline">{{ abbr|upper }} Bill: {{ bill.bill_id }}</h2>
+ <p class="smModule">{{ bill.title }}</p>
+
+ <dl class="inlineList">
+ <dt class="contentBottom oneCol">Session:</dt>
+ <dd class="contentBottom customWidth">{{ bill.session }}</dd>
+
+ <dt class="contentBottom oneCol">Chamber:</dt>
+ <dd class="contentBottom">{{ bill.chamber }}</dd>
+
+ <dt class="clear contentBottom">Sponsors ({{ bill.sponsors|length }}):</dt>
+ <dd>
+ <ul class="inlineThirds_module moduleNoBorder">
+ {% for sponsor in bill.sponsors_manager.first_five %}
+ <li><a href="{% url 'legislator' abbr sponsor.leg_id %}">{{ sponsor.name }}</a> ({{ sponsor.legislator.party }}) {{ sponsor.legislator.district }} <span class="tip sideNote">{{ sponsor.type }}</span></li>
+ {% endfor %}
+ {% if remainder %}
+ <li><a class="viewMore" href="#">View {{ bill.sponsors_manager.first_five_remainder }} others</a></li>
+ {% endif %}
+ </ul>
+
+ </dd>
+ </dl>
+ <div class="clear"></div>
+ </div>
+ <div class="eightCol colLt">
+ <h3>Recent Actions</h3>
+ <table class="normalTable">
+ <thead>
+ <tr id="titles">
+ <th>Date</th>
+ <th>Chamber</th>
+ <th></th>
+ <th>Labels</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for action in bill.actions_manager %}
+ <tr class="odd">
+ <td class="tip withTipSm">{{ action.date|date:"M j, Y"}}</td>
+ <td>{{ action.chamber_name }}</td>
+ <td>{{ action.action }}</td>
+ <td>{% for label_text in action.type %}<span class="label">{{label}}</span>{% endfor %}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ <div class="fourCol colRt">
+ <h3>Votes</h3>
+ <ul class="largerList voteChart">
+ <li>
+ <time class="timeHeader" datetime="" class="published" pubdate>Sept 12, 2011</time>
+ <a href="#">HR 1234</a>
+ <ul class="barChart">
+ <li class="yes">
+ <span class="tagValue" style="width:80%;">80%</span>
+ <span class="tagNumber">30 Yes</span>
+ </li>
+ <li class="no clear">
+ <span class="tagValue" style="width:20%;">20%</span>
+ <span class="tagNumber">30 No</span> >
+ </li>
+ </ul>
+ </li>
+ <li>
+ <time class="timeHeader" datetime="" class="published" pubdate>Sept 12, 2011</time>
+ <a href="#">HR 1234</a>
+ <ul class="barChart">
+ <li class="yes">
+ <span class="tagValue" style="width:60%;">60%</span>
+ <span class="tagNumber">30 Yes</span>
+ </li>
+ <li class="no clear">
+ <span class="tagValue" style="width:80%;">80%</span>
+ <span class="tagNumber">30 No</span>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <time class="timeHeader" datetime="" class="published" pubdate>Sept 12, 2011</time>
+ <a href="#">HR 1234</a>
+ <ul class="barChart">
+ <li class="yes">
+ <span class="tagValue" style="width:80%;">80%</span>
+ <span class="tagNumber">30 Yes</span>
+ </li>
+ <li class="no clear">
+ <span class="tagValue" style="width:50%;">50%</span>
+ <span class="tagNumber">30 No</span>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <div class="clear"></div>
+{% endblock %}
+
+
+
<h1>{{ state.name }} {{ chamber_name }}</h1>
<h2>{{ bill.bill_id }}</h2>
<p>{{bill.title}}</p>
@@ -43,6 +161,5 @@
{% endif %}
-{% endblock %}
@@ -139,9 +139,10 @@ <h1 class="withTip h4"><a href="#">Name of News Article</a></h1>
<div class="fullWidth module clear">
<h3 class="moduleTitle">Committees</h3>
<ul class="inlineThirds">
- {% for role in legislator.roles %}
- {% if "committee" in role %}
- <li class="one">{{ role.type|title }} <a href="{% url "committee" abbr role.committee_id %}">{{ role.committee }}{% if role.subcommittee %}{{ role.subcommittee }}{% endif %}</a></li>
+ {% for role in legislator.roles_manager %}
+ {% if 'committee' in role %}
+ <li class="one">{{ role.type|title }}
+ {% if 'committee_id' in role %}<a href="{% url 'committee' abbr role.committee_id %}">{{ role.committee_name }}</a>{% else %}{{ role.committee_name }}{% endif %}</li>
{% endif %}
{% endfor %}
</ul>
@@ -155,7 +156,7 @@ <h3 class="moduleTitle">Bills</h3>
{% for bill in sponsored_bills %}
<li>
<time datetime="" class="published" pubdate>{{bill.most_recent_action.date|date:"F d, Y"}}</time>
- <span class="inlineTitle h4 withTip"><a href="#">{{bill.bill_id}}</a> <span class="tip sideNote">{% for primary in bill.sponsors_manager.primary_list %}{{ primary.name}}{% endfor %}</span></span>
+ <span class="inlineTitle h4 withTip"><a href="{% url 'bill' abbr bill.id %}">{{bill.bill_id}}</a> <span class="tip sideNote">{% for primary in bill.sponsors_manager.primary_list %}{{ primary.name}}{% endfor %}</span></span>
<p class="clear">{{bill.title}}</p>
</li>
{% endfor %}
@@ -183,12 +184,12 @@ <h4 class="withTip">Votes</h4>
<a href="{% url 'vote' abbr vote.bill.id vote_index %}">{{vote.bill.bill_id}}</a>
<ul class="barChart">
<li class="yes">
- <span class="tagValue" style="width:80%;">{{vote.yes_ratio}}%</span>
+ <span class="tagValue" style="width:{{vote.yes_ratio}}%;"></span>
<span class="tagNumber">{{vote.yes_count}} Yes</span>
</li>
<li class="no clear">
- <span class="tagValue" style="width:20%;">{{vote.no_ratio}}%</span>
- <span class="tagNumber">{{vote.no_count}} No</span> >
+ <span class="tagValue" style="width:{{vote.no_ratio}}%;"></span>
+ <span class="tagNumber">{{vote.no_count}} No</span>
</li>
</ul>
</td>
@@ -9,7 +9,7 @@
<div class="fullWidth mainModule">
<div class="eightCol colLt">
<div class="smModule">
- <h2>{{state.name}} {{bill.type}} {{bill.bill_id}}</h2>
+ <h2>{{state.name}} Bill {{bill.bill_id}}</h2>
<p>{{bill.title}}</p>
</div>
<div>
@@ -19,7 +19,7 @@
<h4>Vote Breakdown</h4>
<table>
<thead>
- <tr><th>Vote</th><th>Total</th></tr>
+ <tr><th>Vote</th><th>Total</th><th>Ratio</th></tr>
</thead>
<tbody>
<tr><td>Yes</td><td>{{ vote.yes_count }}</td><td>{{ vote.yes_ratio }}</td></tr>
@@ -31,10 +31,8 @@
</div>
<div class="fourCol colRt">
<div id="billState" class="passed">Passed</div>
- <div id="voteMap" class="withBorder clear">
-
- </div>
- </div>
+ <div id="voteMap" class="withBorder clear"></div>
+ </div>
<div class="clear"></div>
</div>
<div class="module fullWidth clear">
@@ -51,32 +49,14 @@ <h4 class="h5">Yes Votes</h4>
</tr>
</thead>
<tbody>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr>
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr>
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
+ {% for legislator in vote.yes_vote_legislators %}
+ <tr class="{% cycle 'even' 'odd' %}">
+ <td><a href="{% url "legislator" abbr legislator.id %}">{{ legislator.full_name }}</a></td>
+ <td>{{ legislator.district }}</td>
+ <td>{{ legislator.party }}</td>
</tr>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- </tbody>
+ {% endfor %}
+ </tbody>
</table>
</li>
<li class="two">
@@ -90,35 +70,17 @@ <h4 class="h5">No Votes</h4>
</tr>
</thead>
<tbody>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
+ {% for legislator in vote.no_vote_legislators %}
+ <tr class="{% cycle 'even' 'odd' %}">
+ <td><a href="{% url "legislator" abbr legislator.id %}">{{ legislator.full_name }}</a></td>
+ <td>{{ legislator.district }}</td>
+ <td>{{ legislator.party }}</td>
</tr>
- <tr>
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr>
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- </tbody>
+ {% endfor %}
+ </tbody>
</table>
</li>
- <li>
+ <li class="three">
<h4 class="h5">Other</h4>
<table>
<thead>
@@ -129,17 +91,14 @@ <h4 class="h5">Other</h4>
</tr>
</thead>
<tbody>
- <tr class="odd">
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
- </tr>
- <tr>
- <td><a href="#">Legislator Name</a></td>
- <td>13</td>
- <td>D</td>
+ {% for legislator in vote.OTHER_vote_legislators %}
+ <tr class="{% cycle 'even' 'odd' %}">
+ <td><a href="{% url "legislator" abbr legislator.id %}">{{ legislator.full_name }}</a></td>
+ <td>{{ legislator.district }}</td>
+ <td>{{ legislator.party }}</td>
</tr>
- </tbody>
+ {% endfor %}
+ </tbody>
</table>
</li>
</ul>

0 comments on commit cb593ee

Please sign in to comment.