This commit is contained in:
Catouse
2018-05-25 17:56:51 +08:00
3 changed files with 74 additions and 73 deletions
+2
View File
@@ -1 +1,3 @@
body.body-modal {padding-bottom: 20px; min-height: 400px}
.side-col {padding-right: 40px; padding-top: 25px;}
+70 -71
View File
@@ -11,9 +11,9 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div class="modal-content">
<div id='mainContent' class='main-row main-content'>
<?php if($mode == 'edit'):?>
<div class='col-sm-3 col-lg-2'>
<div class='side-col'>
<?php
foreach($lists as $id => $listName)
{
@@ -25,76 +25,75 @@
<?php echo html::a(inlink('managecontacts', "listID=0&mode=new"), '<i class="icon icon-plus"></i> ' . $lang->user->contacts->createList, '', "class='btn btn-block'"); ?>
</div>
<?php endif;?>
<?php $class = $mode == 'edit' ? 'col-sm-9 col-lg-10' : 'col-sm-12 col-lg-12';?>
<div class='<?php echo $class?>'>
<?php $class = $mode == 'edit' ? 'main-col' : '';?>
<div class='<?php echo $class?>'>
<div class='main-header'>
<h2>
<?php if($mode == 'new'):?>
<i class='icon-plus'></i> <strong><?php echo $lang->user->contacts->createList;?></strong>
<?php else:?>
<i class='icon-cogs'></i> <strong><?php echo $lang->user->contacts->manage;?></strong>
<?php endif;?>
</h2>
</div>
<form method='post' target='hiddenwin' id='dataform'>
<div class='panel panel-sm'>
<div class='panel-heading'>
<?php if($mode == 'new'):?>
<i class='icon-plus'></i> <strong><?php echo $lang->user->contacts->createList;?></strong>
<?php else:?>
<i class='icon-cogs'></i> <strong><?php echo $lang->user->contacts->manage;?></strong>
<?php endif;?>
</div>
<div class='panel-body'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->user->contacts->listName;?></th>
<td class='w-300px'>
<div class='required required-wrapper'></div>
<?php
if($mode == 'edit') $readonly = in_array($list->id, $disabled) ? ' readonly' : '';
if($mode == 'new')
{
echo html::input('newList', '', "class='form-control'");
}
else
{
echo html::input('listName', $list->listName, "$readonly class='form-control'");
echo html::hidden('listID', $list->id);
}
?>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->user->contacts->selectedUsers;?></th>
<td colspan='2'>
<?php
if($mode == 'new')
{
echo html::select('users[]', $users, '', "multiple class='form-control chosen'");
}
else
{
echo html::select('users[]', $users, $list->userList, "multiple $readonly class='form-control chosen'");
}
?>
</td>
</tr>
<?php if(common::hasPriv('datatable', 'setGlobal')):?>
<tr>
<th></th>
<td colspan="2">
<label class="checkbox-primary">
<input type="checkbox" name="share" value="1" id="shareCheckbox" <?php if($mode != 'new' && in_array($list->id, $globalContacts)) echo 'checked';?>/>
<label for="shareCheckbox"><?php echo $lang->my->shareContacts;?></label>
</label>
</td>
</tr>
<?php endif;?>
<?php if($mode == 'new' || !in_array($list->id, $disabled)):?>
<tr>
<td></td>
<td class="form-actions">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::hidden('mode', $mode);?>
<?php if($mode == 'edit') echo html::a(inlink('deleteContacts', "listID=$listID"), $lang->delete, 'hiddenwin', "class='btn btn-danger btn-wide'");?>
</td>
</tr>
<?php endif;?>
</table>
</div>
</div>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->user->contacts->listName;?></th>
<td class='w-300px'>
<div class='required required-wrapper'></div>
<?php
if($mode == 'edit') $readonly = in_array($list->id, $disabled) ? ' readonly' : '';
if($mode == 'new')
{
echo html::input('newList', '', "class='form-control'");
}
else
{
echo html::input('listName', $list->listName, "$readonly class='form-control'");
echo html::hidden('listID', $list->id);
}
?>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->user->contacts->selectedUsers;?></th>
<td colspan='2'>
<?php
if($mode == 'new')
{
echo html::select('users[]', $users, '', "multiple class='form-control chosen'");
}
else
{
echo html::select('users[]', $users, $list->userList, "multiple $readonly class='form-control chosen'");
}
?>
</td>
</tr>
<?php if(common::hasPriv('datatable', 'setGlobal')):?>
<tr>
<th></th>
<td colspan="2">
<label class="checkbox-primary">
<input type="checkbox" name="share" value="1" id="shareCheckbox" <?php if($mode != 'new' && in_array($list->id, $globalContacts)) echo 'checked';?>/>
<label for="shareCheckbox"><?php echo $lang->my->shareContacts;?></label>
</label>
</td>
</tr>
<?php endif;?>
<?php if($mode == 'new' || !in_array($list->id, $disabled)):?>
<tr>
<td></td>
<td class="form-actions">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::hidden('mode', $mode);?>
<?php if($mode == 'edit') echo html::a(inlink('deleteContacts', "listID=$listID"), $lang->delete, 'hiddenwin', "class='btn btn-danger btn-wide'");?>
</td>
</tr>
<?php endif;?>
</table>
</form>
</div>
</div>
+2 -2
View File
@@ -14,8 +14,8 @@
<div id="mainMenu" class="clearfix table-row">
<div class="btn-toolbar pull-left">
<div class="pull-left table-group-btns">
<button type="button" class="btn btn-link group-collapse-all"><?php echo $lang->project->treeLevel['root'];?> <i class="icon-caret-up"></i></button>
<button type="button" class="btn btn-link group-expand-all"><?php echo $lang->project->treeLevel['all'];?> <i class="icon-caret-down"></i></button>
<button type="button" class="btn btn-link group-collapse-all"><?php echo $lang->project->treeLevel['root'];?> <i class="icon-fold-all"></i></button>
<button type="button" class="btn btn-link group-expand-all"><?php echo $lang->project->treeLevel['all'];?> <i class="icon-unfold-all"></i></button>
</div>
<?php if(isset($lang->project->groupFilter[$groupBy])):?>
<?php foreach($lang->project->groupFilter[$groupBy] as $filterKey => $name):?>