* Refact browse page of dept.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<div class='main-header'>
|
||||
<h2><?php echo html::icon($lang->icons['company']);?> <?php echo $lang->company->view;?></h2>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printLink('company', 'edit', '', $lang->edit, '', 'id="editCompany" class="btn btn-primary iframe" data-width="580"', true, true);?>
|
||||
<?php common::printLink('company', 'edit', '', $lang->edit, '', 'id="editCompany" class="btn btn-wide btn-primary iframe" data-width="580"', true, true);?>
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-borderless table-data'>
|
||||
|
||||
@@ -11,27 +11,29 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'><?php echo html::icon($lang->icons['dept']);?> <?php echo $lang->dept->common;?></div>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->dept->common;?></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-sm-4'>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col col-4'>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'><?php echo html::icon($lang->icons['dept']);?> <strong><?php echo $title;?></strong></div>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $title;?></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='container'>
|
||||
<ul class='tree-lines' id='deptTree'></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-8'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='main-col col-8'>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<i class='icon-sitemap'></i> <strong><?php echo $lang->dept->manageChild;?></strong>
|
||||
<div class='panel-title'><?php echo $lang->dept->manageChild;?></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>' class='form-condensed'>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -63,8 +65,10 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<?php echo html::submitButton() . html::backButton() . html::hidden('maxOrder', $maxOrder);?>
|
||||
<input type='hidden' value='<?php echo $deptID;?>' name='parentDeptID' />
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
<?php echo html::hidden('maxOrder', $maxOrder);?>
|
||||
<?php echo html::hidden('parentDeptID', $deptID);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -73,27 +77,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='modal fade' id='addChildModal'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-content'>
|
||||
<div class='modal-header'>
|
||||
<button type='button' class='close' data-dismiss='modal'><span aria-hidden='true'>×</span></button>
|
||||
<h4 class='modal-title'><span class='dept-name'></span> <i class="icon icon-angle-right"></i> <?php echo $lang->dept->add;?></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>' class='form-condensed'>
|
||||
<?php
|
||||
for($i = 0; $i < DEPT::NEW_CHILD_COUNT ; $i ++) echo html::input("depts[]", '', "class='form-control' autocomplete='off'");
|
||||
?>
|
||||
<div class='text-center'>
|
||||
<?php echo html::submitButton() . html::commonButton($lang->close, 'data-dismiss="modal"', 'btn')?>
|
||||
<input type='hidden' value='0' name='parentDeptID' />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
@@ -118,13 +101,13 @@ $(function()
|
||||
sort:
|
||||
{
|
||||
title: '<?php echo $lang->dept->dragAndSort ?>',
|
||||
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><i class="icon icon-move"></i></a>'
|
||||
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><?php echo $lang->sort;?></a>'
|
||||
},
|
||||
edit:
|
||||
{
|
||||
linkTemplate: '<?php echo helper::createLink('dept', 'edit', "deptid={0}"); ?>',
|
||||
title: '<?php echo $lang->dept->edit ?>',
|
||||
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->edit?></a>'
|
||||
template: '<a data-toggle="tooltip" href="javascript:;" data-width="600"><?php echo $lang->edit?></a>'
|
||||
},
|
||||
"delete":
|
||||
{
|
||||
|
||||
@@ -15,32 +15,24 @@ $webRoot = $this->app->getWebRoot();
|
||||
$jsRoot = $webRoot . "js/";
|
||||
?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<div class='modal-dialog w-500px'>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><strong><small class='text-muted'><?php echo html::icon($lang->icons['edit']);?></small> <?php echo $lang->dept->edit;?></strong></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' class='form-condensed' method='post' class='mt-10px' id='dataform'>
|
||||
<table class='table table-form' style='width:100%'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->parent;?></th>
|
||||
<td><?php echo html::select('parent', $optionMenu, $dept->parent, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->name;?></th>
|
||||
<td><?php echo html::input('name', $dept->name, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->manager;?></th>
|
||||
<td><?php echo html::select('manager', $users, $dept->manager, "class='form-control chosen'", true);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::submitButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
|
||||
<table class='table table-form' style='width:100%'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->parent;?></th>
|
||||
<td><?php echo html::select('parent', $optionMenu, $dept->parent, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->name;?></th>
|
||||
<td><?php echo html::input('name', $dept->name, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->manager;?></th>
|
||||
<td><?php echo html::select('manager', $users, $dept->manager, "class='form-control chosen'", true);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<div class="modal-header">
|
||||
<h4 class='modal-title pull-left'><?php echo html::a($this->createLink('todo', 'view', 'todo=' . $todo->id), "TODO #{$todo->id} {$todo->name}");?></h4>
|
||||
</div>
|
||||
|
||||
<form class='modal-body form-horizontal' method='post' target='hiddenwin' id='dataform'>
|
||||
<div class="row form-group">
|
||||
<label class="col-sm-2"><?php echo $lang->todo->date;?></label>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<td colspan='3' class='text-center'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide btn-gray');?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user