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


PHP html::tag方法代码示例

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


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

示例1: actionIndex

 /**
  * Lists all Articlecomment models.
  * @return mixed
  */
 public function actionIndex()
 {
     $list = '';
     $post = Yii::$app->request->post();
     if ($post['id']) {
         $mod = new Query();
         $comment = $mod->select(['a.id', 'a.parentId', 'a.articleId', 'a.content', 'a.createTime', 'b.username'])->from('articlecomment as a')->leftJoin('user as b', 'a.userId = b.id')->where(['commentId' => $post['id']])->orderBy(['createTime' => 'DESC', 'id' => 'DESC'])->createCommand()->queryAll();
         if ($comment) {
             foreach ($comment as $v) {
                 $content = '回复@' . Articlecomment::getCommentByParId($v['parentId']) . ':' . $v['content'];
                 $ahtml = html::a(html::tag("i", "", ["class" => "fa fa-thumbs-o-up"]) . html::tag("span", "回复"), ["/main/viewart", "id" => $v["articleId"], "parId" => $v['id']]);
                 $list .= '<div class="infos small-comment' . $post['id'] . '" style="border:1px solid;">
                         	<div class="media-body markdown-reply content-body">
                         		<p>' . $content . '</p>
                         		<span class="opts pull-right">
                         			<a class="author" >' . $v["username"] . '</a>
                         			•
                         			<addr title="' . $v["createTime"] . '">' . Html::tag("span", Yii::$app->formatter->asRelativeTime($v["createTime"])) . '</addr>
                         			' . $ahtml . '
                                 </span>
                         	</div>
                         </div>';
             }
         }
     }
     $result = array('success' => true, 'message' => $list);
     echo json_encode($result);
     die;
     return $this->renderAjax('index', ['success' => true, 'message' => '']);
 }
开发者ID:kennygp,项目名称:yii-myweb,代码行数:34,代码来源:ArticlecommentController.php

示例2: attachment_removelink

 /**
  * Place a link in the messageAttachments (template object) 
  * to trigger the removal of all attachments
  */
 function attachment_removelink($p)
 {
     /* // place links to remove attachment for each attachment
             $links = preg_split('/(<li[^>]*>)/', $p['content'], null, PREG_SPLIT_DELIM_CAPTURE);		
     
             for ($i = 1; $i < count($links); $i+=2) {
                 if (preg_match('/ id="attach([0-9]+)"/', $links[$i], $matches)) {
                     $remove = $this->api->output->button(array('command' => 'plugin.removeattachments.removeone', 
                                                                'prop' => $matches[1], 
                                                                'image' => $this->url(null) . $this->local_skin_path() . '/del.png', 
                                                                'title' => 'removeattachments.removeattachment',
                                                                'style' => 'vertical-align:middle'));
                     $links[$i+1] = str_replace('</li>', '&nbsp;' . $remove . '</li>', $links[$i+1]);
     			}
     		}
     
             $p['content'] = join('', $links);
             */
     // when there are multiple attachments allow delete all
     if (substr_count($p['content'], ' id="attach') > 1) {
         $link = $this->api->output->button(array('type' => 'link', 'command' => 'plugin.removeattachments.removeall', 'content' => rcube::Q($this->gettext('removeattachments.removeall')), 'title' => 'removeattachments.removeall', 'class' => 'button removeattachments'));
         switch (rcmail::get_instance()->config->get('skin')) {
             case 'classic':
                 //$p['content'] = preg_replace('/(<ul[^>]*>)/', '$1' . $link, $p['content']);
                 $p['content'] = str_replace('</ul>', html::tag('li', null, $link) . '</ul>', $p['content']);
                 break;
             default:
                 $p['content'] .= $link;
                 break;
         }
         $this->include_stylesheet($this->local_skin_path() . '/removeattachments.css');
     }
     return $p;
 }
开发者ID:messagerie-melanie2,项目名称:Roundcube-Plugin-Remove-Attachments,代码行数:38,代码来源:removeattachments.php

示例3: 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'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('email'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => rcube_utils::idn_to_utf8($identity['email']), 'disabled' => in_array($identities_level, array(1, 3, 4)))));
         $table->add('title', $this->gettext('organization'));
         $table->add(null, html::tag('input', array('type' => 'text', 'name' => '_organization', 'value' => $identity['organization'], 'disabled' => $identities_level == 4)));
         $table->add('title', $this->gettext('signature'));
         $table->add(null, html::tag('textarea', array('name' => '_signature', 'rows' => '3'), $identity['signature']));
         // add overlay input box to html page
         $rcmail->output->add_footer(html::tag('form', array('id' => 'newuserdialog', 'action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save'))))));
         $title = rcube::JQ($this->gettext('identitydialogtitle'));
         $script = "\n\$('#newuserdialog').show()\n  .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'{$title}'})\n  .submit(function() {\n    var i, request = {}, form = \$(this).serializeArray();\n    for (i in form)\n      request[form[i].name] = form[i].value;\n\n      rcmail.http_post('plugin.newusersave', request, true);\n      return false;\n  });\n\n\$('input[name=_name]').focus();\nrcube_webmail.prototype.new_user_dialog_close = function() { \$('#newuserdialog').dialog('close'); }\n";
         // disable keyboard events for messages list (#1486726)
         $rcmail->output->add_script($script, 'docready');
         $this->include_stylesheet('newuserdialog.css');
     }
 }
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:30,代码来源:new_user_dialog.php

示例4: init

 function init()
 {
     $this->rcmail = rcmail::get_instance();
     $this->out = html::tag('div', array('style' => 'font-size: 12px; text-align: justify; position: absolute; margin-left: auto; left: 50%; margin-left: -250px; width: 500px;'), html::tag('h3', null, 'Welcome to MyRoundcube Plugins - Plugin Manager Installer') . html::tag('span', null, 'Please ' . html::tag('a', array('href' => $this->svn), 'download') . ' Plugin Manager package and upload the entire package to your Roundcube\'s plugin folder.' . html::tag('br') . html::tag('br') . ' If you are prompted to overwrite <i>"./plugins/plugin_manager"</i> please do so.') . html::tag('br') . html::tag('br') . html::tag('div', array('style' => 'display: inline; float: left'), html::tag('a', array('href' => 'javascript:void(0)', 'onclick' => 'document.location.href=\'./\''), $this->gettext('done'))));
     $this->register_handler('plugin.body', array($this, 'download'));
     $this->rcmail->output->send('plugin');
 }
开发者ID:MetallianFR68,项目名称:myroundcube,代码行数:7,代码来源:plugin_manager.php

示例5: frame

 function frame()
 {
     $rcmail = rcube::get_instance();
     $this->load_config();
     // generate SSO auth token
     if (empty($_SESSION['dokuwikiauth'])) {
         $_SESSION['dokuwikiauth'] = md5('dokuwikisso' . $_SESSION['user_id'] . microtime() . $rcmail->config->get('des_key'));
     }
     // for multidomain
     // for getting domain we simply take the part from login-name after "@":
     $domain = explode('@', $_SESSION['username'])[1];
     // first we use single configured url
     $src = $rcmail->config->get('dokuwiki_url');
     // next we check for a general dokuwiki subdomain
     if ($rcmail->config->get('dokuwiki_subdomain') != '') {
         $subdomain = $rcmail->config->get('dokuwiki_subdomain');
         $src = 'http://' . $subdomain . '.' . $domain . '/doku.php';
     }
     // use a configured url for this domain if exists
     if ($rcmail->config->get('dokuwiki_urls')[$domain] != '') {
         $src = 'http://' . $rcmail->config->get('dokuwiki_urls')[$domain] . '/doku.php';
     }
     //$src = 'http://' . $subdomain . '.' . $domain . '/doku.php';
     $src .= '?kolab_auth=' . strrev(rtrim(base64_encode(http_build_query(array('session' => session_id(), 'cname' => session_name(), 'token' => $_SESSION['dokuwikiauth']))), '='));
     return html::tag('iframe', array('id' => 'dokuwikiframe', 'src' => $src, 'width' => "100%", 'height' => "100%", 'frameborder' => 0));
 }
开发者ID:jankowa,项目名称:kolab-octo-dokuwiki,代码行数:26,代码来源:dokuwiki.php

示例6: init

 function init()
 {
     $this->register_action('plugin.markasjunk2.junk', array($this, 'mark_message'));
     $this->register_action('plugin.markasjunk2.not_junk', array($this, 'mark_message'));
     $rcmail = rcube::get_instance();
     $this->load_config();
     $this->ham_mbox = $rcmail->config->get('markasjunk2_ham_mbox', 'INBOX');
     $this->spam_mbox = $rcmail->config->get('markasjunk2_spam_mbox', $rcmail->config->get('junk_mbox', null));
     $this->toolbar = $this->_set_toolbar_display($rcmail->config->get('markasjunk2_toolbar', -1), $rcmail->action);
     // register the ham/spam flags with the core
     $this->add_hook('storage_init', array($this, 'set_flags'));
     if ($rcmail->action == '' || $rcmail->action == 'show') {
         $this->include_script('markasjunk2.js');
         $this->add_texts('localization', true);
         $this->include_stylesheet($this->local_skin_path() . '/markasjunk2.css');
         if ($this->toolbar) {
             // add the buttons to the main toolbar
             $this->add_button(array('command' => 'plugin.markasjunk2.junk', 'type' => 'link', 'class' => 'button buttonPas markasjunk2 disabled', 'classact' => 'button markasjunk2', 'classsel' => 'button markasjunk2Sel', 'title' => 'markasjunk2.buttonjunk', 'label' => 'junk'), 'toolbar');
             $this->add_button(array('command' => 'plugin.markasjunk2.not_junk', 'type' => 'link', 'class' => 'button buttonPas markasnotjunk2 disabled', 'classact' => 'button markasnotjunk2', 'classsel' => 'button markasnotjunk2Sel', 'title' => 'markasjunk2.buttonnotjunk', 'label' => 'markasjunk2.notjunk'), 'toolbar');
         } else {
             // add the buttons to the mark message menu
             $markjunk = $this->api->output->button(array('command' => 'plugin.markasjunk2.junk', 'label' => 'markasjunk2.markasjunk', 'id' => 'markasjunk2', 'class' => 'icon markasjunk2', 'classact' => 'icon markasjunk2 active', 'innerclass' => 'icon markasjunk2'));
             $marknotjunk = $this->api->output->button(array('command' => 'plugin.markasjunk2.not_junk', 'label' => 'markasjunk2.markasnotjunk', 'id' => 'markasnotjunk2', 'class' => 'icon markasnotjunk2', 'classact' => 'icon markasnotjunk2 active', 'innerclass' => 'icon markasnotjunk2'));
             $this->api->add_content(html::tag('li', array('role' => 'menuitem'), $markjunk), 'markmenu');
             $this->api->add_content(html::tag('li', array('role' => 'menuitem'), $marknotjunk), 'markmenu');
         }
         // add markasjunk2 folder settings to the env for JS
         $this->api->output->set_env('markasjunk2_ham_mailbox', $this->ham_mbox);
         $this->api->output->set_env('markasjunk2_spam_mailbox', $this->spam_mbox);
         $this->api->output->set_env('markasjunk2_move_spam', $rcmail->config->get('markasjunk2_move_spam', false));
         $this->api->output->set_env('markasjunk2_move_ham', $rcmail->config->get('markasjunk2_move_ham', false));
         // check for init method from driver
         $this->_call_driver('init');
     }
 }
开发者ID:JohnDoh,项目名称:Roundcube-Plugin-Mark-as-Junk-2,代码行数:35,代码来源:markasjunk2.php

示例7: gist

 /**
  * Embeds a github gist
  *
  * @param string $url Gist url: i.e. https://gist.github.com/2924148
  * @param string $file The name of a particular file from the gist, which should displayed only.
  * @return string
  */
 public static function gist($url, $file = null)
 {
     // url for the script file
     $url = $url . '.js' . r(!is_null($file), '?file=' . $file);
     // load the gist
     return html::tag('script', '', array('src' => $url));
 }
开发者ID:aoimedia,项目名称:kosmonautensofa,代码行数:14,代码来源:embed.php

示例8: init

 /**
  * Plugin initialization.
  */
 function init()
 {
     $this->version_detect();
     $this->rc = rcube::get_instance();
     $this->rm = rcmail::get_instance();
     $this->add_hook('user_create', array($this, 'user_create'));
     $this->register_action('plugin.pks_search', array($this, 'hkp_search'));
     $this->register_action('plugin.hkp_add', array($this, 'hkp_add'));
     $this->register_action('plugin.pubkey_save', array($this, 'pubkey_save'));
     if ($this->rc->task == 'mail') {
         $this->add_hook('render_page', array($this, 'render_page'));
         // make localization available on the client
         $this->add_texts('localization/', true);
         // load js
         $this->include_script('js/openpgp.min.js');
         $this->include_script('js/rc_openpgpjs.crypto.js');
         $this->include_script('js/rc_openpgpjs.js');
         if (isset($_SESSION["rc_openpgpjs_outdated"])) {
             $this->include_script('js/outdated.js');
         }
         // load css
         $this->include_stylesheet($this->local_skin_path() . '/rc_openpgpjs.css');
         // add public key attachment related hooks
         $this->add_hook('message_compose', array($this, 'message_compose'));
         $this->add_hook('message_sent', array($this, 'unlink_pubkey'));
         if ($this->api->output->type == 'html') {
             // add key manager item to message menu
             $opts = array("command" => "open-key-manager", "label" => "rc_openpgpjs.key_manager", "type" => "link", "classact" => "icon active", "class" => "icon", "innerclass" => "icon key_manager");
             $this->api->add_content(html::tag('li', null, $this->api->output->button($opts)), "messagemenu");
             if ($this->rc->action == 'compose') {
                 // add key manager button to compose toolbar
                 $opts = array("command" => "open-key-manager", "label" => "rc_openpgpjs.key_manager", "type" => "link", "classact" => "button active key_manager", "class" => "button key_manager");
                 $this->api->add_content($this->api->output->button($opts), "toolbar");
                 // add encrypt and sign checkboxes to composeoptions
                 $encrypt_opts = array('id' => 'openpgpjs_encrypt', 'type' => 'checkbox');
                 if ($this->rc->config->get('encrypt', false)) {
                     $encrypt_opts['checked'] = 'checked';
                 }
                 $encrypt = new html_inputfield($encrypt_opts);
                 $this->api->add_content(html::span('composeoption', html::label(null, $encrypt->show() . $this->gettext('encrypt'))), "composeoptions");
                 $sign_opts = array('id' => 'openpgpjs_sign', 'type' => 'checkbox');
                 if ($this->rc->config->get('sign', false)) {
                     $sign_opts['checked'] = 'checked';
                 }
                 $sign = new html_inputfield($sign_opts);
                 $this->api->add_content(html::span('composeoption', html::label(null, $sign->show() . $this->gettext('sign'))), "composeoptions");
             }
         }
     } elseif ($this->rc->task == 'settings') {
         // load localization
         $this->add_texts('localization/', false);
         // add hooks for OpenPGP settings
         $this->add_hook('preferences_list', array($this, 'preferences_list'));
         $this->add_hook('preferences_save', array($this, 'preferences_save'));
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:59,代码来源:rc_openpgpjs.php

示例9: 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

示例10: testTag

 public function testTag()
 {
     $expected = '<img src="myimage.jpg" width="100" height="200">';
     $this->assertEquals($expected, html::tag('img', null, array('src' => 'myimage.jpg', 'width' => 100, 'height' => 200)));
     $expected = '<a href="http://google.com" title="Google">Google</a>';
     $this->assertEquals($expected, html::tag('a', 'Google', array('href' => 'http://google.com', 'title' => 'Google')));
     $expected = '<p>Nice Paragraph</p>';
     $this->assertEquals($expected, html::tag('p', 'Nice Paragraph'));
     $expected = '<br>';
     $this->assertEquals($expected, html::tag('br'));
 }
开发者ID:getkirby,项目名称:toolkit,代码行数:11,代码来源:HTMLTest.php

示例11: write

 public function write($contents = '')
 {
     self::reset(true);
     // load embed.css from skin folder (if exists)
     if ($embed_css = $this->get_skin_file('/embed.css')) {
         $this->include_css($embed_css);
     } else {
         // set default styles for warning blocks inside the attachment part frame
         $this->add_header(html::tag('style', array('type' => 'text/css'), ".rcmail-inline-message { font-family: sans-serif; border:2px solid #ffdf0e; background:#fef893; padding:0.6em 1em; margin-bottom:0.6em }\n" . ".rcmail-inline-buttons { margin-bottom:0 }"));
     }
     parent::write($contents);
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:12,代码来源:rcmail_html_page.php

示例12: 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

示例13: init

 function init()
 {
     $this->register_action('plugin.markasjunk2', array($this, 'mark_junk'));
     $this->register_action('plugin.markasnotjunk2', array($this, 'mark_notjunk'));
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->spam_mbox = $rcmail->config->get('junk_mbox', null);
     $this->toolbar = $rcmail->config->get('markasjunk2_mb_toolbar', true);
     if ($rcmail->config->get('markasjunk2_spam_flag', false)) {
         if ($flag = array_search($rcmail->config->get('markasjunk2_spam_flag'), $GLOBALS['IMAP_FLAGS'])) {
             $this->spam_flag = $flag;
         } else {
             $GLOBALS['IMAP_FLAGS'][$this->spam_flag] = $rcmail->config->get('markasjunk2_spam_flag');
         }
     }
     if ($rcmail->config->get('markasjunk2_ham_flag', false)) {
         if ($flag = array_search($rcmail->config->get('markasjunk2_ham_flag'), $GLOBALS['IMAP_FLAGS'])) {
             $this->ham_flag = $flag;
         } else {
             $GLOBALS['IMAP_FLAGS'][$this->ham_flag] = $rcmail->config->get('markasjunk2_ham_flag');
         }
     }
     if (($rcmail->action == '' || $rcmail->action == 'show') && !empty($rcmail->user->ID)) {
         $this->include_script('markasjunk2.js');
         $this->add_texts('localization', true);
         if ($rcmail->action == 'show' && ($this->spam_mbox && $_SESSION['mbox'] != $this->spam_mbox)) {
             $this->add_button(array('command' => 'plugin.markasjunk2', 'imagepas' => $this->local_skin_path() . '/junk_pas.png', 'imageact' => $this->local_skin_path() . '/junk_act.png', 'alt' => 'markasjunk2.buttonjunk', 'title' => 'markasjunk2.buttonjunk'), 'toolbar');
         } elseif ($rcmail->action == 'show' && ($this->spam_mbox && $_SESSION['mbox'] == $this->spam_mbox)) {
             $this->add_button(array('command' => 'plugin.markasnotjunk2', 'imagepas' => $this->local_skin_path() . '/notjunk_pas.png', 'imageact' => $this->local_skin_path() . '/notjunk_act.png', 'alt' => 'markasjunk2.buttonnotjunk', 'title' => 'markasjunk2.buttonnotjunk'), 'toolbar');
         } elseif ($this->spam_mbox && $this->toolbar) {
             if ($_SESSION['mbox'] == $this->spam_mbox) {
                 $this->add_button(array('command' => 'plugin.markasjunk2', 'id' => 'markasjunk2', 'imagepas' => $this->local_skin_path() . '/junk_pas.png', 'imageact' => $this->local_skin_path() . '/junk_act.png', 'alt' => 'markasjunk2.buttonjunk', 'title' => 'markasjunk2.buttonjunk', 'style' => 'display: none;'), 'toolbar');
                 $this->add_button(array('command' => 'plugin.markasnotjunk2', 'id' => 'markasnotjunk2', 'imagepas' => $this->local_skin_path() . '/notjunk_pas.png', 'imageact' => $this->local_skin_path() . '/notjunk_act.png', 'alt' => 'markasjunk2.buttonnotjunk', 'title' => 'markasjunk2.buttonnotjunk'), 'toolbar');
             } else {
                 $this->add_button(array('command' => 'plugin.markasjunk2', 'id' => 'markasjunk2', 'imagepas' => $this->local_skin_path() . '/junk_pas.png', 'imageact' => $this->local_skin_path() . '/junk_act.png', 'alt' => 'markasjunk2.buttonjunk', 'title' => 'markasjunk2.buttonjunk'), 'toolbar');
                 $this->add_button(array('command' => 'plugin.markasnotjunk2', 'id' => 'markasnotjunk2', 'imagepas' => $this->local_skin_path() . '/notjunk_pas.png', 'imageact' => $this->local_skin_path() . '/notjunk_act.png', 'alt' => 'markasjunk2.buttonnotjunk', 'title' => 'markasjunk2.buttonnotjunk', 'style' => 'display: none;'), 'toolbar');
             }
         } elseif ($this->spam_mbox) {
             $this->include_stylesheet($this->local_skin_path() . '/markasjunk2.css');
             if ($_SESSION['mbox'] == $this->spam_mbox) {
                 $markjunk = $this->api->output->button(array('command' => 'plugin.markasjunk2', 'label' => 'markasjunk2.markasjunk', 'id' => 'markasjunk2', 'class' => 'markasjunk2', 'classact' => 'markasjunk2 active', 'style' => 'display: none;'));
                 $marknotjunk = $this->api->output->button(array('command' => 'plugin.markasnotjunk2', 'label' => 'markasjunk2.markasnotjunk', 'id' => 'markasnotjunk2', 'class' => 'markasnotjunk2', 'classact' => 'markasnotjunk2 active'));
             } else {
                 $markjunk = $this->api->output->button(array('command' => 'plugin.markasjunk2', 'label' => 'markasjunk2.markasjunk', 'id' => 'markasjunk2', 'class' => 'markasjunk2', 'classact' => 'markasjunk2 active'));
                 $marknotjunk = $this->api->output->button(array('command' => 'plugin.markasnotjunk2', 'label' => 'markasjunk2.markasnotjunk', 'id' => 'markasnotjunk2', 'class' => 'markasnotjunk2', 'classact' => 'markasnotjunk2 active', 'style' => 'display: none;'));
             }
             $this->api->add_content(html::tag('li', null, $markjunk), 'markmenu');
             $this->api->add_content(html::tag('li', null, $marknotjunk), 'markmenu');
         }
     }
 }
开发者ID:ehmedov,项目名称:www,代码行数:51,代码来源:markasjunk2.php

示例14: actionGetSessions

 public function actionGetSessions()
 {
     $date = date('Y-m-d', strtotime(yii::$app->request->post('date')));
     $session = yii::$app->worksess->getSessions(null, $date);
     $json = [];
     if (empty($session)) {
         $json['HtmlList'] = '<ul><li>Сессии не были открыты.</li></ul>';
     } else {
         $json['HtmlList'] = Html::ul($session, ['item' => function ($item, $index) {
             return html::tag('li', Html::a(date('d.m.Y H:i:s', $item->start_timestamp) . ' ' . $item->shiftName, ['/service/report/index', 'sessionId' => $item->id]));
         }]);
     }
     die(json_encode($json));
 }
开发者ID:pistol88,项目名称:yii2-service,代码行数:14,代码来源:ReportController.php

示例15: __toString

 public function __toString()
 {
     $html = '<nav class="field-buttons">';
     $html .= '<ul class="nav nav-bar">';
     foreach (static::$setup as $key => $button) {
         $icon = '<i class="icon fa fa-' . $button['icon'] . '"></i>';
         $html .= '<li class="field-button-' . $key . '">';
         $html .= html::tag('button', $icon, array('type' => 'button', 'tabindex' => '-1', 'title' => @$button['label'] . ' (' . @$button['shortcut'] . ')', 'class' => 'btn', 'data-editor-shortcut' => @$button['shortcut'], 'data-tpl' => @$button['template'], 'data-text' => @$button['text'], 'data-action' => @$button['action']));
         $html .= '</li>';
     }
     $html .= '</ul>';
     $html .= '</nav>';
     return $html;
 }
开发者ID:williampan,项目名称:w,代码行数:14,代码来源:buttons.php


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