Add prototype for a settings page

This commit is contained in:
Karsten Heiken
2011-07-31 19:10:43 +02:00
parent 29f9424a66
commit c648715fd0
2 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* @author Karsten Heiken, karsten@disposed.de
*/
class Settings extends CI_Controller {
/**
* Constructor.
*/
public function __construct() {
parent::__construct();
$this->load->model('program');
// load language file
$this->lang->load(strtolower($this->router->class));
}
/**
* Show a list of all available programs.
*/
public function index() {
$profile = $this->user->profile();
$profile_fields = array(
array('firstname', 'Vorname', 'text'),
array('lastname', 'Nachname', 'text'),
array('intitution', 'Institution', 'text'),
);
$tpl['profile'] = $profile;
$tpl['profile_fields'] = $profile_fields;
$this->load->view('user/settings', $tpl);
}
}

View File

@@ -0,0 +1,41 @@
<?php $this->load->view('header'); ?>
<div id="content">
<form action="#" method="post">
<div class="title">
<h2>Einstellungen</h2>
</div>
<ul class="tabs">
<li class="active"><a href="#personal">Persönliche Daten</a></li>
<li><a href="#settings">Einstellungen</a></li>
</ul>
<div class="tab_container">
<div id="personal" class="tab_content">
<table>
<?
foreach($profile_fields as $field):
?>
<tr>
<td><?=$field[1]?></td>
<td><input type="<?=$field[2]?>" name="<?=$field[0]?>" class="text"</td>
</tr>
<?
endforeach;
?>
</table>
</div>
<div id="settings" class="tab_content">
<ul>
<li>
<input type="checkbox" id="projects_sortrecently" name="projects_sortrecently" value="1" class="checkbox"/>
<label for="projects_sortrecently">Projekte nach Zeitpunkt des letzten Zugriffs sortieren</label><br />
<label class="note">Werden die Projekte nach dem Zeitpunkt des letzten Zugriffs sortiert, &quot;rutschen&quot; die selten verwendeten Projekte in der Liste nach unten.</label>
</li>
</ul>
</div>
</div>
</form>
</div>
<?php $this->load->view('footer'); ?>