Add prototype for a settings page
This commit is contained in:
33
application/controllers/settings.php
Normal file
33
application/controllers/settings.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
41
application/views/user/settings.php
Normal file
41
application/views/user/settings.php
Normal 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, "rutschen" die selten verwendeten Projekte in der Liste nach unten.</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $this->load->view('footer'); ?>
|
||||||
Reference in New Issue
Block a user