Skip to content
This repository was archived by the owner on Jan 18, 2019. It is now read-only.

Commit 5a08214

Browse files
committed
style fixes in credits,states page
1 parent 8d9e34d commit 5a08214

13 files changed

+91
-30
lines changed

credits.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# Credits
2-
3-
## [R-project](https://www.r-project.org/)
4-
For importing 100,000 row tables into csv
5-
6-
## [Data{Meet}](http://datameet.org/)
7-
Most of the geolocation polygons were cleanup by the Datameet team and others. They have been given for use on [github](https://github.com/datameet).
8-
9-
## [Association for Democratic Reforms](http://adrindia.org/)
1+
[![DataMeet](/images/credits/datameet.png)](http://datameet.org/ "Most of the geolocation polygons were cleanup by the Datameet team and others. They have been given for use on github")
2+
[![Association for Democratic Reforms](/images/credits/logo-adr.png)](http://adrindia.org/) [![ADR](/images/credits/myneta-logo.jpg)](http://myneta.info)
3+
[![OpenSteepMap](/images/credits/osm.jpg)](https://openstreetmap.org/)
4+
[![Yii Framework](/images/credits/yii.png)](https://www.yiiframework.com/)
5+
[![R Project](/images/credits/rlogo.png "For importing 100,000 row tables into csv")](https://www.r-project.org/)

css/main.css

+10
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,14 @@ table.detail-view tr.w3w td
366366
font-size: 1em;
367367
padding-left: 0.6em;
368368
padding-right: 0.6em;
369+
}
370+
371+
div.chmin
372+
{
373+
min-height: 175px;
374+
}
375+
376+
div.states div.chmin img.picture
377+
{
378+
margin-top: -35px;
369379
}

protected/composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"require": {
33
"salavert/open-location-code": "1.*",
44
"deployer/deployer": "^6.1",
5-
"twbs/bootstrap": "4.1.1"
5+
"twbs/bootstrap": "4.1.1",
6+
"erusev/parsedown": "^1.7"
67
},
78
"require-dev": {
89
"phpunit/phpunit": "~4.8"

protected/composer.lock

+47-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protected/models/AssemblyPolygon.php

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class AssemblyPolygon extends CActiveRecord
5959
var $ctr9;
6060
var $ctr10;
6161
var $ctr11;
62+
var $cm;
63+
var $gov;
6264

6365
public function behaviors()
6466
{
@@ -236,6 +238,8 @@ static function repACs()
236238
vpr.polygons as ctr9,
237239
vpr.villages as ctr10,
238240
max(e.edate) as ctr11,
241+
(select id_officer from officer o where o.fkey_place=t.id_state and o.desig='CHIEFMINISTER' limit 0,1) as `cm`,
242+
(select id_officer from officer o where o.fkey_place=t.id_state and o.desig IN ('LGOVERNER','GOVERNER') limit 0,1) as `gov`,
239243
t.id_state",
240244
'join' => 'left join `village-polygon-report` vpr on vpr.id_state=t.id_state
241245
left join elections e on e.id_state=t.id_state',
@@ -261,6 +265,8 @@ static function repACs()
261265
$r->ctr10,
262266
$r->id_state,
263267
$r->ctr11,
268+
'cm' => $r->cm,
269+
'gov' => $r->gov,
264270
];
265271

266272
$mx = $data [1];

protected/views/layouts/_guestmenu.php

-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727
'/site/contact'
2828
)
2929
),
30-
array (
31-
'label' => __ ( 'Credits' ),
32-
'url' => array (
33-
'/site/page',
34-
'view' => 'credits'
35-
)
36-
),
3730
[
3831
'encodeLabel' => false,
3932
'label' => "<i class='fa fa-github'></i>",

protected/views/layouts/_usermenu.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
$this->widget ( 'zii.widgets.CMenu',array (
33
'items' => array (
44
array (
5-
'label' => __ ( 'Home' ),
5+
'label' => __ ( 'States' ),
66
'url' => array (
7-
'/site/index'
7+
'/state'
88
)
99
),
1010
array (

protected/views/layouts/main.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class="twitter-follow-button" data-show-count="false">Follow
5151
@adoptrti</a>
5252
</div>
5353

54-
<div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
54+
<div id="logo"><?php echo CHtml::link(CHtml::encode(Yii::app()->name),['/'],['style' => 'color: white']); ?></div>
5555

5656
</div>
5757
<!-- header -->
@@ -120,7 +120,10 @@ class="twitter-follow-button" data-show-count="false">Follow
120120
<?=`git describe --tags --abbrev=0`?> <i class="fa fa-calendar"></i> <?=`git log --pretty="%ci" -n1 HEAD`?>
121121
</p>
122122
<p>
123-
<?=__('Copyright &copy; {year} by Vikas Yadav.',['{year}' => date('Y')])?> <?=__('All Rights Reserved.')?> <?=CHtml::link(__('Disclaimer'),['site/page','view' => 'disclaimer']) ?><br />
123+
<?=__('Copyright &copy; {year} by Vikas Yadav.',['{year}' => date('Y')])?> <?=__('All Rights Reserved.')?>
124+
<?=CHtml::link(__('Disclaimer'),['site/page','view' => 'disclaimer']) ?>
125+
<?=CHtml::link(__('Credits'),['site/page','view' => 'credits']) ?>
126+
<br />
124127
</p>
125128

126129
</div>

protected/views/site/pages/credits.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
);
88

99
$text = file_get_contents(Yii::app()->basePath . '/../Credits.md');
10-
$md = new CMarkdown;
11-
echo $md->transform($text);
10+
$md = new Parsedown;
11+
echo $md->text($text);
1212

1313
?>

protected/views/site/report.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@
154154
'type' => 'raw',
155155
'value' => function ($data)
156156
{
157-
return CHtml::link($data [0],['state/view','id' => $data[11]]);
157+
$cm2 = isset($data['cm']) ? '+1' : '+0';
158+
$cm2 .= isset($data['gov']) ? '+1' : '+0';
159+
return CHtml::link($data [0],['state/view','id' => $data[11]]) . $cm2;
158160
}
159161
],
160162
[

protected/views/state/_chiefminister.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/* @var $this Controller */
33
/* @var $officer Officer */
4-
4+
$h3 = isset($h3) ? $h3 : false;
55
$data = Officer::model()->localized(Yii::app()->language)->findByPk($officer->id_officer);
66
switch($data->desig)
77
{
@@ -14,8 +14,8 @@
1414
}
1515
?>
1616
<div class="view chmin <?=empty ( $data->picture ) ? '' : 'pic'?>">
17-
<h2><?=$h2title?></h2>
1817
<?php
18+
echo CHtml::tag($h3 ? 'h3' : 'h2',[],$h2title);
1919
if (! empty ( $data->picture ))
2020
echo CHtml::image ( '/images/pics/' . $data->picture, $data->name, [
2121
'class' => 'picture amly'

protected/views/state/_stateeditor.php

+3
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@
2525
else
2626
echo CHtml::link(__('Edit Governer'),['officer/update','id' => $state->governer->id_officer]);
2727
?>
28+
<li><?php
29+
echo CHtml::link(__('Add District Division'),['localgov/district/creatediv','id_state' => $state->id_state]);
30+
?>
2831
</ol>
2932
</div>

protected/views/state/_view.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
/* @var $data State */
44
?>
55

6-
<div class="view">
7-
<?php echo CHtml::link($data->name,['state/view','id' => $data->id_state]); ?>
6+
<div class="view states">
7+
<?php echo CHtml::tag('h2',[],CHtml::link($data->name,['state/view','id' => $data->id_state])); ?>
88
<?php
9-
if(isset($data->chiefminister)) $this->renderPartial('_chiefminister',['officer' => $data->chiefminister]);
9+
if(isset($data->chiefminister))
10+
$this->renderPartial('_chiefminister',['officer' => $data->chiefminister,'h3' => true]);
1011
?>
1112
</div>

0 commit comments

Comments
 (0)