Refactor project structure
This commit is contained in:
17
core/admin/users/dashboard.html
Normal file
17
core/admin/users/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="col-lg-3 col-xs-12">
|
||||
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3><t>Users</t></h3>
|
||||
<p id="numberOfUsers">
|
||||
#_numberOfUsers_# <t>Users</t>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-person-add"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="usersLink">
|
||||
<t>Manage</t> <t>Users</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
17
core/admin/users/emailTemplates/welcomeUser.html
Normal file
17
core/admin/users/emailTemplates/welcomeUser.html
Normal file
@@ -0,0 +1,17 @@
|
||||
Dear #_name_#,<br/><br/>
|
||||
Your account in <b>IceHrm</b> has been created on <a href="#_url_#">#_url_#</a><br/><br/>
|
||||
|
||||
<b>Please find your account information below:</b><br/><br/>
|
||||
Username: <b>#_username_#</b><br/>
|
||||
Email: <b>#_email_#</b> (You can use, username or email to login)<br/>
|
||||
Password: <b>#_password_#</b> (Strongly advised to change this password once logged in)<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
To get started, follow this link: <b><a href="#_url_#">#_url_#</a></b><br/><br/>
|
||||
|
||||
<font face="Arial, sans-serif" size="1" color="#4a4a4a">
|
||||
THIS IS AN AUTOMATED EMAIL - REPLIES WILL BE SENT TO #_adminEmail_#
|
||||
</font>
|
||||
<br/>
|
||||
<br/>
|
||||
66
core/admin/users/index.php
Normal file
66
core/admin/users/index.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/*
|
||||
This file is part of iCE Hrm.
|
||||
|
||||
iCE Hrm is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
iCE Hrm is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
||||
*/
|
||||
|
||||
$moduleName = 'users';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
|
||||
?><div class="span9">
|
||||
|
||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
||||
<li class="active"><a id="tabUser" href="#tabPageUser"><?=t('Users')?></a></li>
|
||||
<li class=""><a id="tabUserRole" href="#tabPageUserRole"><?=t('User Roles')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageUser">
|
||||
<div id="User" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="UserForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageUserRole">
|
||||
<div id="UserRole" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="UserRoleForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
modJsList['tabUser'] = new UserAdapter('User');
|
||||
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new" && isset($_REQUEST['object'])){?>
|
||||
modJsList['tabUser'].newInitObject = JSON.parse(Base64.decode('<?=$_REQUEST['object']?>'));
|
||||
<?php }?>
|
||||
modJsList['tabUserRole'] = new UserRoleAdapter('UserRole');
|
||||
var modJs = modJsList['tabUser'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
13
core/admin/users/meta.json
Normal file
13
core/admin/users/meta.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"label": "Users",
|
||||
"menu": "System",
|
||||
"order": "2",
|
||||
"icon": "fa-user",
|
||||
"user_levels": [
|
||||
"Admin"
|
||||
],
|
||||
"dashboardPosition": 3,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Users\\Common\\Model",
|
||||
"manager": "\\Users\\Admin\\Api\\UsersAdminManager"
|
||||
}
|
||||
55
core/admin/users/templates/form_template.html
Normal file
55
core/admin/users/templates/form_template.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<form class="form-horizontal" id="_id_">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="_id__error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
_fields_
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button onclick="try{modJs.save()}catch(e){};return false;" class="btn">Save</button>
|
||||
<button onclick="modJs.cancel();return false;" class="btn">Cancel</button>
|
||||
<button id="changePasswordBtn" onclick="modJs.changePassword();return false;" class="btn btn-primary">Change Password</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="modal" id="adminUsersModel" tabindex="-1" role="dialog" aria-labelledby="messageModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="fa fa-times"/></button>
|
||||
<h3 style="font-size: 17px;">Change User Password</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="adminUsersChangePwd">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="adminUsersChangePwd_error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="field_newpwd">
|
||||
<label class="control-label" for="newpwd">New Password</label>
|
||||
<div class="controls">
|
||||
<input class="" type="password" id="newpwd" name="newpwd" value="" class="form-control"/>
|
||||
<span class="help-inline" id="help_newpwd"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="field_conpwd">
|
||||
<label class="control-label" for="conpwd">Confirm Password</label>
|
||||
<div class="controls">
|
||||
<input class="" type="password" id="conpwd" name="conpwd" value="" class="form-control"/>
|
||||
<span class="help-inline" id="help_conpwd"></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" onclick="modJs.changePasswordConfirm();">Change Password</button>
|
||||
<button class="btn" onclick="modJs.closeChangePassword();">Not Now</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user