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


PHP html::div方法代码示例

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


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

示例1: sign_up_sign_in

 public static function sign_up_sign_in($url)
 {
     // TODO: add sign in as guest.
     $dropdown_content = array('class' => 'dropdown-menu', 'style' => 'padding: 15px; padding-bottom: 0px;');
     $form = array('method' => 'post', 'action' => $url, 'accept-charset' => 'UTF-8');
     $username = array('type' => 'text', 'placeholder' => 'Username', 'id' => 'username', 'name' => 'username');
     $password = array('type' => 'password', 'placeholder' => 'Password', 'id' => 'password', 'name' => 'password');
     $submit = array('value' => 'Sign In', 'class' => 'btn btn-primary btn-block', 'id' => 'sign-in');
     return html::ul('nav pull-right', html::li(html::a(new moodle_url('/login/signup.php'), 'Sign Up')) . bootstrap::list_divider() . bootstrap::dropdown('Sign In', html::div($dropdown_content, html::form($form, html::input($username) . html::input($password) . html::checkbox('rememberusername', 'Remember username') . html::submit($submit)))));
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:10,代码来源:bootsnipp.php

示例2: addition_folder_options

 public function addition_folder_options()
 {
     $this->add_texts('localization/');
     $li = '';
     $li .= html::tag('li', null, $this->api->output->button(array('command' => 'plugin.contextmenu.readfolder', 'type' => 'link', 'class' => 'readfolder', 'label' => 'contextmenu.markreadfolder')));
     $li .= html::tag('li', null, $this->api->output->button(array('command' => 'plugin.contextmenu.collapseall', 'type' => 'link', 'class' => 'collapseall rcmglobal', 'label' => 'contextmenu.collapseall')));
     $li .= html::tag('li', null, $this->api->output->button(array('command' => 'plugin.contextmenu.expandall', 'type' => 'link', 'class' => 'expandall rcmglobal', 'label' => 'contextmenu.expandall')));
     $li .= html::tag('li', null, $this->api->output->button(array('command' => 'plugin.contextmenu.openfolder', 'type' => 'link', 'class' => 'openfolder rcmglobal', 'label' => 'openinextwin')));
     $out = html::tag('ul', array('id' => 'rcmFolderMenu'), $li);
     $this->api->output->add_footer(html::div(array('style' => 'display: none;'), $out));
 }
开发者ID:zamentur,项目名称:roundcube_ynh,代码行数:11,代码来源:contextmenu.php

示例3: errorHandler

function errorHandler($eNro, $eStr, $eFile, $eLine)
{
    $estr = array('1' => 'E_ERROR', '2' => 'E_WARNING', '4' => 'E_PARSE', '8' => 'E_NOTICE', '16' => 'E_CORE_ERROR', '32' => 'E_CORE_WARNING', '64' => 'E_COMPILE_ERROR', '128' => 'E_COMPILE_WARNING', '256' => 'E_USER_ERROR', '512' => 'E_USER_WARNING', '1024' => 'E_USER_NOTICE', '2048' => 'E_STRICT', '4096' => 'E_RECOVERABLE_ERROR', '8192' => 'E_ALL');
    // Requerir clases.
    require_once basePath . '/lib/class.html.php';
    require_once basePath . '/lib/module.main.php';
    require_once basePath . '/lib/module.backend.php';
    // Instaciar clases principales.
    $class = new \docuprensa\backend\authenticate();
    $tag = new \html();
    $html = null;
    if (eReporing == 'E_ALL') {
        $html .= $tag->div('Número de error: ' . $eNro . ' (' . $estr[$eNro] . ')', 'msgError');
        $html .= $tag->div('Mensaje de error: ' . $eStr, 'msgError');
        $html .= $tag->div('Archivo de error: ' . $eFile, 'msgError');
        $html .= $tag->div('Línea del error: ' . $eLine, 'msgError');
    }
    $html .= $class->form_login();
    echo $html;
    die;
}
开发者ID:serggiod,项目名称:documentos-prensa,代码行数:21,代码来源:app.php

示例4: addition_addressbook_options

 public function addition_addressbook_options()
 {
     $this->add_texts('localization/');
     $li = '';
     $li .= html::tag('li', array('role' => 'menuitem'), $this->api->output->button(array('command' => 'plugin.contextmenu.assigngroup', 'type' => 'link', 'class' => 'assigngroup disabled', 'classact' => 'assigngroup active', 'label' => 'contextmenu.assigngroup', 'tabindex' => '-1', 'aria-disabled' => 'true')));
     if (count(rcube::get_instance()->get_address_sources(true)) > 1) {
         // only show the move option if there are sources to move between
         $li .= html::tag('li', array('role' => 'menuitem'), $this->api->output->button(array('command' => 'move', 'type' => 'link', 'class' => 'movecontact disabled', 'classact' => 'movecontact active', 'label' => 'moveto', 'tabindex' => '-1', 'aria-disabled' => 'true')));
         $li .= html::tag('li', array('role' => 'menuitem'), $this->api->output->button(array('command' => 'copy', 'type' => 'link', 'class' => 'copycontact disabled', 'classact' => 'copycontact active', 'label' => 'copyto', 'tabindex' => '-1', 'aria-disabled' => 'true')));
     }
     $out = html::tag('ul', array('id' => 'rcmAddressBookMenu', 'role' => 'menu'), $li);
     $this->api->output->add_footer(html::div(array('style' => 'display: none;', 'aria-hidden' => 'true'), $out));
 }
开发者ID:nciftci,项目名称:plugins,代码行数:13,代码来源:contextmenu.php

示例5: calendar

 /**
  * see html::calendar()
  */
 public static function calendar($options = [])
 {
     // include js & css files
     if (empty($options['readonly'])) {
         layout::add_js('/numbers/media_submodules/numbers_frontend_components_calendar_numbers_media_js_base.js');
         layout::add_css('/numbers/media_submodules/numbers_frontend_components_calendar_numbers_media_css_base.css');
     }
     // font awesome icons
     library::add('fontawesome');
     // widget parameters
     $type = $options['calendar_type'] ?? $options['type'] ?? 'date';
     $widget_options = ['id' => $options['id'], 'type' => $type, 'format' => $options['calendar_format'] ?? format::get_date_format($type), 'date_week_start_day' => $options['calendar_date_week_start_day'] ?? 1, 'date_disable_week_days' => $options['calendar_date_disable_week_days'] ?? null, 'master_id' => $options['calendar_master_id'] ?? null, 'slave_id' => $options['calendar_slave_id'] ?? null];
     $options['type'] = 'text';
     // determine input size
     $placeholder = format::get_date_placeholder($widget_options['format']);
     $options['size'] = strlen($placeholder);
     // set placeholder
     if (!empty($options['placeholder']) && $options['placeholder'] == 'format::get_date_placeholder') {
         $options['placeholder'] = $placeholder;
         $options['title'] = ($options['title'] ?? '') . ' (' . $placeholder . ')';
     }
     if (isset($options['calendar_icon']) && ($options['calendar_icon'] == 'left' || $options['calendar_icon'] == 'right')) {
         $position = $options['calendar_icon'];
         if (i18n::rtl()) {
             if ($position == 'left') {
                 $position = 'right';
             } else {
                 $position = 'left';
             }
         }
         $icon_type = $type == 'time' ? 'clock-o' : 'calendar';
         unset($options['calendar_icon']);
         if (empty($options['readonly'])) {
             $icon_onclick = 'numbers_calendar_var_' . $options['id'] . '.show();';
         } else {
             $icon_onclick = null;
         }
         $icon_value = html::span(['onclick' => $icon_onclick, 'class' => 'numbers_calendar_icon numbers_prevent_selection', 'value' => html::icon(['type' => $icon_type])]);
         $result = html::input_group(['value' => html::input($options), $position => $icon_value, 'dir' => 'ltr']);
         $div_id = $options['id'] . '_div_holder';
         $result .= html::div(['id' => $div_id, 'class' => 'numbers_calendar_div_holder']);
         $widget_options['holder_div_id'] = $div_id;
     } else {
         $result = html::input($options);
     }
     // we do not render a widget if readonly
     if (empty($options['readonly'])) {
         layout::onload('numbers_calendar(' . json_encode($widget_options) . ');');
     }
     return $result;
 }
开发者ID:volodymyr-volynets,项目名称:frontend,代码行数:54,代码来源:base.php

示例6: forward_form

 public function forward_form()
 {
     $table = new html_table(array('cols' => 2));
     $field_id = 'forwardforwards';
     $text_forwardforwards = new html_textarea(array('name' => '_forwardforwards', 'id' => $field_id, 'spellcheck' => 1, 'rows' => 6, 'cols' => 40));
     $table->add('title', html::label($field_id, Q($this->gettext('forwardforwards'))));
     $table->add(null, $text_forwardforwards->show($this->obj->get_forward_forwards()));
     $field_id = 'forwardkeepcopies';
     $input_forwardkeepcopies = new html_checkbox(array('name' => '_forwardkeepcopies', 'id' => $field_id, 'value' => 1));
     $table->add('title', html::label($field_id, Q($this->gettext('forwardkeepcopies'))));
     $table->add(null, $input_forwardkeepcopies->show($this->obj->is_forward_keepcopies() === true || $this->obj->is_forward_keepcopies() == "1" || $this->obj->is_forward_keepcopies() == "t" || $this->obj->is_forward_keepcopies() == "y" || $this->obj->is_forward_keepcopies() == "yes" ? 1 : 0));
     $out = html::div(array('class' => "box"), html::div(array('id' => "prefs-title", 'class' => 'boxtitle'), $this->gettext('forward')) . html::div(array('class' => "boxcontent"), $table->show() . html::p(null, $this->rc->output->button(array('command' => 'plugin.forward-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
     $this->rc->output->add_gui_object('forwardform', 'forward-form');
     return $this->rc->output->form_tag(array('id' => 'forward-form', 'name' => 'forward-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.forward-save'), $out);
 }
开发者ID:freedomson,项目名称:roundcube-forward,代码行数:15,代码来源:forward.php

示例7: download_menu

 /**
  * Adds download options menu to the page
  */
 public function download_menu()
 {
     $this->include_script('zipdownload.js');
     $this->add_label('download');
     $rcmail = rcmail::get_instance();
     $menu = array();
     $ul_attr = array('role' => 'menu', 'aria-labelledby' => 'aria-label-zipdownloadmenu');
     if ($rcmail->config->get('skin') != 'classic') {
         $ul_attr['class'] = 'toolbarmenu';
     }
     foreach (array('eml', 'mbox', 'maildir') as $type) {
         $menu[] = html::tag('li', null, $rcmail->output->button(array('command' => "download-{$type}", 'label' => "zipdownload.download{$type}", 'classact' => 'active')));
     }
     $rcmail->output->add_footer(html::div(array('id' => 'zipdownload-menu', 'class' => 'popupmenu', 'aria-hidden' => 'true'), html::tag('h2', array('class' => 'voice', 'id' => 'aria-label-zipdownloadmenu'), "Message Download Options Menu") . html::tag('ul', $ul_attr, implode('', $menu))));
 }
开发者ID:alecchisi,项目名称:roundcubemail,代码行数:18,代码来源:zipdownload.php

示例8: buildTable

    private function buildTable($data)
    {
        $id = uniqid('table');
        $tvpag = <<<EOT
function table_setpage(tableid,page) {
    alert('Set page ' + page);
}
EOT;
        App::document()->addInlineScript($tvpag, 'text/javascript', 'tableview-pagination');
        $hc = empty($this->options['header-columns']) ? 0 : $this->options['header-columns'];
        $hr = empty($this->options['header-rows']) ? 0 : $this->options['header-rows'];
        $rows = [];
        $ri = 0;
        $ipp = $this->options['items-per-page'];
        foreach ($data as $row) {
            $ri++;
            $ci = 0;
            $cols = [];
            foreach ($row as $col) {
                $ci++;
                if ($ci <= $hc || $ri <= $hr) {
                    $cols[] = html::th($col);
                } else {
                    $cols[] = html::td($col);
                }
            }
            $rows[] = html::tr(join($cols));
            if ($ipp && $ri > $ipp) {
                break;
            }
        }
        $table = html::table(join($rows), ['class' => $this->options['table-class'], 'style' => 'width:100%;']);
        if ($ipp) {
            $page = 0;
            $numpages = floor((count($data) - 1) / $ipp) + 1;
            $pagelinks = html::a(' &laquo; First ', ['href' => 'javascript:return false;']);
            $pagelinks .= html::a(' &lsaquo; Prev ', ['href' => 'javascript:return false;']);
            for ($n = 1; $n <= $numpages; $n++) {
                $pagelinks .= html::a(' {page} ', ['href' => 'javascript:return false;'], ['page' => $n]);
            }
            $pagelinks .= html::a(' Next &rsaquo; ', ['href' => 'javascript:return false;']);
            $pagelinks .= html::a(' Last &raquo; ', ['href' => 'javascript:return false;']);
            $table .= html::div('Page {page} of {pages} ({items} items) {links}', ['class' => $this->options['footer-class']], ['page' => $page + 1, 'pages' => $numpages, 'items' => count($data), 'links' => $pagelinks]);
        }
        return html::div($table, ['style' => 'width:99%']);
    }
开发者ID:noccy80,项目名称:cherryphp,代码行数:46,代码来源:tableview.php

示例9: render_page

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog']) {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => "text", 'name' => "_name", 'value' => $identity['name'])));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => "text", 'name' => "_email", 'value' => $identity['email'], 'disabled' => $identities_level == 1 || $identities_level == 3)));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::div(array('id' => "newuseroverlay"), html::tag('form', array('action' => $rcmail->url('plugin.newusersave'), 'method' => "post"), html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) . html::p('hint', Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => "formbuttons"), html::tag('input', array('type' => "submit", 'class' => "button mainaction", 'value' => $this->gettext('save')))))));
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:DavidGarciaCat,项目名称:eyeos,代码行数:22,代码来源:new_user_dialog.php

示例10: render_page

 /**
  * Callback function when HTML page is rendered
  * We'll add an overlay box here.
  */
 function render_page($p)
 {
     if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
         $this->add_texts('localization');
         $rcmail = rcmail::get_instance();
         $identity = $rcmail->user->get_identity();
         $identities_level = intval($rcmail->config->get('identities_level', 0));
         // compose user-identity dialog
         $table = new html_table(array('cols' => 2));
         $table->add('title', $this->gettext('name'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'])));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => idn_to_utf8($identity['email']), 'disabled' => $identities_level == 1 || $identities_level == 3)));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::div(array('id' => 'newuseroverlay'), html::tag('form', array('action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) . html::p('hint', Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save')))))));
         // disable keyboard events for messages list (#1486726)
         $rcmail->output->add_script("\$(document).ready(function () {\n          rcmail.message_list.key_press = function(){};\n          rcmail.message_list.key_down = function(){};\n          \$('input[name=_name]').focus();\n          });", 'foot');
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:shishenkov,项目名称:zpanel,代码行数:24,代码来源:new_user_dialog.php

示例11: input_group

 /**
  * @see html::input_group()
  */
 public static function input_group($options = [])
 {
     $temp = [];
     foreach (['left', 'center', 'right'] as $k0) {
         if ($k0 == 'center') {
             $temp[] = $options['value'];
         } else {
             if (!empty($options[$k0])) {
                 if (!is_array($options[$k0])) {
                     $options[$k0] = [$options[$k0]];
                 }
                 foreach ($options[$k0] as $k => $v) {
                     $temp[] = html::span(['value' => $v, 'class' => 'input-group-addon']);
                 }
             }
         }
     }
     unset($options['left'], $options['right']);
     $options['value'] = implode('', $temp);
     $options['class'] = 'input-group';
     return html::div($options);
 }
开发者ID:volodymyr-volynets,项目名称:frontend,代码行数:25,代码来源:base.php

示例12: recurrence_form

 /**
  * Generate the form for recurrence settings
  */
 public function recurrence_form($attrib = array())
 {
     switch ($attrib['part']) {
         // frequency selector
         case 'frequency':
             $select = new html_select(array('name' => 'frequency', 'id' => 'edit-recurrence-frequency'));
             $select->add($this->gettext('never'), '');
             $select->add($this->gettext('daily'), 'DAILY');
             $select->add($this->gettext('weekly'), 'WEEKLY');
             $select->add($this->gettext('monthly'), 'MONTHLY');
             $select->add($this->gettext('yearly'), 'YEARLY');
             $select->add($this->gettext('rdate'), 'RDATE');
             $html = html::label('edit-recurrence-frequency', $this->gettext('frequency')) . $select->show('');
             break;
             // daily recurrence
         // daily recurrence
         case 'daily':
             $select = $this->interval_selector(array('name' => 'interval', 'class' => 'edit-recurrence-interval', 'id' => 'edit-recurrence-interval-daily'));
             $html = html::div($attrib, html::label('edit-recurrence-interval-daily', $this->gettext('every')) . $select->show(1) . html::span('label-after', $this->gettext('days')));
             break;
             // weekly recurrence form
         // weekly recurrence form
         case 'weekly':
             $select = $this->interval_selector(array('name' => 'interval', 'class' => 'edit-recurrence-interval', 'id' => 'edit-recurrence-interval-weekly'));
             $html = html::div($attrib, html::label('edit-recurrence-interval-weekly', $this->gettext('every')) . $select->show(1) . html::span('label-after', $this->gettext('weeks')));
             // weekday selection
             $daymap = array('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat');
             $checkbox = new html_checkbox(array('name' => 'byday', 'class' => 'edit-recurrence-weekly-byday'));
             $first = $this->rc->config->get('calendar_first_day', 1);
             for ($weekdays = '', $j = $first; $j <= $first + 6; $j++) {
                 $d = $j % 7;
                 $weekdays .= html::label(array('class' => 'weekday'), $checkbox->show('', array('value' => strtoupper(substr($daymap[$d], 0, 2)))) . $this->gettext($daymap[$d])) . ' ';
             }
             $html .= html::div($attrib, html::label(null, $this->gettext('bydays')) . $weekdays);
             break;
             // monthly recurrence form
         // monthly recurrence form
         case 'monthly':
             $select = $this->interval_selector(array('name' => 'interval', 'class' => 'edit-recurrence-interval', 'id' => 'edit-recurrence-interval-monthly'));
             $html = html::div($attrib, html::label('edit-recurrence-interval-monthly', $this->gettext('every')) . $select->show(1) . html::span('label-after', $this->gettext('months')));
             $checkbox = new html_checkbox(array('name' => 'bymonthday', 'class' => 'edit-recurrence-monthly-bymonthday'));
             for ($monthdays = '', $d = 1; $d <= 31; $d++) {
                 $monthdays .= html::label(array('class' => 'monthday'), $checkbox->show('', array('value' => $d)) . $d);
                 $monthdays .= $d % 7 ? ' ' : html::br();
             }
             // rule selectors
             $radio = new html_radiobutton(array('name' => 'repeatmode', 'class' => 'edit-recurrence-monthly-mode'));
             $table = new html_table(array('cols' => 2, 'border' => 0, 'cellpadding' => 0, 'class' => 'formtable'));
             $table->add('label', html::label(null, $radio->show('BYMONTHDAY', array('value' => 'BYMONTHDAY')) . ' ' . $this->gettext('each')));
             $table->add(null, $monthdays);
             $table->add('label', html::label(null, $radio->show('', array('value' => 'BYDAY')) . ' ' . $this->gettext('onevery')));
             $table->add(null, $this->rrule_selectors($attrib['part']));
             $html .= html::div($attrib, $table->show());
             break;
             // annually recurrence form
         // annually recurrence form
         case 'yearly':
             $select = $this->interval_selector(array('name' => 'interval', 'class' => 'edit-recurrence-interval', 'id' => 'edit-recurrence-interval-yearly'));
             $html = html::div($attrib, html::label('edit-recurrence-interval-yearly', $this->gettext('every')) . $select->show(1) . html::span('label-after', $this->gettext('years')));
             // month selector
             $monthmap = array('', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec');
             $checkbox = new html_checkbox(array('name' => 'bymonth', 'class' => 'edit-recurrence-yearly-bymonth'));
             for ($months = '', $m = 1; $m <= 12; $m++) {
                 $months .= html::label(array('class' => 'month'), $checkbox->show(null, array('value' => $m)) . $this->gettext($monthmap[$m]));
                 $months .= $m % 4 ? ' ' : html::br();
             }
             $html .= html::div($attrib + array('id' => 'edit-recurrence-yearly-bymonthblock'), $months);
             // day rule selection
             $html .= html::div($attrib, html::label(null, $this->gettext('onevery')) . $this->rrule_selectors($attrib['part'], '---'));
             break;
             // end of recurrence form
         // end of recurrence form
         case 'until':
             $radio = new html_radiobutton(array('name' => 'repeat', 'class' => 'edit-recurrence-until'));
             $select = $this->interval_selector(array('name' => 'times', 'id' => 'edit-recurrence-repeat-times'));
             $input = new html_inputfield(array('name' => 'untildate', 'id' => 'edit-recurrence-enddate', 'size' => "10"));
             $html = html::div('line first', html::label(null, $radio->show('', array('value' => '', 'id' => 'edit-recurrence-repeat-forever')) . ' ' . $this->gettext('forever')));
             $forntimes = $this->gettext(array('name' => 'forntimes', 'vars' => array('nr' => '%s')));
             $html .= html::div('line', $radio->show('', array('value' => 'count', 'id' => 'edit-recurrence-repeat-count', 'aria-label' => sprintf($forntimes, 'N'))) . ' ' . sprintf($forntimes, $select->show(1)));
             $html .= html::div('line', $radio->show('', array('value' => 'until', 'id' => 'edit-recurrence-repeat-until', 'aria-label' => $this->gettext('untilenddate'))) . ' ' . $this->gettext('untildate') . ' ' . $input->show('', array('aria-label' => $this->gettext('untilenddate'))));
             $html = html::div($attrib, html::label(null, ucfirst($this->gettext('recurrencend'))) . $html);
             break;
         case 'rdate':
             $ul = html::tag('ul', array('id' => 'edit-recurrence-rdates'), '');
             $input = new html_inputfield(array('name' => 'rdate', 'id' => 'edit-recurrence-rdate-input', 'size' => "10"));
             $button = new html_inputfield(array('type' => 'button', 'class' => 'button add', 'value' => $this->gettext('addrdate')));
             $html .= html::div($attrib, $ul . html::div('inputform', $input->show() . $button->show()));
             break;
     }
     return $html;
 }
开发者ID:Fneufneu,项目名称:libcalendaring,代码行数:94,代码来源:libcalendaring.php

示例13: mail_messagebody_html

 /**
  * Add UI element to copy event invitations or updates to the calendar
  */
 public function mail_messagebody_html($p)
 {
     // load iCalendar functions (if necessary)
     if (!empty($this->lib->ical_parts)) {
         $this->get_ical();
         $this->load_itip();
     }
     $html = '';
     $has_events = false;
     $ical_objects = $this->lib->get_mail_ical_objects();
     // show a box for every event in the file
     foreach ($ical_objects as $idx => $event) {
         if ($event['_type'] != 'event') {
             // skip non-event objects (#2928)
             continue;
         }
         $has_events = true;
         // get prepared inline UI for this event object
         if ($ical_objects->method) {
             $append = '';
             // prepare a small agenda preview to be filled with actual event data on async request
             if ($ical_objects->method == 'REQUEST') {
                 $append = html::div('calendar-agenda-preview', html::tag('h3', 'preview-title', $this->gettext('agenda') . ' ' . html::span('date', $this->rc->format_date($event['start'], $this->rc->config->get('date_format')))) . '%before%' . $this->mail_agenda_event_row($event, 'current') . '%after%');
             }
             $html .= html::div('calendar-invitebox', $this->itip->mail_itip_inline_ui($event, $ical_objects->method, $ical_objects->mime_id . ':' . $idx, 'calendar', rcube_utils::anytodatetime($ical_objects->message_date), $this->rc->url(array('task' => 'calendar')) . '&view=agendaDay&date=' . $event['start']->format('U')) . $append);
         }
         // limit listing
         if ($idx >= 3) {
             break;
         }
     }
     // prepend event boxes to message body
     if ($html) {
         $this->ui->init();
         $p['content'] = $html . $p['content'];
         $this->rc->output->add_label('calendar.savingdata', 'calendar.deleteventconfirm', 'calendar.declinedeleteconfirm');
     }
     // add "Save to calendar" button into attachment menu
     if ($has_events) {
         $this->add_button(array('id' => 'attachmentsavecal', 'name' => 'attachmentsavecal', 'type' => 'link', 'wrapper' => 'li', 'command' => 'attachment-save-calendar', 'class' => 'icon calendarlink', 'classact' => 'icon calendarlink active', 'innerclass' => 'icon calendar', 'label' => 'calendar.savetocalendar'), 'attachmentmenu');
     }
     return $p;
 }
开发者ID:nciftci,项目名称:plugins,代码行数:46,代码来源:calendar.php

示例14: status_message

 /**
  * Handler for message_body_prefix hook.
  * Called for every displayed (content) part of the message.
  * Adds infobox about signature verification and/or decryption
  * status above the body.
  *
  * @param array Original parameters
  *
  * @return array Modified parameters
  */
 function status_message($p)
 {
     // skip: not a message part
     if ($p['part'] instanceof rcube_message) {
         return $p;
     }
     // skip: message has no signed/encoded content
     if (!$this->enigma->engine) {
         return $p;
     }
     $engine = $this->enigma->engine;
     $part_id = $p['part']->mime_id;
     $parent_id = preg_replace('/\\.[0-9]+$/', '', $part_id);
     // Decryption status
     if (($status = $engine->decryptions[$part_id]) || $parent_id !== '' && ($status = $engine->decryptions[$parent_id])) {
         $attach_scripts = true;
         // show the message only once
         unset($engine->decryptions[$part_id]);
         if ($parent_id !== '') {
             unset($engine->decryptions[$parent_id]);
         }
         // display status info
         $attrib['id'] = 'enigma-message';
         if ($status instanceof enigma_error) {
             $attrib['class'] = 'enigmaerror';
             $code = $status->getCode();
             if ($code == enigma_error::KEYNOTFOUND) {
                 $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($status->getData('id')), $this->enigma->gettext('decryptnokey')));
             } else {
                 if ($code == enigma_error::BADPASS) {
                     $msg = rcube::Q($this->enigma->gettext('decryptbadpass'));
                     $this->password_prompt($status);
                 } else {
                     $msg = rcube::Q($this->enigma->gettext('decrypterror'));
                 }
             }
         } else {
             $attrib['class'] = 'enigmanotice';
             $msg = rcube::Q($this->enigma->gettext('decryptok'));
         }
         $p['prefix'] .= html::div($attrib, $msg);
     }
     // Signature verification status
     if (isset($engine->signed_parts[$part_id]) && ($sig = $engine->signatures[$engine->signed_parts[$part_id]])) {
         $attach_scripts = true;
         // display status info
         $attrib['id'] = 'enigma-message';
         if ($sig instanceof enigma_signature) {
             $sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>';
             if ($sig->valid === enigma_error::UNVERIFIED) {
                 $attrib['class'] = 'enigmawarning';
                 $msg = str_replace('$sender', $sender, $this->enigma->gettext('sigunverified'));
                 $msg = str_replace('$keyid', $sig->id, $msg);
                 $msg = rcube::Q($msg);
             } else {
                 if ($sig->valid) {
                     $attrib['class'] = 'enigmanotice';
                     $msg = rcube::Q(str_replace('$sender', $sender, $this->enigma->gettext('sigvalid')));
                 } else {
                     $attrib['class'] = 'enigmawarning';
                     $msg = rcube::Q(str_replace('$sender', $sender, $this->enigma->gettext('siginvalid')));
                 }
             }
         } else {
             if ($sig && $sig->getCode() == enigma_error::KEYNOTFOUND) {
                 $attrib['class'] = 'enigmawarning';
                 $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($sig->getData('id')), $this->enigma->gettext('signokey')));
             } else {
                 $attrib['class'] = 'enigmaerror';
                 $msg = rcube::Q($this->enigma->gettext('sigerror'));
             }
         }
         /*
                     $msg .= '&nbsp;' . html::a(array('href' => "#sigdetails",
                         'onclick' => rcmail_output::JS_OBJECT_NAME.".command('enigma-sig-details')"),
                         rcube::Q($this->enigma->gettext('showdetails')));
         */
         // test
         //            $msg .= '<br /><pre>'.$sig->body.'</pre>';
         $p['prefix'] .= html::div($attrib, $msg);
         // Display each signature message only once
         unset($engine->signatures[$engine->signed_parts[$part_id]]);
     }
     if ($attach_scripts) {
         // add css and js script
         $this->add_css();
         $this->add_js();
     }
     return $p;
 }
开发者ID:jgtoriginal,项目名称:roundcubemail,代码行数:100,代码来源:enigma_ui.php

示例15: show_tb_label_contextmenu

 public function show_tb_label_contextmenu($args)
 {
     #$this->api->output->add_label('copymessage.copyingmessage');
     $li = html::tag('li', array('class' => 'submenu'), '<span>' . Q($this->gettext('tb_label_contextmenu_title')) . '</span>' . $this->_gen_label_submenu($args, 'tb_label_ctxm_submenu'));
     $out .= html::tag('ul', array('id' => 'tb_label_ctxm_mainmenu'), $li);
     $this->api->output->add_footer(html::div(array('style' => 'display: none;'), $out));
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:7,代码来源:thunderbird_labels.php


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