Skip to content

Commit

Permalink
Typo fix from Departament to Department
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Oct 17, 2015
1 parent 51e54b7 commit 657cf8f
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<td><?php echo $departament->id?></td>
<td><?php echo htmlspecialchars($departament->name)?></td>
<td><?php echo htmlspecialchars($departament->email)?></td>
<td nowrap><a class="btn btn-default btn-xs" href="<?php echo erLhcoreClassDesign::baseurl('departament/edit')?>/<?php echo $departament->id?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/departments','Edit department');?></a></td>
<td nowrap><a class="btn btn-default btn-xs" href="<?php echo erLhcoreClassDesign::baseurl('department/edit')?>/<?php echo $departament->id?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/departments','Edit department');?></a></td>
</tr>
<?php endforeach; ?>
</table>
Expand All @@ -23,6 +23,6 @@
<?php include(erLhcoreClassDesign::designtpl('lhkernel/paginator.tpl.php')); ?>
<?php endif;?>

<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','create')) : ?>
<a class="btn btn-default" href="<?php echo erLhcoreClassDesign::baseurl('departament/new')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/departments','New department');?></a>
<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','create')) : ?>
<a class="btn btn-default" href="<?php echo erLhcoreClassDesign::baseurl('department/new')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/departments','New department');?></a>
<?php endif;?>
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

<form action="" method="post">

<?php include(erLhcoreClassDesign::designtpl('lhdepartament/form.tpl.php'));?>
<?php include(erLhcoreClassDesign::designtpl('lhdepartment/form.tpl.php'));?>

<?php include(erLhcoreClassDesign::designtpl('lhkernel/csfr_token.tpl.php'));?>

<div class="btn-group" role="group" aria-label="...">
<input type="submit" class="btn btn-default" name="Save_departament" value="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/buttons','Save');?>"/>
<input type="submit" class="btn btn-default" name="Update_departament" value="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/buttons','Update');?>"/>
<input type="submit" class="btn btn-default" name="Cancel_departament" value="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/buttons','Cancel');?>"/>
<?php if ($departament->id != 1 && $currentUser->hasAccessTo('lhdepartament','delete') && $departament->can_delete == true ) : ?><input type="submit" class="btn btn-danger" name="Delete_departament" onclick="return confirm('<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/departments','Are you sure?');?>')" value="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/buttons','Delete department');?>"/><?php endif;?>
<?php if ($departament->id != 1 && $currentUser->hasAccessTo('lhdepartment','delete') && $departament->can_delete == true ) : ?><input type="submit" class="btn btn-danger" name="Delete_departament" onclick="return confirm('<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/departments','Are you sure?');?>')" value="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/buttons','Delete department');?>"/><?php endif;?>
</div>

</form>
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
<li role="presentation" class="active"><a href="#onlinehours" aria-controls="onlinehours" role="tab" data-toggle="tab"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Automate online hours');?></a></li>
<li role="presentation"><a href="#notifications" aria-controls="notifications" role="tab" data-toggle="tab"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Notifications');?></a></li>

<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','actworkflow')) : ?>
<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','actworkflow')) : ?>
<li role="presentation"><a href="#chattransfer" aria-controls="chattransfer" role="tab" data-toggle="tab"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Chat transfer worklow');?></a></li>
<?php endif;?>

<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','actautoassignment')) : ?>
<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','actautoassignment')) : ?>
<li role="presentation"><a href="#autoassignment" aria-controls="autoassignment" role="tab" data-toggle="tab"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Auto assignment');?></a></li>
<?php endif;?>

Expand Down Expand Up @@ -82,7 +82,7 @@

<div role="tabpanel" class="tab-pane" id="notifications">

<?php include(erLhcoreClassDesign::designtpl('lhdepartament/xmpp_enabled.tpl.php'));?>
<?php include(erLhcoreClassDesign::designtpl('lhdepartment/xmpp_enabled.tpl.php'));?>

<?php if ($department_xmpp_enabled == true) : ?>
<div class="row form-group">
Expand Down Expand Up @@ -128,7 +128,7 @@
<label><input type="checkbox" name="inform_close" value="1" <?php if ($departament->inform_close == 1) : ?>checked="checked"<?php endif;?> /> <?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Inform then chat is closed by operator, only mail notification is send.');?></label>
</div>

<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','actworkflow')) : ?>
<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','actworkflow')) : ?>
<div role="tabpanel" class="tab-pane" id="chattransfer">
<div class="form-group">
<label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','To what department chat should be transfered if it is not accepted');?></label>
Expand All @@ -155,7 +155,7 @@
</div>
<?php endif;?>

<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','actautoassignment')) : ?>
<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','actautoassignment')) : ?>
<div role="tabpanel" class="tab-pane" id="autoassignment">
<label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/operatorsbalancing','Active');?> <input type="checkbox" ng-init="AutoAssignActive=<?php if ($departament->active_balancing == 1) : ?>true<?php else : ?>false<?php endif;?>" ng-model="AutoAssignActive" name="AutoAssignActive" value="on" <?php if ($departament->active_balancing == 1) : ?>checked="checked"<?php endif;?> /></label>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
<?php include(erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php'));?>
<?php endif; ?>

<form action="<?php echo erLhcoreClassDesign::baseurl('departament/new')?>" method="post">

<?php include(erLhcoreClassDesign::designtpl('lhdepartament/form.tpl.php'));?>
<form action="<?php echo erLhcoreClassDesign::baseurl('department/new')?>" method="post">

<?php include(erLhcoreClassDesign::designtpl('lhdepartment/form.tpl.php'));?>

<div class="btn-group" role="group" aria-label="...">
<input type="submit" class="btn btn-default" name="Save_departament" value="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/buttons','Save');?>"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div class="row">
<div class="col-md-6">
<ul>
<?php if ($currentUser->hasAccessTo('lhdepartament','list')) : ?>
<li><a href="<?php echo erLhcoreClassDesign::baseurl('departament/departaments')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/configuration','Departments');?></a></li>
<?php if ($currentUser->hasAccessTo('lhdepartment','list')) : ?>
<li><a href="<?php echo erLhcoreClassDesign::baseurl('department/departments')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/configuration','Departments');?></a></li>
<?php endif; ?>

<?php include(erLhcoreClassDesign::designtpl('lhsystem/configuration_links/blockusers.tpl.php'));?>
Expand Down
4 changes: 2 additions & 2 deletions lhc_web/lib/core/lhdepartament/lhdepartament.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static function validateDepartment(erLhcoreClassModelDepartament & $depar
$department->name = $form->Name;
}

if ( erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','actautoassignment') ) {
if ( erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','actautoassignment') ) {
if ( $form->hasValidData( 'AutoAssignActive' ) && $form->AutoAssignActive == true ) {
$department->active_balancing = 1;
} else {
Expand All @@ -171,7 +171,7 @@ public static function validateDepartment(erLhcoreClassModelDepartament & $depar
}
}

if ( erLhcoreClassUser::instance()->hasAccessTo('lhdepartament','actworkflow') ) {
if ( erLhcoreClassUser::instance()->hasAccessTo('lhdepartment','actworkflow') ) {
if ( $form->hasValidData( 'TansferDepartmentID' ) )
{
$department->department_transfer_id = $form->TansferDepartmentID;
Expand Down
2 changes: 1 addition & 1 deletion lhc_web/lib/core/lhpermission/lhrole.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static function getSession()
* Returns something like that
* Array
(
[lhdepartament] => Array
[lhdepartment] => Array
(
[alldepartaments] => 1
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$tpl = erLhcoreClassTemplate::getInstance( 'lhdepartament/departaments.tpl.php');
$tpl = erLhcoreClassTemplate::getInstance( 'lhdepartment/departments.tpl.php');

/**
* Append user departments filter
Expand All @@ -15,7 +15,7 @@
}

$pages = new lhPaginator();
$pages->serverURL = erLhcoreClassDesign::baseurl('departament/departaments');
$pages->serverURL = erLhcoreClassDesign::baseurl('department/departments');
$pages->items_total = erLhcoreClassModelDepartament::getCount($departmentParams);
$pages->setItemsPerPage(20);
$pages->paginate();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$tpl = erLhcoreClassTemplate::getInstance('lhdepartament/edit.tpl.php');
$tpl = erLhcoreClassTemplate::getInstance('lhdepartment/edit.tpl.php');

$Departament = erLhcoreClassDepartament::getSession()->load( 'erLhcoreClassModelDepartament', (int)$Params['user_parameters']['departament_id'] );

Expand All @@ -14,34 +14,34 @@
$userDepartments = erLhcoreClassUserDep::parseUserDepartmetnsForFilter($currentUser->getUserID());
if ($userDepartments !== true) {
if (!in_array($Departament->id, $userDepartments)) {
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit;
}
}
}

if ( isset($_POST['Cancel_departament']) ) {
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit;
}

if ( isset($_POST['Delete_departament']) ) {

if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token']) || !$currentUser->hasAccessTo('lhdepartament','delete') || !$Departament->can_delete) {
erLhcoreClassModule::redirect('departament/departaments');
if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token']) || !$currentUser->hasAccessTo('lhdepartment','delete') || !$Departament->can_delete) {
erLhcoreClassModule::redirect('department/departments');
exit;
}

$Departament->removeThis();
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit;
}


if (isset($_POST['Update_departament']) || isset($_POST['Save_departament']) )
{
if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit;
}

Expand All @@ -52,7 +52,7 @@
erLhcoreClassDepartament::getSession()->update($Departament);

if (isset($_POST['Save_departament'])) {
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit;
} else {
$tpl->set('updated',true);
Expand All @@ -71,7 +71,7 @@

$Result['path'] = array(
array('url' => erLhcoreClassDesign::baseurl('system/configuration'),'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','System configuration')),
array('url' => erLhcoreClassDesign::baseurl('departament/departaments'),'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','departments')),
array('url' => erLhcoreClassDesign::baseurl('department/departments'),'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Departments')),
array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit a department').' - '.$Departament->name),);

?>
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@

$ViewList = array();

$ViewList['departaments'] = array(
'script' => 'departaments.php',
$ViewList['departments'] = array(
'params' => array(),
'functions' => array( 'list' )
);

$ViewList['new'] = array(
'script' => 'new.php',
'params' => array(),
'functions' => array( 'create' )
);

$ViewList['edit'] = array(
'script' => 'edit.php',
'params' => array('departament_id'),
'functions' => array( 'edit' )
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

$tpl = erLhcoreClassTemplate::getInstance( 'lhdepartament/new.tpl.php');
$tpl = erLhcoreClassTemplate::getInstance( 'lhdepartment/new.tpl.php');
$Departament = new erLhcoreClassModelDepartament();

if ( isset($_POST['Cancel_departament']) ) {
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit;
}

Expand All @@ -15,7 +15,7 @@
if (count($Errors) == 0)
{
erLhcoreClassDepartament::getSession()->save($Departament);
erLhcoreClassModule::redirect('departament/departaments');
erLhcoreClassModule::redirect('department/departments');
exit ;

} else {
Expand All @@ -29,7 +29,7 @@

$Result['path'] = array(
array('url' => erLhcoreClassDesign::baseurl('system/configuration'),'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/new','System configuration')),
array('url' => erLhcoreClassDesign::baseurl('departament/departaments'),'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/new','Departments')),
array('url' => erLhcoreClassDesign::baseurl('department/departments'),'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/new','Departments')),
array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/new','New department')),
)

Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhinstall/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@

if ( !$form->hasValidData( 'DefaultDepartament' ) || $form->DefaultDepartament == '')
{
$Errors[] = 'Please enter default departament name';
$Errors[] = 'Please enter default department name';
}

if (count($Errors) == 0) {
Expand Down

0 comments on commit 657cf8f

Please sign in to comment.