Skip to content

Commit

Permalink
Oops, include the template for the last commit. #15.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Conway committed Aug 29, 2012
1 parent 24f1e57 commit 4c7e4b5
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions app/views/Admin/agenciesMultiAreas.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#{extends 'main.html' /}
#{set title:'Merge Metro Areas - Transit Data Dashboard Administration' /}

<div class="container">
<div class="row">
<div class="span6">
<ul>
#{list items:agenciesMultiAreas, as:'agency'}
<li><a href="#" class="agencyLink" id="link-${agency.id}">${agency.toString()}</a></li>
#{/list}
</ul>
</div>

#{list items:metros.keySet(), as:'agencyId' }
<div class="span6 hidden agencyDetail" id="agency-${agencyId}">
<ul>
#{list items:metros.get(agencyId), as:'metro'}
<li>${metro.name}</li>
#{/list}
</ul>

<div class="btn-group">
<a href="mergeAllAreas?agency.id=${agencyId}" class="btn btn-danger">Merge all</a>
<a href="splitToAreas?agency.id=${agencyId}" class="btn">Split to each</a>
<a href="disableAgency?agency.id=${agencyId}" class="btn">Disable</a>
</ul>
</div>
#{/list}
</div>
</div>

<script type="text/javascript">
$('.agencyLink').click(function (e) {
e.preventDefault();
var id = $(this).attr('id').split('-')[1];

$('.agencyDetail').addClass('hidden');
$('#agency-' + id).removeClass('hidden');
});
</script>

0 comments on commit 4c7e4b5

Please sign in to comment.