Skip to content

Commit

Permalink
nice tabs on member page
Browse files Browse the repository at this point in the history
  • Loading branch information
daonb committed May 22, 2012
1 parent 6e27f76 commit 28b0cb1
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 54 deletions.
1 change: 1 addition & 0 deletions public/js/apps/member.js
Expand Up @@ -2,6 +2,7 @@ define([
'jquery',
'eventbox',
'datatables',
'btabs',
'mustache'
], function ($, Ebox) {
var Mustache = window.Mustache;
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions views/member/index.html
Expand Up @@ -37,6 +37,7 @@
plugins : 'lib',
eventbox : 'lib/eventbox',
datatables : 'lib/jquery.dataTables.min',
btabs : 'lib/bootstrap-tab',
mustache : 'lib/mustache'
},
callback: function () {
Expand Down
131 changes: 77 additions & 54 deletions views/member/show.html
Expand Up @@ -39,73 +39,95 @@ <h1>
<div class="span9">
<ul class="nav nav-tabs">
<li class="active">
<a href="#">דגלים</a>
<a href="#agendas-tab" data-toggle="tab">דגלים</a>
</li>
<li>
<a href="#">חקיקה</a>
<a href="#bills-tab" data-toggle="tab">חקיקה</a>
</li>
<li>
<a href="#">ועדות</a>
<a href="#committees-tab" data-toggle="tab">ועדות</a>
</li>
<li>
<a href="#">שטף</a>
<a href="#stream-tab" data-toggle="tab">שטף</a>
</li>
</ul>
<div id="bills-tab">
<h3>הצעות המחכות על שולחן הכנסת ({{bills_stats_proposed}})</h3>
<h3>הצעות המחכות לקריאה ראשונה ({{bills_stats_pre}})</h3>
<h3>הצעות המחכות לדיון בוועדה ({{bills_stats_first}})</h3>
<h3>הצעות שאושרו ({{bills_stats_first}})</h3>
</div>

<div id="agendas-tab">
<table class="table table-striped">
<thead>
<tr>
<th style="vertical-align: top;"></th>
<th class="score-bar">
<div style="width:100%">
<h4 style="float:right; width: 33%; margin: 0 0.2em 0.2em 0;text-align:right;">מתנגד</h4>
<h4 style="float:right; width: 33%; margin-bottom:0.2em;">אדיש</h4>
<h4 style="float:right; width: 33%; margin-bottom:0.2em;text-align:left;">תומך</h4>
<div style="clear:right;"></div>
<div class="tab-content">
<div id="agendas-tab" class="tab-pane">
<table class="table table-striped">
<thead>
<tr>
<th style="vertical-align: top;"></th>
<th class="score-bar">
<div style="width:100%">
<h4 style="float:right; width: 33%; margin: 0 0.2em 0.2em 0;text-align:right;">מתנגד</h4>
<h4 style="float:right; width: 33%; margin-bottom:0.2em;">אדיש</h4>
<h4 style="float:right; width: 33%; margin-bottom:0.2em;text-align:left;">תומך</h4>
<div style="clear:right;"></div>

</div>
<div class="progress" style="height:3em;">
<div class="bar all" style="height:100%;width:80%; right:10%">
<p style="padding-right:0.5em; text-align:right;"><em>חברי הכנסת</em></p>
</div>
<div class="bar party" style="width:40%; right:40%; height:3em; margin-top:0.5em"></div>
<p style="height:3em; position:absolute; margin-top:1em; width:40%; right:40%">
<em>{{#party}}{{name}}{{/party}}</em>
</p>
</div>
<div class="progress" style="height:3em;">
<div class="bar all" style="height:100%;width:80%; right:10%">
<p style="padding-right:0.5em; text-align:right;"><em>חברי הכנסת</em></p>
</div>
<div class="bar party" style="width:40%; right:40%; height:3em; margin-top:0.5em"></div>
<p style="height:3em; position:absolute; margin-top:1em; width:40%; right:40%">
<em>{{#party}}{{name}}{{/party}}</em>
</p>
</div>

</th>
</thead>
<tbody id="agendas">
</th>
</thead>
<tbody id="agendas">
<tr>
<td colspan="2">טוען...</td>
</tr>
</tbody>
</table>
{{=<% %>=}}<script type="text/html" id="agenda-template">
{{#agendas}}
<tr>
<td colspan="2">טוען...</td>
<td>
<a href="{{absolute_url}}">{{name}}</a>
מאת: {{owner}}
</td>
<td class="score-bar">
<div class="progress">
<div id="agenda-bar-{{id}}" class="bar all"></div>
<div id="agenda-bar-party-{{id}}" class="bar party" style="opacity:1;"></div>
<div id="agenda-score-{{id}}" class="score"></div>
</div>
</td>
</tr>
</tbody>
</table>
{{=<% %>=}}<script type="text/html" id="agenda-template">
{{#agendas}}
<tr>
<td>
<a href="{{absolute_url}}">{{name}}</a>
מאת: {{owner}}
</td>
<td class="score-bar">
<div class="progress">
<div id="agenda-bar-{{id}}" class="bar all"></div>
<div id="agenda-bar-party-{{id}}" class="bar party" style="opacity:1;"></div>
<div id="agenda-score-{{id}}" class="score"></div>
</div>
</td>
</tr>
{{/agendas}}
</script><%={{ }}=%>
{{/agendas}}
</script><%={{ }}=%>
</div>

<div id="bills-tab" class="tab-pane">
<h3>הצעות המחכות על שולחן הכנסת ({{bills_stats_proposed}})</h3>
<h3>הצעות המחכות לקריאה ראשונה ({{bills_stats_pre}})</h3>
<h3>הצעות המחכות לדיון בוועדה ({{bills_stats_first}})</h3>
<h3>הצעות שאושרו ({{bills_stats_first}})</h3>
<table>
<thead>
<tr>
<th>שם</th>
<th>שלב</th>
<th>תאריך עדכון אחרון</th>
</tr>
</thead>
<tbody id="bills">
</tbody>
<script type="text/html" id="bill-template">
{{#objects}}
<tr>
<td><a href="{{absolute_url}}">{{full_title}}</a></td>
<td>{{stage}}</td>
<td>{{stage_date}}</td>
</tr>
{{/objects}}
</script>
</table>
</div>
</div>
</div>
</div>
Expand All @@ -121,6 +143,7 @@ <h4 style="float:right; width: 33%; margin-bottom:0.2em;text-align:left;">תומ
plugins : 'lib',
eventbox : 'lib/eventbox',
datatables : 'lib/jquery.dataTables.min',
btabs : 'lib/bootstrap-tab',
mustache : 'lib/mustache'
},
callback: function () {
Expand Down

0 comments on commit 28b0cb1

Please sign in to comment.