当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPWS_Text::moduleLink方法代码示例

本文整理汇总了PHP中PHPWS_Text::moduleLink方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Text::moduleLink方法的具体用法?PHP PHPWS_Text::moduleLink怎么用?PHP PHPWS_Text::moduleLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPWS_Text的用法示例。


在下文中一共展示了PHPWS_Text::moduleLink方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: propertiesList

 protected function propertiesList($contact_id = null)
 {
     \PHPWS_Core::initModClass('properties', 'Property.php');
     $this->title = 'Property listing';
     $pager = new \DBPager('properties', 'Properties\\Property');
     if ($contact_id) {
         $pager->addWhere('contact_id', $contact_id);
         $data['is_contact'] = 1;
         $page_tags['new'] = \PHPWS_Text::moduleLink('<i class="fa fa-plus"></i> Add new property', 'properties', array('cop' => 'edit_property', 'k' => $this->contact->getKey()), null, null, 'btn btn-success');
     } else {
         $page_tags['new'] = \PHPWS_Text::secureLink('<i class="fa fa-plus"></i> Add new property', 'properties', array('aop' => 'edit_property'), null, null, 'btn btn-success');
     }
     // photo was previously uploaded
     if (!empty($_GET['pid'])) {
         $data['pid'] = $_GET['pid'];
     } else {
         $data['pid'] = 0;
     }
     javascriptMod('properties', 'photo_upload', $data);
     $pager->setSearch('name', 'company_name');
     $pager->addSortHeader('name', 'Name of property');
     $pager->addSortHeader('company_name', 'Management company');
     $pager->addSortHeader('timeout', 'Time until purge');
     $pager->setModule('properties');
     $pager->setTemplate('properties_list.tpl');
     $pager->addRowTags('row_tags', (bool) $contact_id);
     $pager->joinResult('contact_id', 'prop_contacts', 'id', 'company_name', null, true);
     $pager->addPageTags($page_tags);
     $pager->cacheQueries();
     $this->content = $pager->get();
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:31,代码来源:Base.php

示例2: getSubLink

 public function getSubLink($text, $parentVars)
 {
     $regularLink = PHPWS_Text::moduleLink(dgettext('hms', $text), 'hms', $parentVars);
     $nakedDisplayCmd = CommandFactory::getCommand('SelectResidenceHall');
     $nakedDisplayCmd->setTitle('Hall Overview');
     $nakedDisplayCmd->setOnSelectCmd(CommandFactory::getCommand('HallOverviewNakedDisplay'));
     return $regularLink . ' [' . $nakedDisplayCmd->getLink('Printable') . ']';
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:8,代码来源:HallOverviewCommand.php

示例3: getTitle

 public function getTitle($linkable = true)
 {
     if ($linkable) {
         $vars['mod_title'] = $this->module;
         return PHPWS_Text::moduleLink($this->title, 'rss', $vars);
     } else {
         return $this->title;
     }
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:9,代码来源:Channel.php

示例4: new_account

/**
 * @author Matthew McNaney
 * @version $Id$
 */
function new_account($item)
{
    if (!PHPWS_User::getUserSetting('new_user_method') > 0) {
        $msg = dgettext('users', 'New user signup is currently disabled.');
        return $msg;
    }
    $signup_vars = array('action' => 'user', 'command' => 'signup_user');
    if (!empty($item[1])) {
        $link = strip_tags($item[1]);
    } else {
        $link = USER_SIGNUP_QUESTION;
    }
    return PHPWS_Text::moduleLink($link, 'users', $signup_vars);
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:18,代码来源:parse.php

示例5: show

 public function show()
 {
     $tpl = array();
     $tpl['VIEW_APPLICATION'] = PHPWS_Text::secureLink(_('View My Application'), 'hms', array('type' => 'student', 'op' => 'view_application'));
     $tpl['MAIN_MENU_LINK'] = PHPWS_Text::secureLink(_('Back to Main Menu'), 'hms', array('type' => 'student', 'op' => 'main'));
     $tpl['LOGOUT_LINK'] = PHPWS_Text::moduleLink(_('Logout'), 'users', array('action' => 'user', 'command' => 'logout'));
     // TODO HMS_Entry_Term is deprecated, use something else
     PHPWS_Core::initModClass('hms', 'HMS_Entry_Term.php');
     if (HMS_Entry_Term::get_entry_semester($_SESSION['asu_username']) == TERM_FALL) {
         $tpl['RLC_LINK'] = PHPWS_Text::secureLink(_('Residential Learning Communities Application'), 'hms', array('type' => 'student', 'op' => 'show_rlc_application_form'));
     }
     Layout::addPageTitle("Thank you");
     return PHPWS_Template::process($tpl, 'hms', 'student/student_application_thankyou.tpl');
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:14,代码来源:HousingApplicationThanksView.php

示例6: plug

 public static function plug()
 {
     $tpl = array();
     $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Menu', 'intern');
     $tpl['ADD_LINK'] = PHPWS_Text::moduleLink('Add Student', 'intern', array('action' => 'edit_internship'));
     $tpl['SEARCH_LINK'] = PHPWS_Text::moduleLink('Search', 'intern', array('action' => 'search'));
     $auth = Current_User::getAuthorization();
     $tpl['USER_FULL_NAME'] = Current_User::getDisplayName();
     $tpl['LOGOUT_URI'] = $auth->logout_link;
     $adminOptions = array();
     // Edit list of majors
     if (Current_User::allow('intern', 'edit_major')) {
         $adminOptions['EDIT_MAJORS_LINK'] = PHPWS_Text::secureLink('Edit Undergraduate Majors', 'intern', array('action' => MAJOR_EDIT));
     }
     // Edit list grad programs
     if (Current_User::allow('intern', 'edit_grad_prog')) {
         $adminOptions['EDIT_GRAD_LINK'] = PHPWS_Text::secureLink('Edit Graduate Programs', 'intern', array('action' => GRAD_PROG_EDIT));
     }
     // Edit departments
     if (Current_User::allow('intern', 'edit_dept')) {
         $adminOptions['EDIT_DEPARTMENTS_LINK'] = PHPWS_Text::secureLink('Edit Departments', 'intern', array('action' => DEPT_EDIT));
     }
     // Edit list of states
     if (Current_User::allow('intern', 'edit_states')) {
         $adminOptions['EDIT_STATES_LINK'] = PHPWS_Text::secureLink('Edit States', 'intern', array('action' => STATE_EDIT));
     }
     if (Current_User::isDeity()) {
         $adminOptions['CONTROL_PANEL'] = PHPWS_Text::secureLink('Control Panel', 'controlpanel');
         $adminOptions['EDIT_ADMINS_LINK'] = PHPWS_Text::secureLink('Edit Administrators', 'intern', array('action' => 'edit_admins'));
     }
     // If any admin options were added, them show the dropdown and merge those
     // links into the main set of template tags
     if (sizeof($adminOptions) > 0) {
         $tpl['ADMIN_OPTIONS'] = '';
         // dummy var to show dropdown menu in template
         $tpl = array_merge($tpl, $adminOptions);
     }
     Layout::plug(PHPWS_Template::process($tpl, 'intern', 'top.tpl'), 'NAV_LINKS');
 }
开发者ID:jeffrafter,项目名称:InternshipInventory,代码行数:39,代码来源:TopUI.php

示例7: diff

 /**
  * Diff
  *
  * Main function: Calls the diff and render, then outputs to layout
  *
  * @author Greg Meiste <greg.meiste+github@gmail.com>
  */
 function diff($oVer, $nVer)
 {
     PHPWS_Core::initModClass('wiki', 'OldWikiPage.php');
     $olderpage = new OldWikiPage();
     $newerpage = new OldWikiPage();
     $db = new PHPWS_DB('wiki_pages_version');
     $db->addWhere('title', $_REQUEST['page']);
     $db->addWhere('vr_number', $oVer);
     $db->loadObject($olderpage);
     $db->reset();
     $db->addWhere('title', $_REQUEST['page']);
     $db->addWhere('vr_number', $nVer);
     $db->loadObject($newerpage);
     // Need to parse the text, but we can't call parseOutput or this module's
     // transform function.  They both do too much parsing and can't be used
     // for a diff.  So, we call what is needed directly:
     $oPagetext = htmlspecialchars(str_replace("&#39;", "'", $olderpage->getPagetext(FALSE)));
     $nPagetext = htmlspecialchars(str_replace("&#39;", "'", $newerpage->getPagetext(FALSE)));
     if (!ALLOW_PROFANITY) {
         $oPagetext = PHPWS_Text::profanityFilter($oPagetext);
         $nPagetext = PHPWS_Text::profanityFilter($nPagetext);
     }
     // End diff text parsing
     $oPagetext = explode("\n", $oPagetext);
     $nPageText = explode("\n", $nPagetext);
     $diff = new Text_Diff($oPagetext, $nPageText);
     $this->render($diff);
     $tags = array();
     $tags['TITLE'] = dgettext('wiki', 'Difference between revisions');
     $tags['BACK_PAGE'] = PHPWS_Text::moduleLink(dgettext('wiki', 'Back to Page'), 'wiki', array('page' => $_REQUEST['page']));
     $tags['BACK_HISTORY'] = PHPWS_Text::moduleLink(dgettext('wiki', 'Back to History'), 'wiki', array('page_op' => 'history', 'page_id' => $newerpage->getSourceId()));
     $tags['DIFF'] = $this->_output;
     $tags['OLDER_VERSION'] = $olderpage->getVrNumber();
     $tags['NEWER_VERSION'] = $newerpage->getVrNumber();
     $tags['OLDER_UPDATED'] = $olderpage->getUpdated();
     $tags['NEWER_UPDATED'] = $newerpage->getUpdated();
     $tags['VERSION_LABEL'] = dgettext('wiki', 'Version');
     return PHPWS_Template::process($tags, 'wiki', 'diff/' . $this->_format . '/diff.tpl');
 }
开发者ID:Jopperi,项目名称:wiki,代码行数:46,代码来源:WikiDiff.php

示例8: upcomingEvents

 public function upcomingEvents()
 {
     $db = new PHPWS_DB('calendar_schedule');
     $db->addWhere('show_upcoming', 0, '>');
     $db->addWhere('public', 1);
     Key::restrictView($db, 'calendar');
     $result = $db->getObjects('Calendar_Schedule');
     if (PHPWS_Error::logIfError($result) || !$result) {
         return null;
     }
     $startdate = time();
     foreach ($result as $schedule) {
         $tpl = array();
         switch ($schedule->show_upcoming) {
             case 1:
                 // one week
                 $days_ahead = 7;
                 break;
             case 2:
                 // two weeks
                 $days_ahead = 14;
                 break;
             case 3:
                 // one month
                 $days_ahead = 30;
                 break;
         }
         $enddate = $startdate + 86400 * $days_ahead;
         $event_list = $schedule->getEvents($startdate, $enddate);
         if (!$event_list) {
             continue;
         }
         $tpl['TITLE'] = $schedule->getViewLink();
         $current_day = null;
         $count = 0;
         if (empty($event_list)) {
             continue;
         }
         foreach ($event_list as $event) {
             $vars = array('view' => 'day', 'date' => $event->start_time, 'sch_id' => $schedule->id);
             $tpl['events'][$count] = $event->getTpl();
             if ($current_day != strftime(CALENDAR_UPCOMING_FORMAT, $event->start_time)) {
                 $current_day = strftime(CALENDAR_UPCOMING_FORMAT, $event->start_time);
                 $tpl['events'][$count]['DAY'] = PHPWS_Text::moduleLink($current_day, 'calendar', $vars);
             } else {
                 $tpl['events'][$count]['DAY'] = null;
             }
             $count++;
         }
         $upcoming[] = PHPWS_Template::process($tpl, 'calendar', 'view/upcoming.tpl');
     }
     if (!empty($upcoming)) {
         $ftpl['TITLE'] = dgettext('calendar', 'Upcoming events');
         $ftpl['CONTENT'] = implode("\n", $upcoming);
         return PHPWS_Template::process($ftpl, 'calendar', 'user_main.tpl');
     } else {
         return null;
     }
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:59,代码来源:User.php

示例9: getRowTags

 /**
  * Row tags for DBPager
  */
 public function getRowTags()
 {
     PHPWS_Core::initModClass('intern', 'Term.php');
     $tags = array();
     // Get objects associated with this internship.
     $a = $this->getAgency();
     $d = $this->getDepartment();
     // Student info.
     $tags['STUDENT_NAME'] = PHPWS_Text::moduleLink($this->getFullName(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     $tags['STUDENT_BANNER'] = PHPWS_Text::moduleLink($this->getBannerId(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     // Dept. info
     $tags['DEPT_NAME'] = PHPWS_Text::moduleLink($d->name, 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     // Faculty info.
     if (isset($this->faculty_id)) {
         $f = $this->getFaculty();
         $facultyName = $f->getFullName();
         $tags['FACULTY_NAME'] = PHPWS_Text::moduleLink($f->getFullName(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     } else {
         // Makes this cell in the table a clickable link, even if there's no faculty name
         $tags['FACULTY_NAME'] = PHPWS_Text::moduleLink('&nbsp;', 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     }
     $tags['TERM'] = PHPWS_Text::moduleLink(Term::rawToRead($this->term), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     $tags['WORKFLOW_STATE'] = PHPWS_Text::moduleLink($this->getWorkflowState()->getFriendlyName(), 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     //$tags['EDIT'] = PHPWS_Text::moduleLink('Edit', 'intern', array('action' => 'edit_internship', 'internship_id' => $this->id));
     //$tags['PDF'] = PHPWS_Text::moduleLink('Generate Contract', 'intern', array('action' => 'pdf', 'id' => $this->id));
     return $tags;
 }
开发者ID:jeffrafter,项目名称:InternshipInventory,代码行数:30,代码来源:Internship.php

示例10: getDownloadLink

 /**
  * Get the link to download this document.
  */
 public function getDownloadLink()
 {
     \PHPWS_Core::initModClass('filecabinet', 'Document.php');
     $doc = new \PHPWS_Document($this->document_fc_id);
     return \PHPWS_Text::moduleLink($doc->title, 'filecabinet', array('id' => $doc->id));
 }
开发者ID:jlbooker,项目名称:InternshipInventory,代码行数:9,代码来源:InternDocument.php

示例11: event_form


//.........这里部分代码省略.........
     $form->setLabel('all_day', dgettext('calendar', 'All day event'));
     $form->setExtra('all_day', 'onchange="alter_date(this)"');
     if (!$suggest) {
         $form->addCheck('show_busy', 1);
         $form->setMatch('show_busy', $event->show_busy);
         $form->setLabel('show_busy', dgettext('calendar', 'Show busy'));
     }
     if ($suggest) {
         $form->addSubmit('save', dgettext('calendar', 'Suggest event'));
     } else {
         // Suggested events are not allowed repeats
         /**
          * Repeat form elements
          */
         $form->addCheck('repeat_event', 1);
         $form->setLabel('repeat_event', dgettext('calendar', 'Make a repeating event'));
         $form->addText('end_repeat_date', $event->getEndRepeat('%Y/%m/%d'));
         $form->setLabel('end_repeat_date', dgettext('calendar', 'Repeat event until:'));
         $modes = array('daily', 'weekly', 'monthly', 'yearly', 'every');
         $modes_label = array(dgettext('calendar', 'Daily'), dgettext('calendar', 'Weekly'), dgettext('calendar', 'Monthly'), dgettext('calendar', 'Yearly'), dgettext('calendar', 'Every'));
         $form->addRadio('repeat_mode', $modes);
         $form->setLabel('repeat_mode', $modes_label);
         $weekdays = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7);
         $weekday_labels = array(1 => strftime('%A', mktime(0, 0, 0, 1, 5, 1970)), 2 => strftime('%A', mktime(0, 0, 0, 1, 6, 1970)), 3 => strftime('%A', mktime(0, 0, 0, 1, 7, 1970)), 4 => strftime('%A', mktime(0, 0, 0, 1, 8, 1970)), 5 => strftime('%A', mktime(0, 0, 0, 1, 9, 1970)), 6 => strftime('%A', mktime(0, 0, 0, 1, 10, 1970)), 7 => strftime('%A', mktime(0, 0, 0, 1, 11, 1970)));
         $form->addCheck('weekday_repeat', $weekdays);
         $form->setLabel('weekday_repeat', $weekday_labels);
         $monthly = array('begin' => dgettext('calendar', 'Beginning of each month'), 'end' => dgettext('calendar', 'End of each month'), 'start' => dgettext('calendar', 'Every month on start date'));
         $form->addSelect('monthly_repeat', $monthly);
         $every_repeat_week = array(1 => dgettext('calendar', '1st'), 2 => dgettext('calendar', '2nd'), 3 => dgettext('calendar', '3rd'), 4 => dgettext('calendar', '4th'), 5 => dgettext('calendar', 'Last'));
         $frequency = array('every_month' => dgettext('calendar', 'Every month'), 1 => strftime('%B', mktime(0, 0, 0, 1, 1, 1970)), 2 => strftime('%B', mktime(0, 0, 0, 2, 1, 1970)), 3 => strftime('%B', mktime(0, 0, 0, 3, 1, 1970)), 4 => strftime('%B', mktime(0, 0, 0, 4, 1, 1970)), 5 => strftime('%B', mktime(0, 0, 0, 5, 1, 1970)), 6 => strftime('%B', mktime(0, 0, 0, 6, 1, 1970)), 7 => strftime('%B', mktime(0, 0, 0, 7, 1, 1970)), 8 => strftime('%B', mktime(0, 0, 0, 8, 1, 1970)), 9 => strftime('%B', mktime(0, 0, 0, 9, 1, 1970)), 10 => strftime('%B', mktime(0, 0, 0, 10, 1, 1970)), 11 => strftime('%B', mktime(0, 0, 0, 11, 1, 1970)), 12 => strftime('%B', mktime(0, 0, 0, 12, 1, 1970)));
         $form->addSelect('every_repeat_number', $every_repeat_week);
         $form->addSelect('every_repeat_weekday', $weekday_labels);
         $form->addSelect('every_repeat_frequency', $frequency);
         /* set repeat form matches */
         if (!empty($event->repeat_type)) {
             $repeat_info = explode(':', $event->repeat_type);
             $repeat_mode_match = $repeat_info[0];
             if (isset($repeat_info[1])) {
                 $repeat_vars = explode(';', $repeat_info[1]);
             } else {
                 $repeat_vars = null;
             }
             $form->setMatch('repeat_mode', $repeat_mode_match);
             switch ($repeat_mode_match) {
                 case 'weekly':
                     $form->setMatch('weekday_repeat', $repeat_vars);
                     break;
                 case 'monthly':
                     $form->setMatch('monthly_repeat', $repeat_vars[0]);
                     break;
                 case 'every':
                     $form->setMatch('every_repeat_number', $repeat_vars[0]);
                     $form->setMatch('every_repeat_weekday', $repeat_vars[1]);
                     $form->setMatch('every_repeat_frequency', $repeat_vars[2]);
                     break;
             }
             $form->setMatch('repeat_event', 1);
         }
         if ($event->pid) {
             $form->addHidden('pid', $event->pid);
             // This is a repeat copy, if saved it removes it from the copy list
             $form->addSubmit('save', dgettext('calendar', 'Save and remove repeat'));
             $form->setExtra('save', sprintf('onclick="return confirm(\'%s\')"', dgettext('calendar', 'Remove event from repeat list?')));
         } elseif ($event->id && $event->repeat_type) {
             // This is event is a source repeating event
             // Save this
             // Not sure if coding this portion. commenting for now
             // $form->addSubmit('save_source', dgettext('calendar', 'Save this event only'));
             $form->addSubmit('save_copy', dgettext('calendar', 'Save and apply to repeats'));
             $form->setExtra('save_copy', sprintf('onclick="return confirm(\'%s\')"', dgettext('calendar', 'Apply changes to repeats?')));
         } else {
             // this is a non-repeating event
             $form->addSubmit('save', dgettext('calendar', 'Save event'));
         }
     }
     $tpl = $form->getTemplate();
     if (!$suggest) {
         $tpl['EVENT_TAB'] = dgettext('calendar', 'Event');
         $tpl['REPEAT_TAB'] = dgettext('calendar', 'Repeat');
     }
     if (isset($event->_error)) {
         $tpl['ERROR'] = implode('<br />', $event->_error);
     }
     if ($event->pid) {
         $linkvar['aop'] = 'edit_event';
         $linkvar['sch_id'] = $event->_schedule->id;
         $linkvar['event_id'] = $event->pid;
         if (javascriptEnabled()) {
             $linkvar['js'] = 1;
         }
         $source_link = PHPWS_Text::moduleLink(dgettext('calendar', 'Click here if you would prefer to edit the source event.'), 'calendar', $linkvar);
         $tpl['REPEAT_WARNING'] = dgettext('calendar', 'This is a repeat of another event.') . '<br />' . $source_link;
     }
     $tpl['SYNC'] = sprintf('<input type="button" style="display : none" id="sync-dates" onclick="sync_dates(); return false;" name="sync-dates" value="%s" />', dgettext('calendar', 'Sync dates'));
     if (javascriptEnabled()) {
         Layout::addJSHeader('<script src="' . PHPWS_SOURCE_HTTP . 'mod/calendar/javascript/edit_event/head.js"></script>');
         Layout::addJSHeader('<script src="' . PHPWS_SOURCE_HTTP . 'mod/calendar/javascript/check_date/head.js"></script>');
     }
     return PHPWS_Template::process($tpl, 'calendar', 'admin/forms/edit_event.tpl');
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:101,代码来源:Admin.php

示例12: getSubLink

 public function getSubLink($text, $parentVars)
 {
     return PHPWS_Text::moduleLink(dgettext('hms', $text), 'hms', $parentVars);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:4,代码来源:HallOverviewNakedDisplayCommand.php

示例13: getRowTags

 /**
  * Row tags for DBPager.
  */
 public function getRowTags()
 {
     $tags = array();
     $tags['ID'] = $this->id;
     if ($this->isHidden()) {
         $tags['NAME'] = "<span id='{$this->id}' class='{$this->id} prog hidden-prog'>{$this->name}</span>";
     } else {
         $tags['NAME'] = "<span id='{$this->id}' class='{$this->id} prog'>{$this->name}</span>";
     }
     if (Current_User::allow('intern', $this->getEditPermission())) {
         $tags['EDIT'] = "<span id='edit-{$this->id}' class='{$this->id} edit-prog'>Edit</span> | ";
         if ($this->isHidden()) {
             $tags['HIDE'] = PHPWS_Text::moduleLink('Show', 'intern', array('action' => $this->getEditAction(), 'hide' => false, 'id' => $this->getId()));
         } else {
             $tags['HIDE'] = PHPWS_Text::moduleLink('Hide', 'intern', array('action' => $this->getEditAction(), 'hide' => true, 'id' => $this->getId()));
         }
     }
     if (Current_User::allow('intern', $this->getDeletePermission())) {
         $div = null;
         if (isset($tags['HIDE'])) {
             $div = ' | ';
         }
         $tags['DELETE'] = $div . PHPWS_Text::moduleLink('Delete', 'intern', array('action' => $this->getEditAction(), 'del' => TRUE, 'id' => $this->getID()));
     }
     return $tags;
 }
开发者ID:jeffrafter,项目名称:InternshipInventory,代码行数:29,代码来源:Editable.php

示例14: miniLinks

 public static function miniLinks()
 {
     $vars['action'] = 'admin';
     if (Layout::isMoveBox()) {
         $vars['command'] = 'turn_off_box_move';
         $links[] = PHPWS_Text::moduleLink('<i class="fa fa-toggle-on"></i> ' . dgettext('layout', 'Turn box move off'), 'layout', $vars);
     } else {
         $vars['command'] = 'move_boxes_on';
         $links[] = PHPWS_Text::secureLink('<i class="fa fa-toggle-off"></i> ' . dgettext('layout', 'Turn box move on'), 'layout', $vars);
     }
     unset($vars['command']);
     $vars['tab'] = 'meta';
     $links[] = PHPWS_Text::secureLink('<i class="fa fa-edit"></i> ' . dgettext('layout', 'Change Website Title'), 'layout', $vars);
     $key = Key::getCurrent();
     if (javascriptEnabled() && Layout::getExtraStyles() && Key::checkKey($key)) {
         $js_vars['width'] = 400;
         $js_vars['height'] = 200;
         $vars['key_id'] = $key->id;
         $vars['action'] = 'admin';
         $js_vars['label'] = '<i class="fa fa-paint-brush"></i> ' . dgettext('layout', 'Change style');
         $vars['command'] = 'js_style_change';
         $js_vars['address'] = PHPWS_Text::linkAddress('layout', $vars, TRUE);
         $links[] = javascript('open_window', $js_vars);
         if (!$key->isHomeKey()) {
             $js_vars['height'] = 400;
             $js_vars['label'] = dgettext('layout', 'Meta tags');
             $vars['command'] = 'page_meta_tags';
             $js_vars['address'] = PHPWS_Text::linkAddress('layout', $vars, TRUE);
             $links[] = javascript('open_window', $js_vars);
         }
     }
     if (!isset($links)) {
         return;
     }
     MiniAdmin::add('layout', $links);
     // MiniAdmin runs get before layout and runtime won't work
     // with flagged keys
     MiniAdmin::get();
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:39,代码来源:Layout.php

示例15: row_tags

 public function row_tags($subpage = false)
 {
     $vars['uop'] = 'view_page';
     $tpl['ID'] = $vars['id'] = $this->id;
     $tpl['TITLE'] = PHPWS_Text::moduleLink($this->title, 'pagesmith', $vars);
     if (Current_User::allow('pagesmith', 'edit_page', $this->id)) {
         $links[] = $this->editLink(null, true);
     }
     if (Current_User::allow('pagesmith', 'delete_page')) {
         $links[] = $this->deleteLink(true);
     }
     if (Current_User::allow('pagesmith', 'edit_page', $this->id)) {
         if (!$subpage) {
             $links[] = $this->frontPageToggle(true);
         }
     }
     if (isset($links)) {
         $tpl['ACTION'] = implode(' ', $links);
     }
     $tpl['CREATE_DATE'] = strftime('%d %b %y, %H:%M', $this->create_date);
     $tpl['LAST_UPDATED'] = strftime('%d %b %y, %H:%M', $this->last_updated);
     $tpl['UPDATER'] = $this->_updater;
     if ($subpage) {
         $tpl['PAGE_NO'] = $this->page_order + 1;
     }
     return $tpl;
 }
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:27,代码来源:PS_Page.php


注:本文中的PHPWS_Text::moduleLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。