Permalink
Browse files

basic styling with bootsrtap

  • Loading branch information...
minipai committed Jul 31, 2014
1 parent 6227d3e commit 9db589ec9c13b79254a2edbecb3eed6eb1c8a404
Showing with 36 additions and 26 deletions.
  1. +28 −20 View/Areas/index.ctp
  2. +3 −2 View/Candidates/index.ctp
  3. +1 −0 View/Elements/paginator.ctp
  4. +4 −4 View/Layouts/default.ctp
View
@@ -1,27 +1,32 @@
<div id="AreasAdminIndex">
<h3>行政區</h3>
<?php
if (!empty($parents)) {
foreach ($parents AS $parent) {
$this->Html->addCrumb($parent['Area']['name'], array('action' => 'index', $parent['Area']['id']));
}
echo $this->Html->getCrumbs();
<?php
if (!empty($parents)) {
foreach ($parents AS $parent) {
$this->Html->addCrumb($parent['Area']['name'], array('action' => 'index', $parent['Area']['id']));
}
?>
}
?>
<div id="AreasAdminIndex">
<h3><?php echo $this->Html->link('行政區', '/areas', array('class' => '')); ?></h3>
<hr>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-2">
<ul class="nav nav-pills nav-stacked">
<?php foreach ($items as $item): ?>
<li>
<?php echo $this->Html->link($item['Area']['name'], array('action' => 'index', $item['Area']['id']), array('class' => ''));?>
</li>
<?php endforeach ?>
<div class="col-md-12">
<div class="panel panel-default">
<ul class="nav nav-pills">
<?php foreach ($items as $item): ?>
<li>
<?php echo $this->Html->link($item['Area']['name'], array('action' => 'index', $item['Area']['id']), array('class' => ''));?>
</li>
<?php endforeach ?>
</ul>
</ul>
</div>
</div>
<div class="col-md-10">
<div class="col-md-12">
<?php
if (!empty($elections)) {
@@ -36,9 +41,12 @@
$cLinkId = $e['Election']['id'];
$c[] = $e['Election']['name'];
}
echo '<h3>' . $this->Html->link(implode(' > ', $c), '/candidates/index/' . $cLinkId);
echo '<hr>';
echo '<h4>' . $this->Html->link(implode(' > ', $c), '/candidates/index/' . $cLinkId);
echo $this->Html->link("新增 {$eType} 候選人", array('controller' => 'candidates', 'action' => 'add', $election['AreasElection']['Election_id']), array('class' => 'btn btn-primary pull-right col-md-2'));
echo '</h3>';
echo '</h4>';
if (!empty($election['Candidate'])) {
foreach ($election['Candidate'] AS $candidate) {
?><div class="col-md-2" style="text-align: center;">
@@ -30,6 +30,7 @@
'div' => 'form-group',
'value' => $keyword,
'label' => false,
'class' => 'form-control'
));
echo '<div class="btn-group">';
echo $this->Form->submit('搜尋(人名)', array('div' => false, 'class' => 'btn btn-primary'));
@@ -41,8 +42,8 @@
<?php
if (!empty($items)) {
foreach ($items AS $candidate) {
?><div class="col-md-2 btn btn-default" style="text-align: center;">
<a href="<?php echo $this->Html->url('/candidates/view/' . $candidate['Candidate']['id']); ?>">
?><div class="col-md-2">
<a class="thumbnail text-center" href="<?php echo $this->Html->url('/candidates/view/' . $candidate['Candidate']['id']); ?>">
<?php
if (empty($candidate['Candidate']['image'])) {
echo $this->Html->image('candidate-not-found.jpg', array('style' => 'width: 100px; border: 0px;'));
@@ -3,6 +3,7 @@
if (!isset($url)) {
$url = array();
}
echo $this->Paginator->first('<<', array('url' => $url));
echo ' &nbsp; ' . $this->Paginator->prev('<', array('url' => $url));
echo ' &nbsp; ' . $this->Paginator->numbers(array('url' => $url));
View
@@ -38,9 +38,9 @@
<div class="container">
<div id="header">
<h1><?php echo $this->Html->link('選舉黃頁', '/'); ?></h1>
<div class="breadcrumb">
<?php echo $this->Html->getCrumbs() ?>
</div>
</div>
<div id="content">
@@ -69,7 +69,7 @@
<div id="viewContent"><?php echo $content_for_layout; ?></div>
</div>
<div id="footer" class="container">
--<br />
<hr />
<?php echo $this->Html->link('江明宗 . 政 . 路過', 'http://k.olc.tw/', array('target' => '_blank')); ?>
/ <?php echo $this->Html->link('關於選舉黃頁', '/pages/about'); ?>
<?php if (!$this->Session->read('Auth.User.id')): ?>

0 comments on commit 9db589e

Please sign in to comment.