コード例 #1
0
ファイル: Recaptcha.php プロジェクト: mpf-soft/admin-widgets
 public function getInput()
 {
     if (defined('DEBUG_SERVER') && DEBUG_SERVER) {
         return "- captcha hidden on debug server -";
     }
     return Html::get()->scriptFile('https://www.google.com/recaptcha/api.js') . '<div class="g-recaptcha" data-sitekey="' . $this->siteKey . '"></div>';
 }
コード例 #2
0
ファイル: Config.php プロジェクト: mpf-soft/social-modules
 /**
  * Get HTML link to user profile
  * @param $userId
  * @param $userName
  * @param array $htmlOptions
  * @return string
  */
 public function getProfileLink($userId, $userName, $htmlOptions = [])
 {
     if (isset($this->userProfileLinkCallback) && is_callable($this->userProfileLinkCallback)) {
         return Html::get()->link(call_user_func($this->userProfileLinkCallback, $userId, $userName), $userName, $htmlOptions);
     }
     return Html::get()->link(WebApp::get()->getController()->updateURLWithSection(['user', 'index', ['id' => $userId, 'name' => $userName]]), $userName, $htmlOptions);
 }
コード例 #3
0
ファイル: Image.php プロジェクト: mpf-soft/admin-widgets
 public function getInput()
 {
     if ($this->getValue()) {
         $preview = Html::get()->image($this->urlPrefix . $this->getValue(), $this->title ? $this->title : $this->getLabel(), $this->imageHtmlOptions);
     } else {
         $preview = "";
     }
     return $preview . parent::getInput();
 }
コード例 #4
0
ファイル: Messages.php プロジェクト: mpf-soft/app-basic
 /**
  * Get HTML code to display current messages.
  * @return string
  */
 public function display()
 {
     $htmlMessages = array();
     foreach ($this->messages as $message) {
         $htmlMessages[] = Html::get()->tag('div', Html::get()->tag('span', $this->translate($message['message'])), array('class' => str_replace('{type}', $message['type'], $this->htmlClass)));
     }
     // clear messages
     $this->messages = array();
     $_SESSION[$this->sessionKey] = array();
     return implode("\n", $htmlMessages);
 }
コード例 #5
0
ファイル: Table.php プロジェクト: mpf-soft/admin-widgets
 public function display()
 {
     $columns = $this->initColumns();
     $t = Html::get()->cssFile(AssetsPublisher::get()->publishFolder(__DIR__ . DIRECTORY_SEPARATOR . 'assets') . 'table.css');
     $content = array();
     foreach ($columns as $column) {
         /* @var $column \mpf\widgets\viewtable\columns\Basic */
         $content[] = $column->display();
     }
     $content = implode("\n", $content);
     $this->htmlOptions['class'] = 'm-viewtable m-viewtable-' . $this->theme;
     return $t . Html::get()->tag('div', Html::get()->tag('table', $content, $this->tableHtmlOptions), $this->htmlOptions);
 }
コード例 #6
0
ファイル: Image.php プロジェクト: mpf-soft/admin-widgets
 /**
  * @param $row
  * @param Table $table
  * @return string
  */
 protected function getHTMLImage($row, Table $table)
 {
     $url = $title = "";
     if (is_string($this->src)) {
         eval("\$url = {$this->src}");
     } elseif (is_callable($this->src)) {
         $url = call_user_func($this->src, $row, $table);
     }
     if (is_string($this->title)) {
         eval("\$title = {$this->title}");
     } elseif (is_callable($this->title)) {
         $title = call_user_func($this->title, $row, $table);
     }
     return Html::get()->image($url, $title, $this->imageHtmlOptions);
 }
コード例 #7
0
 /**
  * Get the input;
  * @return string
  */
 public function getInput()
 {
     $options = $this->htmlOptions;
     $options['class'] = (isset($options['class']) ? $options['class'] . ' ' : '') . 'input autocomplete';
     $options['autc_ajax'] = $this->ajaxUpdate ? '1' : '0';
     $options['autc_url'] = $this->ajaxURL;
     $options['autc_for'] = str_replace(['[', ']'], '__', $this->getName());
     $options['autc_minletters'] = $this->minLettersToSearch;
     $options['autc_insert'] = $this->allowNewValues ? '1' : '0';
     $opts = [];
     foreach ($this->options as $word) {
         $opts[] = "<li>{$word}</li>";
     }
     $opts = implode("", $opts);
     return Form::get()->hiddenInput($this->getName(), $this->getValue(), ['id' => str_replace(['[', ']'], '__', $this->getName())]) . Form::get()->input("", "text", $this->getValue(), $options) . Html::get()->tag("div", "<ul>{$opts}</ul>", ['id' => 'options-for-' . $options['autc_for'], 'class' => 'form-autocomplete-list']) . Html::get()->scriptFile($this->form->getAssetsURL() . 'autocomplete.js');
 }
コード例 #8
0
ファイル: Page.php プロジェクト: mpf-soft/app-basic
 /**
  * Get a HTML list of links used for menus
  * @param $items
  * @param array $htmlOptions
  * @return string
  */
 public static function menuList($items, $htmlOptions = array())
 {
     $lis = array();
     foreach ($items as $item) {
         if (isset($item['visible']) && !$item['visible']) {
             continue;
         }
         if (is_array($item['url'])) {
             if (WebApp::get()->accessMap && !WebApp::get()->accessMap->canAccess($item['url'][0], isset($item['url'][1]) ? $item['url'][1] : null, isset($item['url'][2]) ? $item['url'][2] : null)) {
                 continue;
             }
         }
         $url = is_array($item['url']) ? WebApp::get()->request()->createURL($item['url'][0], isset($item['url'][1]) ? $item['url'][1] : null, isset($item['url'][2]) ? $item['url'][2] : array(), isset($item['url'][3]) ? $item['url'][3] : null) : $item['url'];
         $icon = isset($item['icon']) ? Html::get()->image($item['icon'], self::get()->translate(isset($item['title']) ? $item['title'] : (isset($item['label']) ? $item['label'] : '')), isset($item['iconHtmlOptions']) ? $item['iconHtmlOptions'] : array()) : '';
         $itemContent = Html::get()->link($url, $icon . self::get()->translate(isset($item['label']) ? $item['label'] : ''), isset($item['linkHtmlOptions']) ? $item['linkHtmlOptions'] : array());
         $lis[] = Html::get()->tag('li', $itemContent, isset($item['htmlOptions']) ? $item['htmlOptions'] : array());
     }
     return count($lis) ? Html::get()->tag('ul', implode("\n", $lis), $htmlOptions) : '';
 }
コード例 #9
0
ファイル: recent.php プロジェクト: mpf-soft/social-modules
</td>
            </tr>
        <?php 
} else {
    ?>
            <?php 
    foreach ($threads as $thread) {
        ?>
                <tr class="thread-row">
                    <td class="thread-status-icon-column"><?php 
        echo \mpf\web\helpers\Html::get()->image($this->getWebRoot() . 'forum/statusicons/' . $thread->getStatus() . '.png', ucfirst($thread->getStatus()));
        ?>
</td>
                    <td class="thread-title-column">
                        <?php 
        echo \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['thread', 'index', ['subcategory' => $thread->subcategory->url_friendly_title, 'category' => $thread->subcategory->category->url_friendly_name, 'id' => $thread->id]]), $thread->title);
        ?>
                    </td>
                    <td class="thread-started-by-column">
                        <?php 
        echo $thread->getOwnerProfileLink();
        ?>
                        <span><?php 
        echo \mpf\helpers\DateTimeHelper::get()->niceDate($thread->create_time, false, false);
        ?>
</span>
                    </td>
                    <td class="thread-replies-column"><?php 
        echo $thread->replies;
        ?>
</td>
コード例 #10
0
ファイル: index.php プロジェクト: mpf-soft/social-modules
            ?>
</b>
                            <b><?php 
            echo $subcategory->number_of_replies;
            ?>
 <?php 
            echo \mpf\modules\forum\components\Translator::get()->translate("replies");
            ?>
</b>
                        </td>
                        <td class="subcategory-latest-post-column">
                            <?php 
            if ($subcategory->last_active_thread_id) {
                ?>
                                <?php 
                echo \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['thread', 'index', ['subcategory' => $subcategory->url_friendly_title, 'category' => $category->url_friendly_name, 'id' => $subcategory->last_active_thread_id]]), $subcategory->lastActiveThread->title, ['class' => 'subcategory-latest-post-thread']);
                ?>
                                <span
                                    class="subcategory-lastest-post-author"><?php 
                echo $subcategory->getActionForList();
                ?>
 <?php 
                echo $subcategory->getLastActiveProfileLink();
                ?>
</span>
                                <span
                                    class="subcategory-lastest-post-date">, <?php 
                echo lcfirst(\mpf\helpers\DateTimeHelper::get()->niceDate($subcategory->last_activity_time, false, false));
                ?>
</span>
                            <?php 
コード例 #11
0
ファイル: read.php プロジェクト: mpf-soft/social-modules
<?php

require_once dirname(dirname(__DIR__)) . '/layout/header.php';
?>

<div class="blog-article">
    <h1 class="blog-article-title"><?php 
echo \mpf\web\helpers\Html::get()->link(['home', 'read', ['id' => $article->id]], $article->getTitle());
?>
</h1>
    <div class="blog-article-header">
        <?php 
echo \app\components\htmltools\Translator::get()->t("Written by");
?>
        <?php 
echo $article->anonimous ? \app\components\htmltools\Translator::get()->t("Anonimous") : $article->author->name;
?>
        <?php 
echo \mpf\helpers\DateTimeHelper::get()->niceDate($article->time_published);
?>
    </div>
    <div class="blog-article-cover">
        <?php 
echo $article->getCover();
?>
    </div>
    <div class="blog-article-content">
        <?php 
echo $article->getIcon();
?>
        <?php 
コード例 #12
0
<?php

/* @var $this \mpf\modules\forum\controllers\Manage */
/* @var $model \mpf\modules\forum\models\ForumSubcategory */
/* @var $category \mpf\modules\forum\models\ForumCategory */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . $category->name . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " Subcategories", [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles'], ['url' => $this->updateURLWithSection(['manage', 'newCategory']), 'label' => 'New Category'], ['url' => $this->updateURLWithSection(['manage', 'newSubcategory', ['category' => $category->id]]), 'label' => 'New Subcategory']]);
\mpf\widgets\datatable\Table::get(['dataProvider' => $model->getDataProvider($category->id), 'columns' => ['title', 'user_id' => ['value' => '$row->owner->name'], 'description', ['class' => 'Actions', 'buttons' => ['delete' => ['class' => 'Delete', 'iconSize' => 22, 'url' => $this->getUrlForDatatableAction('delete')], 'edit' => ['class' => 'Edit', 'iconSize' => 22, 'url' => $this->getUrlForDatatableAction('editSubcategory')]]]]])->display();
コード例 #13
0
ファイル: Field.php プロジェクト: mpf-soft/admin-widgets
 /**
  * Get HTML code for errors.
  * @return string
  */
 public function getHTMLError()
 {
     $error = $this->getError();
     if (!is_null($error)) {
         if (is_string($error)) {
             $errorContent = Html::get()->tag('span', $error);
         } elseif (is_array($error)) {
             $errors = array();
             foreach ($error as $message) {
                 $errors[] = Html::get()->tag('li', $message);
             }
             $errorContent = Html::get()->tag('ul', implode("\n", $errors));
         } else {
             $errorContent = '';
         }
         return Html::get()->tag('div', $errorContent, array('class' => 'errors'));
     }
     return '';
 }
コード例 #14
0
ファイル: Link.php プロジェクト: mpf-soft/admin-widgets
 /**
  * Get HTML image for selected icon
  * @return string
  */
 public function getIcon()
 {
     if (!$this->icon) {
         return "";
     }
     return Html::get()->image($this->icon, $this->translate($this->label));
 }
コード例 #15
0
ファイル: Form.php プロジェクト: mpf-soft/admin-widgets
 /**
  * Return html code for a button.
  * @param string|array $details
  * @return string
  */
 public function getButton($details)
 {
     if (is_string($details)) {
         return HtmlHelper::get()->noContentElement('input', array('type' => 'submit', 'name' => $details, 'value' => $this->translate(ucwords(str_replace('_', ' ', $details)))));
     }
     if (isset($details['visible']) && $details['visible'] == false) {
         return '';
         //return nothing if hidden;
     }
     $htmlOptions = isset($details['htmlOptions']) ? $details['htmlOptions'] : array();
     $htmlOptions['type'] = isset($details['type']) ? $details['type'] : 'submit';
     $htmlOptions['name'] = $details['name'];
     $htmlOptions['value'] = $this->translate($details['label']);
     return HtmlHelper::get()->noContentElement('input', $htmlOptions);
 }
コード例 #16
0
ファイル: InlineWebLogger.php プロジェクト: mpf-soft/mpf
 public function log($level, $message, array $context = array())
 {
     $details = array();
     $context['time'] = microtime(true);
     foreach ($context as $k => $v) {
         $details[] = $k . ' : ' . (is_string($v) ? nl2br($v) : print_r($v, true));
     }
     $details = implode('<br />', $details);
     echo "<div class=\"log-message log-{$level}\"><b>{$level} : {$message}</b><span><br />{$details}</span></div>";
     $baseScriptsURL = \mpf\web\AssetsPublisher::get()->publishFolder(dirname(\mpf\base\AutoLoader::getLastRegistered()->path('\\mpf\\__assets\\scripts\\jquery')) . DIRECTORY_SEPARATOR . 'jquery');
     echo \mpf\web\helpers\Html::get()->scriptFile($baseScriptsURL . 'jquery.min.js');
     echo \mpf\web\helpers\Html::get()->script('$(document).ready(function(){' . '$(".log-message").click(function(){if ($("span", this).is(":visible")) {$("span", this).hide();} else {$("span", this).show();} })' . '})');
 }
コード例 #17
0
ファイル: Markdown.php プロジェクト: mpf-soft/admin-widgets
 /**
  * @return string
  */
 public function getPreview()
 {
     return Html::get()->tag("div", "", ["class" => "markdown-preview"]);
 }
コード例 #18
0
ファイル: index.php プロジェクト: mpf-soft/social-modules
</span>
                    </td>
                    <td class="thread-replies-column"><?php 
        echo $thread->replies;
        ?>
</td>
                    <td class="thread-views-column"><?php 
        echo $thread->views;
        ?>
</td>
                    <td class="thread-most-recent-column">
                        <?php 
        if ($thread->last_reply_id) {
            ?>
                            <?php 
            echo \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['user', 'index', ['id' => $thread->last_reply_user_id, 'name' => $thread->lastActiveUser->name]]), $thread->lastActiveUser->name);
            ?>
                            <span><?php 
            echo \mpf\helpers\DateTimeHelper::get()->niceDate($thread->last_reply_date, false, false);
            ?>
</span>
                        <?php 
        } else {
            ?>
                            <span class="thread-no-replies-message">
                                 <?php 
            echo \mpf\modules\forum\components\Translator::get()->translate("no replies");
            ?>
                            </span>
                        <?php 
        }
コード例 #19
0
ファイル: index.php プロジェクト: mpf-soft/social-modules
                             <?php 
         echo \mpf\helpers\DateTimeHelper::get()->niceDate($reply->edit_time, false, false);
         ?>
                         <?php 
     }
     ?>
                     </div>
                 <?php 
 }
 ?>
                 <?php 
 if (!$reply->deleted && \mpf\modules\forum\components\UserAccess::get()->canReplyToThread($subcategory->category_id, $this->sectionId)) {
     ?>
                     <div class="forum-thread-reply-actions">
                         <?php 
     echo \mpf\web\helpers\Html::get()->link('#reply-for-1-' . $reply->id, \mpf\modules\forum\components\Translator::get()->translate('Reply'), ['class' => 'new-reply-button reply-to-existing-reply']);
     ?>
                     </div>
                 <?php 
 }
 ?>
                 <?php 
 if ($reply->sectionAuthor->getSignature()) {
     ?>
                     <?php 
     echo \mpf\modules\forum\components\Config::value('FORUM_THREAD_SIGNATURE_SEPARATOR');
     ?>
                     <?php 
     echo $reply->sectionAuthor->getSignature();
     ?>
                 <?php 
コード例 #20
0
ファイル: group.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Manage */
/* @var $model \mpf\modules\forum\models\ForumUserGroup */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " User Groups " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . ($model->isNewRecord() ? 'New Group' : 'Edit ' . $model->full_name), [['url' => ['manage', 'groups'], 'label' => 'Manage Groups'], ['url' => ['manage', 'categories'], 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles'], ['url' => ['manage', 'newGroup'], 'label' => 'New Group', 'htmlOptions' => $model->isNewRecord() ? ['class' => 'selected'] : []]]);
echo \mpf\widgets\form\Form::get(['model' => $model, 'name' => 'save', 'theme' => 'default-wide', 'fields' => ['full_name', 'html_class', ['name' => 'admin', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'moderator', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'newthread', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'threadreply', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'canread', 'type' => 'radio', 'options' => ['No', 'Yes']]]])->display();
コード例 #21
0
<div class="forum-user-panel">
    <div class="forum-user-panel-icon">
        <?php 
echo \mpf\web\helpers\Html::get()->link(['user', 'controlPanel'], \mpf\web\helpers\Html::get()->image(\mpf\modules\forum\components\ModelHelper::getUserIconURL(\mpf\WebApp::get()->user()->icon ?: 'default.png')));
?>
    </div>
    <div class="forum-user-panel-about">
        <?php 
echo \mpf\web\helpers\Html::get()->link(['user', 'index', ['id' => \mpf\WebApp::get()->user()->id, 'name' => \mpf\WebApp::get()->user()->name]], \mpf\WebApp::get()->user()->name, ['class' => 'form-user-panel-about-name']);
?>
        <span
            class="form-user-panel-about-title"><?php 
echo \mpf\modules\forum\components\UserAccess::get()->getUserTitle($this->sectionId, true);
?>
</span>
    </div>
    <div class="forum-user-panel-links">
        <?php 
echo \mpf\web\helpers\Html::get()->link(['home'], \mpf\modules\forum\components\Translator::get()->translate('Categories'));
?>
        <?php 
echo \mpf\web\helpers\Html::get()->link(['user', 'controlPanel'], \mpf\modules\forum\components\Translator::get()->translate('Control Panel'));
?>
        <?php 
echo \mpf\web\helpers\Html::get()->link(['search', 'recent'], \mpf\modules\forum\components\Translator::get()->translate('Recent Threads'));
?>
        <?php 
echo \mpf\web\helpers\Html::get()->link(['members'], \mpf\modules\forum\components\Translator::get()->translate('Members'));
?>
    </div>
</div>
コード例 #22
0
ファイル: pagelist.php プロジェクト: mpf-soft/social-modules
    ?>
"/>
            </li>
            <?php 
    if ($currentPage < $totalPages) {
        ?>
                <?php 
        for ($i = 1; $i < 6; $i++) {
            ?>
                    <?php 
            echo $totalElements - $currentPage >= $i && $currentPage + $i < $totalPages ? \mpf\web\helpers\Html::get()->tag('li', $this->getPageLink($currentPage + $i, $currentPage + $i)) : '';
            ?>
                <?php 
        }
        ?>
                <?php 
        echo $currentPage + 5 < $totalPages - 1 ? \mpf\web\helpers\Html::get()->tag('li', \mpf\web\helpers\Html::get()->tag('span', '...', ['class' => 'forum-dots-for-missing-pages'])) : '';
        ?>
                <li>
                    <?php 
        echo $this->getPageLink($totalPages, $totalPages);
        ?>
                </li>
            <?php 
    }
    ?>
        </ul>
    <?php 
}
?>
</div>
コード例 #23
0
<?php

/* @var $category \mpf\modules\forum\models\ForumCategory */
/* @var $this \mpf\modules\forum\components\Controller */
?>
<h2><?php 
echo \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['category', 'index', ['category' => $category->url_friendly_name, 'id' => $category->id]]), \mpf\web\helpers\Html::get()->image($this->getUploadUrl() . 'categories/' . $category->icon) . $category->name, ['class' => 'category']);
?>
</h2>
コード例 #24
0
ファイル: header.php プロジェクト: mpf-soft/app-basic
echo \mpf\WebApp::get()->title;
?>
</title>
    <?php 
echo \mpf\web\helpers\Html::get()->cssFile(\mpf\WebApp::get()->request()->getWebRoot() . 'main/style.css');
?>
    <?php 
echo \mpf\web\helpers\Html::get()->mpfScriptFile('jquery.js');
?>
    <?php 
echo \mpf\web\helpers\Html::get()->scriptFile(\mpf\WebApp::get()->request()->getWebRoot() . 'main/main.js');
?>
</head>
<body>
<div id="wrapper">
    <div id="site">
        <div id="header">
            <h1><?php 
echo \mpf\web\helpers\Html::get()->link(\mpf\WebApp::get()->request()->getLinkRoot(), \mpf\WebApp::get()->title);
?>
</h1>
            <?php 
\mpf\widgets\menu\Menu::get(['items' => [['url' => [], 'label' => 'Home'], ['url' => ['user', 'login'], 'label' => 'Login', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['url' => ['user', 'register'], 'label' => 'Register', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['url' => ['user', 'forgotpassword'], 'label' => 'Forgot Password', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['class' => 'Label', 'label' => \mpf\WebApp::get()->user()->isGuest() ? 'Welcome Guest!' : 'Welcome ' . \mpf\WebApp::get()->user()->name, 'htmlOptions' => ['style' => 'float:right;'], 'items' => [['url' => ['user', 'profile'], 'label' => 'My Profile'], ['url' => ['user', 'edit'], 'label' => 'Edit My Profile'], ['url' => ['user', 'email'], 'label' => 'Change Email'], ['url' => ['user', 'password'], 'label' => 'Change Password'], ['url' => ['home', 'index', 'admin'], 'label' => 'Administration'], ['url' => ['user', 'logout'], 'label' => 'Logout']]], ['label' => 'Google Login', 'url' => $url = \mpf\WebApp::get()->user()->getGoogleClient() ? \mpf\WebApp::get()->user()->getGoogleClient()->createAuthUrl() : null, 'htmlOptions' => ['style' => 'float:right;'], 'linkHtmlOptions' => ['class' => 'ext-login-button google-login-button'], 'visible' => \mpf\WebApp::get()->user()->isGuest() && trim($url)], ['label' => 'Facebook Login', 'url' => $url = \mpf\WebApp::get()->user()->getFacebookLoginURL(), 'visible' => \mpf\WebApp::get()->user()->isGuest() && trim($url), 'htmlOptions' => ['style' => 'float:right;'], 'linkHtmlOptions' => ['class' => 'ext-login-button facebook-login-button']]]])->display();
?>
        </div>
        <div id="content">
            <?php 
echo \app\components\htmltools\Messages::get()->display();
?>

コード例 #25
0
<?php

/* @var $this \mpf\modules\forum\controllers\Home */
/* @var $model \mpf\modules\forum\models\ForumUser2Section */
$menu = [];
if (\mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId)) {
    ?>
    <?php 
    $menu = [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles']];
}
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " Control Panel", $menu);
?>

<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('topuserpanel');
?>
    <?php 
if ((!\mpf\modules\forum\components\UserAccess::get()->isMember($this->sectionId) || \mpf\modules\forum\components\UserAccess::get()->isBanned($this->sectionId)) && !\mpf\modules\forum\components\UserAccess::get()->isSiteModerator() && !\mpf\modules\forum\components\UserAccess::get()->isSiteAdmin()) {
    ?>
        <?php 
    $this->displayComponent('accessdenied', ['location' => 'members']);
    ?>
        <?php 
    return;
    ?>
    <?php 
}
コード例 #26
0
 /**
  * @param int $page
  * @param string $label
  * @return string
  */
 public function getPageLink($page, $label)
 {
     return Html::get()->link($this->getPageURL($page), $label);
 }
コード例 #27
0
ファイル: titles.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Manage */
/* @var $model \mpf\modules\forum\models\ForumTitle */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " Users", \mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId) ? [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles', 'htmlOptions' => ['class' => 'selected']], ['url' => $this->updateURLWithSection(['manage', 'newTitle']), 'label' => 'New Title']] : [['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles', 'htmlOptions' => ['class' => 'selected']]]);
\mpf\widgets\datatable\Table::get(['dataProvider' => $model->getDataProvider($this->sectionId), 'columns' => ['id', 'title', ['class' => 'Actions', 'buttons' => ['delete' => ['class' => 'Delete', 'url' => $this->getUrlForDatatableAction('delete')], 'edit' => ['class' => 'Edit', 'url' => $this->getUrlForDatatableAction('editTitle')]]]]])->display();
コード例 #28
0
ファイル: DataProvider.php プロジェクト: mpf-soft/mpf
 /**
  * Generates link for a selected page using the GET key generated automatically or manually by a developer.
  * @param $pageNumber
  * @param $label
  * @param array $htmlOptions
  * @return string
  */
 public function getLinkForPage($pageNumber, $label, $htmlOptions = array())
 {
     return Html::get()->link($this->getURLForPage($pageNumber), $label, $htmlOptions);
 }
コード例 #29
0
ファイル: move.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\components\Controller */
/* @var $model \mpf\modules\forum\models\ForumThread */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['category', 'index', ['category' => $model->subcategory->category->url_friendly_name, 'id' => $model->subcategory->category_id]]), $model->subcategory->category->name) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['subcategory', 'index', ['category' => $model->subcategory->category->url_friendly_name, 'subcategory' => $model->subcategory->url_friendly_title, 'id' => $model->subcategory->category_id]]), $model->subcategory->title) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['thread', 'index', ['category' => $model->subcategory->category->url_friendly_name, 'subcategory' => $model->subcategory->url_friendly_title, 'id' => $model->id]]), $model->title) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\modules\forum\components\Translator::get()->translate("Move post"));
?>

<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('searchbar');
?>
    <?php 
$this->displayComponent('topuserpanel');
?>
    <?php 
echo \mpf\widgets\form\Form::get(['name' => 'move', 'model' => $model, 'theme' => 'default-wide', 'fields' => [['name' => 'subcategory_id', 'type' => 'select', 'options' => \mpf\modules\forum\models\ForumSubcategory::getAllForSelectTree($this->sectionId)]]])->display();
?>
</div>
コード例 #30
0
/* @var $this mpf\widgets\datatable\Table */
foreach ($this->multiSelectActions as $name => $details) {
    ?>
    <?php 
    $details = is_array($details) ? $details : array('label' => $details);
    ?>
    <?php 
    $htmlOptions = isset($details['htmlOptions']) ? $details['htmlOptions'] : array();
    ?>
    <?php 
    $htmlOptions['data-action'] = $name;
    ?>
    <?php 
    foreach (array('url', 'js', 'confirmation', 'shortcut') as $key) {
        ?>
        <?php 
        if (isset($details[$key])) {
            ?>
            <?php 
            $htmlOptions['data-' . $key] = $details[$key];
            ?>
        <?php 
        }
        ?>
    <?php 
    }
    ?>

    <?php 
    echo \mpf\web\helpers\Html::get()->link('#', (isset($details['icon']) ? \mpf\web\helpers\Html::get()->image($details['icon'], $details['label']) : '') . '<span>' . $details['label'] . '</span>', $htmlOptions);
}