Begin implementing user management
This commit is contained in:
73
application/views/admin/users/create.php
Normal file
73
application/views/admin/users/create.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php $this->load->view('header');?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><?=lang('create_user');?></h2>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<form name="createUser" method="post" action="<?=site_url('users/create')?>">
|
||||
<h3>Required information</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<?=form_label("Username", 'username');?>
|
||||
<div>
|
||||
<input type="text" name="username" id="username" class="short text" value="<?=set_value('username');?>" />
|
||||
<?=form_error('username')?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<?=form_label("Password", 'password');?>
|
||||
<div>
|
||||
<input type="password" name="password" id="password" class="short text" />
|
||||
<?=form_error('password')?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<?=form_label("Confirm password", 'password2');?>
|
||||
<div>
|
||||
<input type="password" name="password_confirm" id="password_confirm" class="short text" />
|
||||
<?=form_error('password_confirm')?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<?=form_label("First name", 'firstname');?>
|
||||
<div>
|
||||
<input type="text" name="firstname" id="firstname" class="short text" value="<?=set_value('firstname');?>" />
|
||||
<?=form_error('firstname')?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<?=form_label("Last name", 'lastname');?>
|
||||
<div>
|
||||
<input type="text" name="lastname" id="lastname" class="short text" value="<?=set_value('lastname');?>" />
|
||||
<?=form_error('lastname')?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Optional information</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<?=form_label("Institution", 'institution');?>
|
||||
<div>
|
||||
<input type="text" name="institution" id="institution" class="medium text" value="<?=set_value('institution');?>" />
|
||||
<?=form_error('institution')?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<?=form_label("Language", 'language');?>
|
||||
<div>
|
||||
<?=form_dropdown('language', array('English'), null, 'id="language" class="drop"');?>
|
||||
<?=form_error('language')?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a class="button save" href="javascript:void(0);" onclick="$('form[name=createUser]').submit();">Speichern</a>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('footer');?>
|
||||
38
application/views/admin/users/index.php
Normal file
38
application/views/admin/users/index.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php $this->load->view('header');?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><?=lang('users');?></h2>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h3><?=lang('available_users');?></h3>
|
||||
<table class="tableList paginated">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?=lang('username');?></th>
|
||||
<th scope="col"><?=lang('realname');?></th>
|
||||
<th scope="col"><?=lang('options');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
foreach ($users as $user):
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$user['username'];?></td>
|
||||
<td><?=$user['firstname'];?> <?=$user['lastname'];?></td>
|
||||
<td><?=anchor('users/edit/' . $user['id'], lang('user_edit'));?> | <?=anchor('users/delete/' . $user['id'], lang('user_delete'));?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><a class="button add" href="<?=site_url('users/create')?>"><?=lang('user_create');?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('footer');?>
|
||||
Reference in New Issue
Block a user