本文整理汇总了PHP中Icon::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Icon::show方法的具体用法?PHP Icon::show怎么用?PHP Icon::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Icon
的用法示例。
在下文中一共展示了Icon::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOptions
public function getOptions()
{
if (!$this->reported) {
$opt[] = sprintf('<a style="cursor : pointer" class="message" id="%s">%s</a>', $this->from_user_id, \Icon::show('undo', 'Reply to contact'));
$opt[] = sprintf('<a style="cursor:pointer" class="report" id="%s">%s</a>', $this->id, \Icon::show('warning', 'Report'));
$opt[] = javascript('confirm', array('question' => 'Are you sure you want to delete this message?', 'address' => \PHPWS_Text::linkAddress('properties', array('rop' => 'delete_message', 'id' => $this->id)), 'link' => \Icon::show('delete'), 'title' => 'Delete message'));
return implode('', $opt);
} else {
return null;
}
}
示例2: deleteLink
public function deleteLink($mode = 'link')
{
$vars['QUESTION'] = dgettext('filecabinet', 'Are you certain you want to delete this folder and all its contents?');
$vars['ADDRESS'] = PHPWS_Text::linkAddress('filecabinet', array('aop' => 'delete_folder', 'folder_id' => $this->id), true);
$label = dgettext('filecabinet', 'Delete');
if ($mode == 'image') {
$vars['LINK'] = Icon::show('delete', dgettext('filecabinet', 'Delete'));
} else {
$vars['LINK'] = $label;
}
return javascript('confirm', $vars);
}
示例3: rowTags
public function rowTags()
{
$vars['reason_id'] = $this->id;
$vars['aop'] = 'edit_reason';
$links[] = PHPWS_Text::secureLink(Icon::show('edit'), 'checkin', $vars);
$vars['aop'] = 'delete_reason';
$js['question'] = dgettext('confirm', 'Are you sure you want to delete this reason?.');
$js['address'] = PHPWS_Text::linkAddress('checkin', $vars, true);
$js['link'] = Icon::show('delete');
$links[] = javascript('confirm', $js);
$tpl['ACTION'] = implode('', $links);
return $tpl;
}
示例4: uploadNew
public function uploadNew($use_icon = true)
{
if ($use_icon) {
$label = \Icon::show('image');
$content = <<<EOF
<a style="cursor : pointer" id="{$this->pid}" class="photo-upload">{$label}</a>
EOF;
} else {
$label = 'Add photo';
$content = <<<EOF
<a style="cursor : pointer" id="{$this->pid}" class="btn btn-default photo-upload"><i class="fa fa-camera"></i> {$label}</a>
EOF;
}
return $content;
}
示例5: deleteLink
/**
* @deprecated
* @param type $icon
* @return type
*/
public function deleteLink($icon = false)
{
$vars['mop'] = 'delete_multimedia';
$vars['multimedia_id'] = $this->id;
$vars['folder_id'] = $this->folder_id;
$js['QUESTION'] = dgettext('filecabinet', 'Are you sure you want to delete this multimedia file?');
$js['ADDRESS'] = PHPWS_Text::linkAddress('filecabinet', $vars, true);
if ($icon) {
$js['LINK'] = Icon::show('delete');
} else {
$js['LINK'] = dgettext('filecabinet', 'Delete');
}
return javascript('confirm', $js);
}
示例6: viewImage
public function viewImage($id, $view_folder = true)
{
Layout::addStyle('filecabinet');
PHPWS_Core::initModClass('filecabinet', 'Image.php');
$image = new PHPWS_Image($id);
$folder = new Folder($image->folder_id);
if (!$folder->allow()) {
$content = dgettext('filecabinet', 'Sorry, the file you requested is off limits.');
Layout::add($content);
return;
}
$tpl['TITLE'] = $image->title;
if ($image->width > FC_MAX_IMAGE_POPUP_WIDTH || $image->height > FC_MAX_IMAGE_POPUP_HEIGHT) {
if (FC_MAX_IMAGE_POPUP_WIDTH < FC_MAX_IMAGE_POPUP_HEIGHT) {
$ratio = FC_MAX_IMAGE_POPUP_WIDTH / $image->width;
$image->width = FC_MAX_IMAGE_POPUP_WIDTH;
$image->height = $image->height * $ratio;
} else {
$ratio = FC_MAX_IMAGE_POPUP_HEIGHT / $image->height;
$image->height = FC_MAX_IMAGE_POPUP_HEIGHT;
$image->width = $image->width * $ratio;
}
$tpl['IMAGE'] = sprintf('<a href="%s">%s</a>', $image->getPath(), $image->getTag());
} else {
$tpl['IMAGE'] = $image->getTag();
}
$tpl['DESCRIPTION'] = $image->getDescription();
$tpl['CLOSE'] = javascript('close_window');
if ($view_folder && $folder->public_folder) {
$db = new PHPWS_DB('images');
$db->setLimit(1);
$db->addWhere('folder_id', $image->folder_id);
$db->addWhere('title', $image->title, '>');
$db->addOrder('title');
$next_img = $db->getObjects('PHPWS_Image');
if (!empty($next_img)) {
$next_link = Icon::show('next', dgettext('filecabinet', 'Next image'));
$tpl['NEXT'] = sprintf('<a id="next-link" href="%s%s">%s</a>', PHPWS_Core::getHomeHttp(), $next_img[0]->popupAddress(), $next_link);
}
$db->resetWhere();
$db->resetOrder();
$db->addWhere('folder_id', $image->folder_id);
$db->addWhere('title', $image->title, '<');
$db->addOrder('title desc');
$prev_img = $db->getObjects('PHPWS_Image');
if (!empty($prev_img)) {
$prev_link = Icon::show('previous', dgettext('filecabinet', 'Previous image'));
$tpl['PREV'] = sprintf('<a id="prev-link" href="%s%s">%s</a>', PHPWS_Core::getHomeHttp(), $prev_img[0]->popupAddress(), $prev_link);
}
}
$content = PHPWS_Template::process($tpl, 'filecabinet', 'image_view.tpl');
Layout::nakedDisplay($content);
}
示例7: getTpl
public function getTpl()
{
$vars['block_id'] = $this->getId();
if (Current_User::allow('block', 'edit_block', $this->id)) {
$vars['action'] = 'edit';
$links[] = PHPWS_Text::secureLink(Icon::show('edit', dgettext('block', 'Edit')), 'block', $vars);
if ($this->allPinned()) {
$vars['action'] = 'remove';
$links[] = PHPWS_Text::secureLink("<i class='fa fa-flag' title='" . dgettext('block', 'Remove block from all pages') . "'></i>", 'block', $vars);
} else {
$vars['action'] = 'pin_all';
$links[] = PHPWS_Text::secureLink("<i class='fa fa-flag-o' title='" . dgettext('block', 'Display block on all pages') . "'></i>", 'block', $vars);
}
if (Current_User::isUnrestricted('block')) {
$links[] = Current_User::popupPermission($this->key_id, null, 'icon');
}
}
if (Current_User::allow('block', 'delete_block')) {
$vars['action'] = 'delete';
$confirm_vars['QUESTION'] = dgettext('block', 'Are you sure you want to permanently delete this block?');
$confirm_vars['ADDRESS'] = PHPWS_Text::linkAddress('block', $vars, TRUE);
$confirm_vars['LINK'] = '<i class="fa fa-trash-o" title="' . dgettext('block', 'Delete') . '"></i>';
$links[] = javascript('confirm', $confirm_vars);
}
if (!empty($links)) {
$template['ACTION'] = implode('', $links);
} else {
$template['ACTION'] = ' ';
}
if (empty($this->title)) {
$template['TITLE'] = '<em>' . dgettext('block', 'Untitled') . '</em>';
}
if (empty($this->content)) {
$template['CONTENT'] = '<em>' . dgettext('block', 'Empty') . '</em>';
} else {
$template['CONTENT'] = $this->summarize();
}
return $template;
}
示例8: userForm
public static function userForm(PHPWS_User $user, $message = NULL)
{
javascript('jquery');
javascriptMod('users', 'generate');
$form = new PHPWS_Form('edit-user');
if ($user->getId() > 0) {
$form->addHidden('user_id', $user->getId());
$form->addSubmit('go', dgettext('users', 'Update User'));
} else {
$form->addSubmit('go', dgettext('users', 'Add User'));
}
$form->addHidden('action', 'admin');
$form->addHidden('command', 'postUser');
$form->addHidden('module', 'users');
$form->addCheckbox('notify_user', 1);
$form->setLabel('notify_user', dgettext('user', 'Notify user of account creation'));
if (Current_User::allow('users', 'settings')) {
$db = new PHPWS_DB('users_auth_scripts');
$db->setIndexBy('id');
$db->addColumn('id');
$db->addColumn('display_name');
$result = $db->select('col');
if (PHPWS_Error::isError($result)) {
PHPWS_Error::log($result);
} else {
if (!isset($result[$user->authorize])) {
$message['AUTHORIZE'] = dgettext('users', 'Warning: this user\'s authorization script is broken. Choose another and update.');
}
$form->addSelect('authorize', $result);
$form->setMatch('authorize', $user->authorize);
$form->setLabel('authorize', dgettext('users', 'Authorization'));
}
}
if (!$user->id || $user->canChangePassword()) {
$form->addText('username', $user->getUsername());
$form->setRequired('username');
$form->setLabel('username', dgettext('users', 'Username'));
$form->addPassword('password1');
$form->addPassword('password2');
$form->setLabel('password1', dgettext('users', 'Password'));
$form->addButton('create_pw', dgettext('users', 'Generate password'));
} else {
$form->addTplTag('USERNAME', $user->getUsername());
$form->addTplTag('USERNAME_LABEL', '<strong>' . dgettext('users', 'Username') . '</strong>');
}
$form->addText('display_name', $user->display_name);
$form->addText('email', $user->getEmail());
$form->setSize('email', 30);
$form->setRequired('email');
$form->setLabel('email', dgettext('users', 'Email Address'));
$form->setLabel('display_name', dgettext('users', 'Display name'));
if (isset($tpl)) {
$form->mergeTemplate($tpl);
}
$template = $form->getTemplate();
$vars['action'] = 'admin';
$vars['user_id'] = $user->id;
if ($user->id) {
$vars['command'] = 'setUserPermissions';
$links[] = PHPWS_Text::secureLink(\Icon::show('permission') . ' ' . dgettext('users', 'Permissions'), 'users', $vars, null, dgettext('users', 'Permissions'), 'btn btn-default');
}
if (isset($links)) {
$template['LINKS'] = implode(' | ', $links);
}
if (isset($message)) {
foreach ($message as $tag => $error) {
$template[strtoupper($tag) . '_ERROR'] = $error;
}
}
if (!$user->id) {
$template['JOIN_GROUPS'] = self::getJoinGroups();
} else {
$group_ids = $user->getGroups();
if ($group_ids) {
$db = Database::newDB();
$t1 = $db->addTable('users_groups');
$f1 = $t1->addField('name');
$c1 = $t1->getFieldConditional('id', $group_ids, 'in');
$c2 = $t1->getFieldConditional('user_id', 0);
$db->stackConditionals($c1, $c2);
while ($group = $db->selectColumn()) {
$template['members'][] = array('NAME' => $group);
}
}
if (!isset($template['members'])) {
$template['EMPTY_GROUP'] = dgettext('user', 'User not a member of any group');
}
}
return PHPWS_Template::process($template, 'users', 'forms/userForm.tpl');
}
示例9: editLink
/**
* @deprecated
* @param type $icon
* @return type
*/
public function editLink($icon = false)
{
$vars['document_id'] = $this->id;
$vars['folder_id'] = $this->folder_id;
$vars['dop'] = 'upload_document_form';
$link = new PHPWS_Link(null, 'filecabinet', $vars, true);
$link->setSalted(1);
$js['address'] = $link->getAddress();
$js['width'] = 550;
$js['height'] = 500;
if ($icon) {
$js['label'] = Icon::show('edit', dgettext('filecabinet', 'Edit document'));
} else {
$js['label'] = dgettext('filecabinet', 'Edit');
}
return javascript('open_window', $js);
}
示例10: row_tags
public function row_tags($contact_command = false)
{
//$tpl['NAME'] = $this->viewLink($this->name);
$name = strlen($this->name) > 30 ? substr($this->name, 0, 30) . '...' : $this->name;
$tpl['NAME'] = $this->viewLink($name);
if ($contact_command) {
$cmd = 'cop';
$cmd_array['k'] = $_SESSION['Contact_User']->getKey();
} else {
$cmd = 'aop';
$cmd_array['authkey'] = \Current_User::getAuthKey();
}
$cmd_array['pid'] = $this->id;
if ($this->active) {
$cmd_array[$cmd] = 'deactivate_property';
$admin[] = \PHPWS_Text::moduleLink(\Icon::show('active', 'Click to deactivate'), 'properties', $cmd_array);
} else {
$cmd_array[$cmd] = 'activate_property';
$admin[] = \PHPWS_Text::moduleLink(\Icon::show('inactive', 'Click to activate'), 'properties', $cmd_array);
}
$cmd_array[$cmd] = 'edit_property';
$admin[] = \PHPWS_Text::secureLink(\Icon::show('edit'), 'properties', $cmd_array);
$cmd_array[$cmd] = 'update';
if ($this->active) {
$tpl['TIMEOUT'] = \PHPWS_Text::moduleLink($this->getTimeout(), 'properties', $cmd_array);
} else {
$tpl['TIMEOUT'] = 'N/A';
}
$photo = new Photo();
$photo->setPropertyId($this->id);
$admin[] = $photo->uploadNew();
$js['LINK'] = \Icon::show('delete');
$js['QUESTION'] = 'Are you sure you want to delete this property?';
if ($contact_command) {
$js['ADDRESS'] = 'index.php?module=properties&cop=delete_property&pid=' . $this->id . '&k=' . $_SESSION['Contact_User']->getKey();
} else {
$js['ADDRESS'] = 'index.php?module=properties&aop=delete_property&pid=' . $this->id . '&authkey=' . \Current_User::getAuthKey();
}
$admin[] = javascript('confirm', $js);
$tpl['ACTION'] = implode('', $admin);
return $tpl;
}
示例11: showPeeps
public function showPeeps()
{
$sheet = new Signup_Sheet($this->sheet_id);
$total_slots = $sheet->totalSlotsFilled();
$all_slots = $sheet->getAllSlots();
foreach ($all_slots as $slot) {
if ($slot->id == $this->id) {
continue;
} elseif (!isset($total_slots[$slot->id]) || $slot->openings != $total_slots[$slot->id]) {
$options[$slot->id] = $slot->title;
}
}
$ex1 = sprintf('<abbr title="%s"><strong>1:</strong></abbr> ', $sheet->extra1);
$ex2 = sprintf('<abbr title="%s"><strong>2:</strong></abbr> ', $sheet->extra2);
$ex3 = sprintf('<abbr title="%s"><strong>3:</strong></abbr> ', $sheet->extra3);
if ($this->_peeps) {
$jsconf['QUESTION'] = dgettext('signup', 'Are you sure you want to delete this person from their signup slot?');
$jsconf['LINK'] = Icon::show('delete');
$jspop['label'] = Icon::show('edit');
foreach ($this->_peeps as $peep) {
$links = array();
$subtpl = array();
$subtpl['FIRST_NAME'] = $peep->first_name;
$subtpl['LAST_NAME'] = $peep->last_name;
$subtpl['EMAIL'] = $peep->getEmail();
$subtpl['PHONE'] = $peep->getPhone();
if (!empty($sheet->extra1)) {
$subtpl['EXTRA1'] = $ex1 . $peep->getExtra1();
}
if (!empty($sheet->extra2)) {
$subtpl['EXTRA2'] = $ex2 . $peep->getExtra2();
}
if (!empty($sheet->extra3)) {
$subtpl['EXTRA3'] = $ex3 . $peep->getExtra3();
}
$vars['peep_id'] = $peep->id;
$vars['aop'] = 'edit_slot_peep';
$jspop['address'] = PHPWS_Text::linkAddress('signup', $vars, true);
$jspop['width'] = 300;
$jspop['height'] = 600;
$links[] = javascript('open_window', $jspop);
$vars['aop'] = 'delete_slot_peep';
$jsconf['ADDRESS'] = PHPWS_Text::linkAddress('signup', $vars, true);
$links[] = javascript('confirm', $jsconf);
$subtpl['ACTION'] = implode('', $links);
if (!empty($options)) {
$form = new PHPWS_Form();
$form->addHidden('module', 'signup');
$form->addHidden('aop', 'move_peep');
$form->addHidden('peep_id', $peep->id);
$form->addSelect('mv_slot', $options);
$form->addSubmit(dgettext('signup', 'Go'));
$tmptpl = $form->getTemplate();
$subtpl['MOVE'] = $tmptpl['START_FORM'] . $tmptpl['MV_SLOT'] . $tmptpl['SUBMIT'] . $tmptpl['END_FORM'];
} else {
$subtpl['MOVE'] = dgettext('signup', 'Other slots full');
}
$tpl['peep-row'][] = $subtpl;
}
$tpl['NAME_LABEL'] = dgettext('signup', 'Name');
$tpl['EMAIL_LABEL'] = dgettext('signup', 'Email');
$tpl['PHONE_LABEL'] = dgettext('signup', 'Phone');
$tpl['ACTION_LABEL'] = dgettext('signup', 'Action');
$tpl['ORGANIZATION_LABEL'] = dgettext('signup', 'Organization');
$tpl['MOVE_LABEL'] = dgettext('signup', 'Move');
$tpl['EXTRA1_LABEL'] = 'Extra info';
return PHPWS_Template::process($tpl, 'signup', 'peeps.tpl');
}
}
示例12: row_tags
public function row_tags()
{
if ($this->filter_type == 0x0) {
// if no filters are selected
$tpl['FILTER_INFO'] = dgettext('checkin', 'None');
} else {
$filterInfo = array();
if ($this->filter_type & LAST_NAME_BITMASK) {
$filterInfo[] = 'Last Name';
}
if ($this->filter_type & REASON_BITMASK) {
$filterInfo[] = 'Reason';
}
if ($this->filter_type & GENDER_BITMASK) {
$filterInfo[] = 'Gender';
}
if ($this->filter_type & BIRTHDATE_BITMASK) {
$filterInfo[] = 'Birthdate';
}
$tpl['FILTER_INFO'] = implode('<br>', $filterInfo);
}
$vars['staff_id'] = $this->id;
if ($this->active) {
$links[] = \PHPWS_Text::secureLink(\Icon::show('active', 'Click to deactivate'), 'checkin', array('aop' => 'deactivate_staff', 'id' => $this->id));
} else {
$links[] = \PHPWS_Text::secureLink(\Icon::show('inactive', 'Click to activate'), 'checkin', array('aop' => 'activate_staff', 'id' => $this->id));
}
$vars['aop'] = 'edit_staff';
$links[] = PHPWS_Text::secureLink(Icon::show('edit'), 'checkin', $vars);
$vars['aop'] = 'move_up';
$links[] = PHPWS_Text::secureLink(Icon::show('up'), 'checkin', $vars);
$vars['aop'] = 'move_down';
$links[] = PHPWS_Text::secureLink(Icon::show('down'), 'checkin', $vars);
$tpl['VIEW_ORDER'] = $this->view_order;
$tpl['ACTION'] = implode('', $links);
return $tpl;
}
示例13: getList
//.........这里部分代码省略.........
$listTags['SELECT_LABEL'] = ' ';
}
$columns = 0;
foreach ($this->_listColumns[$this->listName] as $listColumn => $listLabel) {
$column = strtoupper($listColumn);
$key0 = $column . '_LABEL';
$key1 = $column . '_ORDER_LINK';
$listTags[$key0] = NULL;
$listTags[$key1] = NULL;
$listTags[$key0] = $listLabel;
if (isset($overRideOp)) {
$request = $overRideOp;
} else {
if (isset($this->_listPaging[$this->listName]['op'])) {
$request = $this->_listPaging[$this->listName]['op'];
} else {
$request = $this->_request . '=list';
}
}
if ($totalItems > 0) {
$anchor = '';
if ($this->_anchor) {
$anchor = '#' . $this->listName;
}
if (isset($this->_overrideOrder[$this->listName][$listColumn][0])) {
$overRide = $this->_overrideOrder[$this->listName][$listColumn][0];
} else {
$overRide = 'default';
}
if (isset($this->_listPaging[$this->listName])) {
switch ($overRide) {
case 0:
$listTags[$key1] .= '<a href="./index.php?module=' . $this->_module . '&' . $request . '&PHPWS_MAN_LIST=' . $this->listName . '&PHPWS_MAN_COLUMN=' . $listColumn . '&PHPWS_MAN_ORDER=1&' . 'PHPWS_MAN_PAGE=' . $this->listName . '&' . 'PAGER_limit=' . $this->_pagers[$this->listName]->limit . '&' . 'PAGER_start=' . $this->_pagers[$this->listName]->start . '&' . 'PAGER_section=' . $this->_pagers[$this->listName]->section . $anchor . '">';
$listTags[$key1] .= Icon::show('sort') . '</a>';
break;
case 1:
$listTags[$key1] .= '<a href="./index.php?module=' . $this->_module . '&' . $request . '&PHPWS_MAN_LIST=' . $this->listName . '&PHPWS_MAN_COLUMN=' . $listColumn . '&PHPWS_MAN_ORDER=2&' . 'PHPWS_MAN_PAGE=' . $this->listName . '&' . 'PAGER_limit=' . $this->_pagers[$this->listName]->limit . '&' . 'PAGER_start=' . $this->_pagers[$this->listName]->start . '&' . 'PAGER_section=' . $this->_pagers[$this->listName]->section . $anchor . '">';
$listTags[$key1] .= Icon::show('sort-up') . '</a>';
break;
case 2:
$listTags[$key1] .= '<a href="./index.php?module=' . $this->_module . '&' . $request . '&PHPWS_MAN_LIST=' . $this->listName . '&PHPWS_MAN_COLUMN=' . $listColumn . '&PHPWS_MAN_ORDER=0&' . 'PHPWS_MAN_PAGE=' . $this->listName . '&' . 'PAGER_limit=' . $this->_pagers[$this->listName]->limit . '&' . 'PAGER_start=' . $this->_pagers[$this->listName]->start . '&' . 'PAGER_section=' . $this->_pagers[$this->listName]->section . $anchor . '">';
$listTags[$key1] .= Icon::show('sort-down') . '</a>';
break;
default:
$listTags[$key1] .= '<a href="./index.php?module=' . $this->_module . '&' . $request . '&PHPWS_MAN_LIST=' . $this->listName . '&PHPWS_MAN_COLUMN=' . $listColumn . '&PHPWS_MAN_ORDER=1&' . 'PHPWS_MAN_PAGE=' . $this->listName . '&' . 'PAGER_limit=' . $this->_pagers[$this->listName]->limit . '&' . 'PAGER_start=' . $this->_pagers[$this->listName]->start . '&' . 'PAGER_section=' . $this->_pagers[$this->listName]->section . $anchor . '">';
$listTags[$key1] .= Icon::show('sort') . '</a>';
}
}
}
$columns++;
}
/* Build each item's row */
$listTags['LIST_ITEMS'] = NULL;
if ($totalItems > 0) {
$tog = 1;
foreach ($items as $item) {
$object = NULL;
if (isset($this->_class)) {
$object = new $this->_class($item);
$className = get_class($object);
$classMethods = get_class_methods($className);
@array_walk($classMethods, 'manager_lower_methods');
$objectVars = get_object_vars($object);
if (is_array($objectVars)) {
$item = $objectVars;
foreach ($item as $key => $value) {
示例14: rowTags
public function rowTags()
{
if ($this->checkPermissions()) {
$links[] = '<i class="fa fa-plus add-event" style="cursor:pointer" data-schedule-id="' . $this->id . '" data-date="' . time() . '"></i>';
//$links[] = $this->addEventLink(null, true, true);
$links[] = $this->uploadEventsLink(null, true);
$links[] = $this->downloadEventsLink(null, true);
$links[] = '<i class="fa fa-edit" id="edit-schedule" data-schedule-id="' . $this->id . '" style="cursor:pointer" title="' . dgettext('calendar', 'Edit schedule') . '"></i>';
}
if (Current_User::allow('calendar', 'delete_schedule') && Current_User::isUnrestricted('calendar')) {
$js['QUESTION'] = dgettext('calendar', 'Are you sure you want to delete this schedule?');
$js['ADDRESS'] = sprintf('index.php?module=calendar&aop=delete_schedule&sch_id=%s&authkey=%s', $this->id, Current_User::getAuthKey());
$js['LINK'] = Icon::show('delete');
$links[] = javascript('confirm', $js);
}
if ($this->public && Current_User::isUnrestricted('calendar')) {
$public_schedule = PHPWS_Settings::get('calendar', 'public_schedule');
if ($public_schedule != $this->id) {
$link_vars['aop'] = 'make_default_public';
$link_vars['sch_id'] = $this->id;
$links[] = PHPWS_Text::secureLink(dgettext('calendar', 'Make default public'), 'calendar', $link_vars);
} else {
$links[] = dgettext('calendar', 'Default public');
}
}
if (!empty($links)) {
$tags['ADMIN'] = implode(' ', $links);
} else {
$tags['ADMIN'] = dgettext('calendar', 'None');
}
$tags['TITLE'] = $this->getViewLink();
if ($this->public) {
$tags['AVAILABILITY'] = dgettext('calendar', 'Public');
} else {
$tags['AVAILABILITY'] = dgettext('calendar', 'Private');
}
return $tags;
}
示例15: downloadLink
function downloadLink($startdate, $enddate)
{
if ($this->calendar->schedule->allowICalDownload()) {
$dl['uop'] = 'ical_dl';
$dl['sch_id'] = $this->calendar->schedule->id;
$dl['sdate'] = $startdate;
$dl['edate'] = $enddate;
$icon = Icon::show('download');
$download = new PHPWS_Link($icon, 'calendar', $dl);
$download->setNoFollow();
return $download->get();
} else {
return null;
}
}