* my: add tips after form title.
This commit is contained in:
+14
-6
@@ -1388,13 +1388,21 @@ EOF;
|
||||
|
||||
$list = $listID ? $this->user->getContactListByID($listID) : null;
|
||||
$userList = !empty($list->userList) ? $list->userList : '';
|
||||
$canEdit = empty($list) || (!empty($list->account) && $list->account == $this->app->user->account);
|
||||
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . ($listID ? $this->lang->user->contacts->createList : $this->lang->user->contacts->manage);
|
||||
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed|noclosed', $userList, $this->config->maxCount);
|
||||
$this->view->lists = $this->user->getContactLists($this->app->user->account, '', 'list');
|
||||
$this->view->canEdit = $canEdit;
|
||||
$this->view->list = $list;
|
||||
$mode = 'create';
|
||||
$label = $this->lang->my->createContacts;
|
||||
if($list)
|
||||
{
|
||||
$mode = $list->account == $this->app->user->account ? 'edit' : 'view';
|
||||
$label = $list->account == $this->app->user->account ? $this->lang->my->manageContacts : $this->lang->my->viewContacts;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $label;
|
||||
$this->view->users = $this->user->getPairs('noletter|noempty|noclosed|noclosed', $userList, $this->config->maxCount);
|
||||
$this->view->lists = $this->user->getContactLists($this->app->user->account, '', 'list');
|
||||
$this->view->mode = $mode;
|
||||
$this->view->label = $label;
|
||||
$this->view->list = $list;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,10 +40,6 @@ if(!empty($list->userList))
|
||||
foreach(explode(',', $list->userList) as $account) $userList[] = zget($users, $account);
|
||||
}
|
||||
|
||||
$manageTitle = $lang->my->createContacts;
|
||||
if($canEdit && $list) $manageTitle = $lang->my->manageContacts;
|
||||
if(!$canEdit) $manageTitle = $lang->my->viewContacts;
|
||||
|
||||
panel
|
||||
(
|
||||
setClass('panel-form px-4 mx-auto size-lg'),
|
||||
@@ -99,9 +95,22 @@ panel
|
||||
div
|
||||
(
|
||||
set('class', 'panel-title text-lg flex w-full py-6'),
|
||||
$manageTitle
|
||||
$label,
|
||||
$mode == 'edit' ? array
|
||||
(
|
||||
span
|
||||
(
|
||||
setClass('text-warning'),
|
||||
icon('info')
|
||||
),
|
||||
span
|
||||
(
|
||||
setClass('text-gray text-base font-normal'),
|
||||
$lang->my->manageSelf
|
||||
)
|
||||
) : null
|
||||
),
|
||||
$canEdit ? form
|
||||
($mode == 'create' || $mode == 'edit') ? form
|
||||
(
|
||||
set::actions(array()),
|
||||
formRow
|
||||
|
||||
Reference in New Issue
Block a user