Skip to content

Commit

Permalink
Titles change based on election type
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardog committed Feb 28, 2018
1 parent a8b6cbf commit cddc5c6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion boost/boost.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
*/

$proper_name = 'Election';
$version = '2.1.1';
$version = '2.1.2';
$import_sql = true;
$image_dir = true;
7 changes: 7 additions & 0 deletions boost/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ function election_update(&$content, $version)
$content[] = '+ Added travis';
$content[] = '+ Updated babel compiler';
$content[] = '</pre>';

case version_compare($version, '2.1.2', '<'):
$content[] = '<pre>';
$content[] = '2.1.2';
$content[] = '------';
$content[] = '+ Titles change based on election type';
$content[] = '</pre>';
}

return true;
Expand Down
5 changes: 5 additions & 0 deletions class/Controller/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public static function loadNavBar()
$vars['is_admin'] = \Current_User::allow('election');
$vars['logout_uri'] = $auth->logout_link;
$vars['username'] = \Current_User::getDisplayName();
if (\phpws\PHPWS_Settings::get('election', 'studentLevelAllowed') == 'U') {
$vars['election_type'] = 'SGA';
} else {
$vars['election_type'] = 'Graduate';
}
$template = new \phpws2\Template($vars);
$template->setModuleTemplate('election', 'navbar.html');
$content = $template->get();
Expand Down
2 changes: 1 addition & 1 deletion javascript/User/Election.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ const Finished = (props) => {
<div className="col-sm-6 col-sm-offset-3">
<div className="well text-center">
<h2>{props.election.title}</h2>
<h3>Thank you for voting! Watch SGA for results.</h3>
<h3>Thank you for voting! Check our website for results.</h3>
<a
href="./index.php?module=users&action=user&command=logout"
className="btn btn-lg btn-primary">Sign out</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">SGA Elections</span>
<span class="navbar-brand"><?=$election_type?> Elections</span>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse">
Expand Down

0 comments on commit cddc5c6

Please sign in to comment.