Refactor project structure
This commit is contained in:
17
core/modules/attendance/dashboard.html
Normal file
17
core/modules/attendance/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="col-lg-3 col-xs-12">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner">
|
||||
<h3 id="lastPunchTime">
|
||||
<t>Punch In</t>
|
||||
</h3>
|
||||
<p><t>or</t> <t>Punch Out</t></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-ios7-alarm-outline"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="atteandanceLink">
|
||||
<t>Record Attendance</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
79
core/modules/attendance/index.php
Normal file
79
core/modules/attendance/index.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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 = 'attendance';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
$useServerTime = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Use Department Time Zone');
|
||||
$photoAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Photo Attendance');
|
||||
$currentEmployeeTimeZone = \Classes\BaseService::getInstance()->getCurrentEmployeeTimeZone();
|
||||
if(empty($currentEmployeeTimeZone)){
|
||||
$useServerTime = 0;
|
||||
}
|
||||
?><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="tabAttendance" href="#tabPageAttendance"><?=t('Attendance')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageAttendance">
|
||||
<div id="Attendance" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<style>
|
||||
#Attendance .dataTables_filter label{
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var modJsList = [];
|
||||
modJsList['tabAttendance'] = new AttendanceAdapter('Attendance','Attendance','','in_time desc');
|
||||
modJsList['tabAttendance'].setUseServerTime(<?=$useServerTime?>);
|
||||
modJsList['tabAttendance'].setPhotoAttendance(<?=$photoAttendance == '1'?>);
|
||||
modJsList['tabAttendance'].setRemoteTable(true);
|
||||
modJsList['tabAttendance'].updatePunchButton(true);
|
||||
|
||||
|
||||
var modJs = modJsList['tabAttendance'];
|
||||
|
||||
</script>
|
||||
<div class="modal" id="PunchModel" 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;">Punch Time</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="max-height:530px;" id="AttendanceForm">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
15
core/modules/attendance/meta.json
Normal file
15
core/modules/attendance/meta.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Attendance",
|
||||
"menu": "Time Management",
|
||||
"order": "2",
|
||||
"icon": "fa-clock-o",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 102,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Attendance\\Common\\Model",
|
||||
"manager": "\\Attendance\\User\\Api\\AttendanceModulesManager"
|
||||
}
|
||||
31
core/modules/attendance/templates/form_template.html
Normal file
31
core/modules/attendance/templates/form_template.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<form class="form-horizontal" id="_id_" role="form">
|
||||
<div class="box-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="_id__error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row photoAttendance" style="background: #f3f4f5; padding: 10px;">
|
||||
<div class="col-sm-5">
|
||||
<video id="attendnaceVideo" height="156" width="208" autoplay style="border: 1px #222 dotted;"></video>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button style="margin-top:90px;" class="attendnaceSnap btn btn-primary pull-right"><i class="fa fa-camera"></i></button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<canvas id="attendnaceCanvas" height="156" width="208" style="border: 1px #222 dotted;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
_fields_
|
||||
|
||||
<div class="control-group row">
|
||||
<div class="controls col-sm-9">
|
||||
<button class="saveBtn btn btn-primary pull-right"><i class="fa fa-save"></i> <t>Save</t></button>
|
||||
<button class="cancelBtn btn pull-right" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> <t>Cancel</t></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user