Skip to content

Commit

Permalink
Minor copy and ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
philipashlock committed Dec 17, 2012
1 parent 455ba04 commit 7a8b9ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions application/controllers/restdb.php
Expand Up @@ -115,6 +115,8 @@ public function dashboard_get($user = null) {

private function get_user_dbs($user = null) {

$this->load->helper('restdb'); // used for properize

if (empty($user) && !$this->session->userdata('username')) {
redirect('login');
}
Expand All @@ -132,6 +134,7 @@ private function get_user_dbs($user = null) {

if ($query->num_rows() > 0) {
$data['user'] = $query->first_row('array');
$data['user']['name_full'] = properize($data['user']['name_full']);
}

// Then check for database entries for that user
Expand Down
5 changes: 5 additions & 0 deletions application/helpers/restdb_helper.php
Expand Up @@ -27,4 +27,9 @@ function slugify( $text ) {
return $text;
}


function properize($string) {
return $string.'\''.($string[strlen($string) - 1] != 's' ? 's' : '');
}

?>
2 changes: 2 additions & 0 deletions application/views/frontpage_view.php
Expand Up @@ -19,6 +19,8 @@
</ul>

<h4 style="margin-top : 2em">Requirements</h4>

<p>Each instance is meant to be multiuser with Github for user authentication and you're free to use this instance by <a href="/login">logging in</a>, but it's also very easy to install your own copy with these basic requirements:</p>
<ul>
<li>PHP 5.3</li>
<li>MySQL (for storing user data and connection settings)</li>
Expand Down
4 changes: 2 additions & 2 deletions application/views/header_inc_view.php
Expand Up @@ -17,8 +17,8 @@

<?php $page_title = (!empty($page['title'])) ? $page['title'] : null?>

<li<?php if($page_title == 'Download') echo ' class="active"'?>><a href="/">Download</a></li>
<li<?php if($page_title == 'Developers') echo ' class="active"'?>><a href="/">Developers</a></li>
<li<?php if($page_title == 'Download') echo ' class="active"'?>><a href="https://github.com/philipashlock/RESTdb/archive/master.zip">Download</a></li>
<li<?php if($page_title == 'Developers') echo ' class="active"'?>><a href="https://github.com/philipashlock/RESTdb/">Developers</a></li>
<li<?php if($page_title == 'About') echo ' class="active"'?>><a href="/">About</a></li>
</ul>

Expand Down
5 changes: 5 additions & 0 deletions application/views/user_view.php
Expand Up @@ -40,6 +40,11 @@

echo '</table>';

} else {
?>
<p>
You haven't added any datasets yet. You can start by either <a href="/upload">Uploading a CSV</a> or <a href="/new">Connecting a Database</a>.
<?php
}
?>

Expand Down

0 comments on commit 7a8b9ca

Please sign in to comment.