Skip to content

Commit cddc5c6

Browse files
committed
Titles change based on election type
1 parent a8b6cbf commit cddc5c6

5 files changed

Lines changed: 15 additions & 3 deletions

File tree

boost/boost.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
*/
77

88
$proper_name = 'Election';
9-
$version = '2.1.1';
9+
$version = '2.1.2';
1010
$import_sql = true;
1111
$image_dir = true;

boost/update.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ function election_update(&$content, $version)
7474
$content[] = '+ Added travis';
7575
$content[] = '+ Updated babel compiler';
7676
$content[] = '</pre>';
77+
78+
case version_compare($version, '2.1.2', '<'):
79+
$content[] = '<pre>';
80+
$content[] = '2.1.2';
81+
$content[] = '------';
82+
$content[] = '+ Titles change based on election type';
83+
$content[] = '</pre>';
7784
}
7885

7986
return true;

class/Controller/User.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ public static function loadNavBar()
9494
$vars['is_admin'] = \Current_User::allow('election');
9595
$vars['logout_uri'] = $auth->logout_link;
9696
$vars['username'] = \Current_User::getDisplayName();
97+
if (\phpws\PHPWS_Settings::get('election', 'studentLevelAllowed') == 'U') {
98+
$vars['election_type'] = 'SGA';
99+
} else {
100+
$vars['election_type'] = 'Graduate';
101+
}
97102
$template = new \phpws2\Template($vars);
98103
$template->setModuleTemplate('election', 'navbar.html');
99104
$content = $template->get();

javascript/User/Election.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ const Finished = (props) => {
410410
<div className="col-sm-6 col-sm-offset-3">
411411
<div className="well text-center">
412412
<h2>{props.election.title}</h2>
413-
<h3>Thank you for voting! Watch SGA for results.</h3>
413+
<h3>Thank you for voting! Check our website for results.</h3>
414414
<a
415415
href="./index.php?module=users&action=user&command=logout"
416416
className="btn btn-lg btn-primary">Sign out</a>

templates/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span class="icon-bar"></span>
77
<span class="icon-bar"></span>
88
</button>
9-
<span class="navbar-brand">SGA Elections</span>
9+
<span class="navbar-brand"><?=$election_type?> Elections</span>
1010
</div>
1111
<!-- Collect the nav links, forms, and other content for toggling -->
1212
<div class="collapse navbar-collapse">

0 commit comments

Comments
 (0)