mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Merge pull request #4508 from humhub/enh/4506
Enh #4506: Add more Icon aliases for 1.7
This commit is contained in:
commit
5cefd81500
@ -8,6 +8,7 @@
|
||||
|
||||
namespace humhub\libs;
|
||||
|
||||
use humhub\widgets\Button;
|
||||
use yii\grid\Column;
|
||||
use yii\helpers\Url;
|
||||
use humhub\libs\Html;
|
||||
@ -52,7 +53,8 @@ class ActionColumn extends Column
|
||||
}
|
||||
|
||||
$html = Html::beginTag('div', ['class' => 'btn-group dropdown-navigation']);
|
||||
$html .= Html::button('<i class="fa fa-cog"></i> <span class="caret"></span>', ['class' => 'btn btn-default dropdown-toggle', 'data-toggle' => 'dropdown']);
|
||||
$html .= Button::defaultType('<span class="caret"></span>')->cssClass('dropdown-toggle')
|
||||
->options(['data-toggle' => 'dropdown'])->icon('controls')->loader(false);
|
||||
$html .= Html::beginTag('ul', ['class' => 'dropdown-menu pull-right']);
|
||||
foreach ($actions as $title => $url) {
|
||||
if ($url === '---') {
|
||||
@ -89,7 +91,7 @@ class ActionColumn extends Column
|
||||
|
||||
/**
|
||||
* Builds the URL for a given Action
|
||||
*
|
||||
*
|
||||
* @param array $url
|
||||
* @param \yii\base\Model $model
|
||||
* @return string the url
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
namespace humhub\libs;
|
||||
|
||||
use humhub\modules\ui\icon\widgets\Icon;
|
||||
use humhub\modules\web\security\helpers\Security;
|
||||
use Yii;
|
||||
use yii\base\InvalidArgumentException;
|
||||
@ -114,7 +115,7 @@ class Html extends \yii\bootstrap\Html
|
||||
}
|
||||
|
||||
if (!isset($options['showIcon']) || $options['showIcon'] === true) {
|
||||
$label = '<i class="fa fa-arrow-left aria-hidden="true"></i> ' . $label;
|
||||
$label = Icon::get('back')->asString().' '. $label;
|
||||
}
|
||||
|
||||
if (empty($url)) {
|
||||
|
@ -1,10 +1,16 @@
|
||||
<?php
|
||||
|
||||
use humhub\libs\Html;
|
||||
use humhub\modules\admin\widgets\GroupManagerMenu;
|
||||
use humhub\modules\user\models\Group;
|
||||
use humhub\widgets\Button;
|
||||
|
||||
/* @var $group Group */
|
||||
|
||||
?>
|
||||
<div class="panel-body">
|
||||
<div class="pull-right">
|
||||
<?= Html::backButton(['index'], ['label' => Yii::t('AdminModule.base', 'Back to overview')]); ?>
|
||||
<?= Button::back(['index'], Yii::t('AdminModule.base', 'Back to overview'))?>
|
||||
</div>
|
||||
|
||||
<?php if (!$group->isNewRecord) : ?>
|
||||
@ -22,7 +28,7 @@ use humhub\libs\Html;
|
||||
<?php if ($group->is_admin_group) : ?>
|
||||
<div class="pull-right"><span class="label label-danger"><?= Yii::t('AdminModule.base', 'Administrative group'); ?></span> </div>
|
||||
<?php endif; ?>
|
||||
<?= \humhub\modules\admin\widgets\GroupManagerMenu::widget(['group' => $group]); ?>
|
||||
<?= GroupManagerMenu::widget(['group' => $group]); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $content; ?>
|
||||
|
@ -1,14 +1,19 @@
|
||||
<?php
|
||||
|
||||
use humhub\libs\ActionColumn;
|
||||
use humhub\modules\admin\models\GroupSearch;
|
||||
use humhub\modules\admin\widgets\GroupMenu;
|
||||
use humhub\widgets\Link;
|
||||
use yii\helpers\Url;
|
||||
use yii\helpers\Html;
|
||||
use humhub\widgets\GridView;
|
||||
|
||||
/* @var $searchModel GroupSearch*/
|
||||
?>
|
||||
<div class="panel-body">
|
||||
<div class="pull-right">
|
||||
<?= Html::a('<i class="fa fa-plus" aria-hidden="true"></i> ' . Yii::t('AdminModule.user', 'Create new group'), Url::to(['edit']), ['class' => 'btn btn-sm btn-success']); ?>
|
||||
<?= Link::success(Yii::t('AdminModule.user', 'Create new group'))->href(Url::to(['edit']))->sm()->icon('add') ?>
|
||||
</div>
|
||||
|
||||
|
||||
<h4><?= Yii::t('AdminModule.user', 'Manage groups'); ?></h4>
|
||||
|
||||
<div class="help-block">
|
||||
@ -16,12 +21,11 @@ use humhub\widgets\GridView;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= \humhub\modules\admin\widgets\GroupMenu::widget(); ?>
|
||||
<?= GroupMenu::widget() ?>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<?php
|
||||
echo GridView::widget([
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'tableOptions' => ['class' => 'table table-hover'],
|
||||
@ -38,7 +42,7 @@ use humhub\widgets\GridView;
|
||||
}
|
||||
],
|
||||
[
|
||||
'class' => \humhub\libs\ActionColumn::class,
|
||||
'class' => ActionColumn::class,
|
||||
'actions' => function($group, $key, $index) {
|
||||
/* @var $group \humhub\modules\user\models\Group */
|
||||
if($group->is_admin_group && !Yii::$app->user->isAdmin()) {
|
||||
@ -54,6 +58,5 @@ use humhub\widgets\GridView;
|
||||
}
|
||||
],
|
||||
],
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
]) ?>
|
||||
</div>
|
||||
|
@ -1,33 +1,41 @@
|
||||
<?php
|
||||
|
||||
use humhub\modules\admin\assets\AdminGroupAsset;
|
||||
use humhub\modules\admin\models\forms\AddGroupMemberForm;
|
||||
use humhub\modules\admin\models\UserSearch;
|
||||
use humhub\modules\user\models\Group;
|
||||
use humhub\widgets\Button;
|
||||
use yii\helpers\Url;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use humhub\widgets\GridView;
|
||||
use humhub\modules\user\grid\ImageColumn;
|
||||
use humhub\modules\user\grid\DisplayNameColumn;
|
||||
use humhub\modules\user\widgets\UserPickerField;
|
||||
|
||||
\humhub\modules\admin\assets\AdminGroupAsset::register($this);
|
||||
/* @var $group Group */
|
||||
/* @var $addGroupMemberForm AddGroupMemberForm */
|
||||
/* @var $searchModel UserSearch */
|
||||
|
||||
AdminGroupAsset::register($this);
|
||||
?>
|
||||
|
||||
<?php $this->beginContent('@admin/views/group/_manageLayout.php', ['group' => $group]) ?>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<?php $form = ActiveForm::begin(['action' => ['/admin/group/add-members']]); ?>
|
||||
<div class="input-group select2-humhub-append">
|
||||
<?=
|
||||
humhub\modules\user\widgets\UserPickerField::widget([
|
||||
<?= UserPickerField::widget([
|
||||
'model' => $addGroupMemberForm,
|
||||
'attribute' => 'userGuids',
|
||||
'url' => Url::to(['/admin/group/new-member-search', 'id' => $group->id]),
|
||||
'placeholder' => Yii::t('AdminModule.user', 'Add new members...'),
|
||||
'focus' => true,
|
||||
])
|
||||
?>
|
||||
]) ?>
|
||||
<?= Html::activeHiddenInput($addGroupMemberForm, 'groupId', ['value' => $group->id]) ?>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary" style="height:40px;" data-ui-loader><i class="fa fa-plus"></i></button>
|
||||
<?= Button::primary()->submit()->style('height:40px')->icon('add') ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
@ -39,7 +47,7 @@ use humhub\modules\user\grid\DisplayNameColumn;
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -86,11 +94,11 @@ use humhub\modules\user\grid\DisplayNameColumn;
|
||||
return false;
|
||||
},
|
||||
'delete' => function($url, $model) use ($group) {
|
||||
return Html::a('<i class="fa fa-times"></i>', '#', [
|
||||
'data-action-click' => 'admin.group.removeMember',
|
||||
'data-action-url' => Url::to(['remove-group-user', 'id' => $group->id, 'userId' => $model->id]),
|
||||
'title' => Yii::t('AdminModule.user', 'Remove from group'),
|
||||
'class' => 'btn btn-danger btn-xs tt']);
|
||||
return Button::danger()
|
||||
->tooltip(Yii::t('AdminModule.user', 'Remove from group'))
|
||||
->action('admin.group.removeMember', Url::to(['remove-group-user', 'id' => $group->id, 'userId' => $model->id]))
|
||||
->icon('remove')->xs()
|
||||
->confirm();
|
||||
}
|
||||
],
|
||||
],
|
||||
@ -100,4 +108,4 @@ use humhub\modules\user\grid\DisplayNameColumn;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->endContent(); ?>
|
||||
<?php $this->endContent(); ?>
|
||||
|
@ -71,7 +71,7 @@ $iconUrl = SiteIcon::getUrl(140);
|
||||
|
||||
<?= Button::danger()->id('admin-delete-logo-image')
|
||||
->action('admin.deletePageLogo', Url::to(['/admin/setting/delete-logo-image']))
|
||||
->style(LogoImage::hasImage() ? '' : 'display:none')->icon('times')->sm()->loader(false) ?>
|
||||
->style(LogoImage::hasImage() ? '' : 'display:none')->icon('remove')->sm()->loader(false) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -88,7 +88,7 @@ $iconUrl = SiteIcon::getUrl(140);
|
||||
|
||||
<?= Button::danger()->id('admin-delete-icon-image')
|
||||
->action('admin.deletePageIcon', Url::to(['/admin/setting/delete-icon-image']))
|
||||
->style(SiteIcon::hasImage() ? '' : 'display:none')->icon('times')->sm()->loader(false) ?>
|
||||
->style(SiteIcon::hasImage() ? '' : 'display:none')->icon('remove')->sm()->loader(false) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use humhub\widgets\Button;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
use humhub\compat\CActiveForm;
|
||||
@ -9,7 +10,7 @@ use humhub\compat\CHtml;
|
||||
<?php $this->beginContent('@admin/views/setting/_advancedLayout.php') ?>
|
||||
|
||||
<div class="clearfix">
|
||||
<?= Html::a('<i class="fa fa-arrow-left" aria-hidden="true"></i> ' . Yii::t('AdminModule.settings', 'Back to overview'), Url::to(['setting/oembed']), ['class' => 'btn btn-default pull-right']); ?>
|
||||
<?= Button::back(Url::to(['setting/oembed']), Yii::t('AdminModule.settings', 'Back to overview')) ?>
|
||||
<h4 class="pull-left">
|
||||
<?php
|
||||
if ($prefix == "") {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
use humhub\modules\user\grid\DisplayNameColumn;
|
||||
use humhub\modules\user\grid\ImageColumn;
|
||||
use humhub\widgets\ModalButton;
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use humhub\modules\admin\widgets\SpaceGridView;
|
||||
@ -11,11 +12,13 @@ use humhub\modules\admin\grid\SpaceImageColumn;
|
||||
use humhub\modules\admin\models\SpaceSearch;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/* @var $searchModel SpaceSearch*/
|
||||
?>
|
||||
|
||||
<?= Html::a('<i class="fa fa-plus" aria-hidden="true"></i> ' . Yii::t('AdminModule.space', 'Add new space'), ['/space/create'], ['class' => 'btn btn-sm btn-success pull-right', 'data-target' => '#globalModal']); ?>
|
||||
<?= ModalButton::success(Yii::t('AdminModule.space', 'Add new space'))->load(['/space/create'])
|
||||
->icon('add')->right()->sm() ?>
|
||||
|
||||
<h4><?= Yii::t('AdminModule.space', 'Overview'); ?></h4>
|
||||
<h4><?= Yii::t('AdminModule.space', 'Overview') ?></h4>
|
||||
<div class="help-block">
|
||||
<?= Yii::t('AdminModule.space', 'This overview contains a list of each space with actions to view, edit and delete spaces.'); ?>
|
||||
</div>
|
||||
|
@ -15,10 +15,10 @@ use yii\helpers\Url;
|
||||
|
||||
|
||||
<?= Button::success(Yii::t('AdminModule.user', 'Add new field'))
|
||||
->icon('plus')->sm()->link(Url::to(['edit-field', 'categoryId' => $category->id]))->right()->style('margin-left:5px') ?>
|
||||
->icon('add')->sm()->link(Url::to(['edit-field', 'categoryId' => $category->id]))->right()->style('margin-left:5px') ?>
|
||||
|
||||
<?= Button::primary(Yii::t('AdminModule.user', 'Edit category'))
|
||||
->icon('pencil')->sm()->link(Url::to(['edit-category', 'id' => $category->id]))->right() ?>
|
||||
->icon('edit')->sm()->link(Url::to(['edit-category', 'id' => $category->id]))->right() ?>
|
||||
|
||||
|
||||
<?= GridView::widget([
|
||||
@ -81,7 +81,7 @@ use yii\helpers\Url;
|
||||
},
|
||||
'update' => function ($url, $category) {
|
||||
/* @var $model ProfileField */
|
||||
return Button::primary()->icon('pencil')->link(Url::to(['edit-field', 'id' => $category->id]))->sm();
|
||||
return Button::primary()->icon('edit')->link(Url::to(['edit-field', 'id' => $category->id]))->sm();
|
||||
},
|
||||
],
|
||||
],
|
||||
|
@ -16,7 +16,7 @@ foreach (ProfileFieldCategory::find()->orderBy('sort_order')->all() as $category
|
||||
}
|
||||
|
||||
$categoryItems[] = [
|
||||
'label' => Icon::get('plus', [
|
||||
'label' => Icon::get('add', [
|
||||
'htmlOptions' => [
|
||||
'title' => Yii::t('AdminModule.user', 'Add new category'),
|
||||
'class' => 'tt'
|
||||
|
@ -1,20 +1,28 @@
|
||||
<?php
|
||||
|
||||
use humhub\libs\Html;
|
||||
use humhub\compat\HForm;
|
||||
use humhub\widgets\Button;
|
||||
use humhub\widgets\ModalButton;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $hForm HForm */
|
||||
?>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="clearfix">
|
||||
|
||||
<div class="pull-right">
|
||||
<?= Html::backButton(['index'], ['label' => Yii::t('AdminModule.base', 'Back to overview')]); ?>
|
||||
<?= Html::a('<i class="fa fa-paper-plane" aria-hidden="true"></i> ' . Yii::t('AdminModule.user', 'Send invite'), ['/user/invite'], ['class' => 'btn btn-success', 'data-target' => '#globalModal']); ?>
|
||||
<?= Button::back(['index'], Yii::t('AdminModule.base', 'Back to overview'))
|
||||
->right(false) ?>
|
||||
|
||||
<?= ModalButton::success(Yii::t('AdminModule.user', 'Send invite'))
|
||||
->load(['/user/invite'])->icon('invite')->sm() ?>
|
||||
</div>
|
||||
|
||||
<h4 class="pull-left"><?= Yii::t('AdminModule.user', 'Add new user'); ?></h4>
|
||||
<h4 class="pull-left"><?= Yii::t('AdminModule.user', 'Add new user') ?></h4>
|
||||
</div>
|
||||
<br>
|
||||
<?php $form = \yii\widgets\ActiveForm::begin(['options' => ['data-ui-widget' => 'ui.form.TabbedForm', 'data-ui-init' => '']]); ?>
|
||||
<?= $hForm->render($form); ?>
|
||||
<?php \yii\widgets\ActiveForm::end(); ?>
|
||||
<?php $form = ActiveForm::begin(['options' => ['data-ui-widget' => 'ui.form.TabbedForm', 'data-ui-init' => '']]); ?>
|
||||
<?= $hForm->render($form); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@ use yii\widgets\ActiveForm;
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="pull-right">
|
||||
<?= Html::a('<i class="fa fa-plus" aria-hidden="true"></i> ' . Yii::t('AdminModule.user', 'Add new user'), ['/admin/user/add'], ['class' => 'btn btn-success btn-sm', 'data-ui-loader' => '']); ?>
|
||||
<?= Button::success(Yii::t('AdminModule.user', 'Add new user'))->icon('add')->sm()->link(['/admin/user/add']) ?>
|
||||
<?= ExportButton::widget(['filter' => 'UserSearch']) ?>
|
||||
</div>
|
||||
|
||||
|
@ -47,11 +47,11 @@ $module = Yii::$app->getModule('comment');
|
||||
<li>
|
||||
<a href="#" class="comment-edit-link" data-action-click="edit"
|
||||
data-action-url="<?= $editUrl ?>">
|
||||
<i class="fa fa-pencil"></i> <?= Yii::t('CommentModule.base', 'Edit') ?>
|
||||
<?= Icon::get('edit')?> <?= Yii::t('CommentModule.base', 'Edit') ?>
|
||||
</a>
|
||||
<a href="#" class="comment-cancel-edit-link" data-action-click="cancelEdit"
|
||||
data-action-url="<?= $loadUrl ?>" style="display:none;">
|
||||
<i class="fa fa-pencil"></i> <?= Yii::t('CommentModule.base', 'Cancel Edit') ?>
|
||||
<?= Icon::get('edit')?> <?= Yii::t('CommentModule.base', 'Cancel Edit') ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
@ -59,7 +59,7 @@ $module = Yii::$app->getModule('comment');
|
||||
<?php if ($canDelete): ?>
|
||||
<li>
|
||||
<a href="#" data-action-click="delete">
|
||||
<i class="fa fa-trash-o"></i> <?= Yii::t('CommentModule.base', 'Delete') ?>
|
||||
<?= Icon::get('delete') ?> <?= Yii::t('CommentModule.base', 'Delete') ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
@ -37,7 +37,7 @@ if (!isset($confirmBody)) {
|
||||
->cssClass('profile-image-edit profile-image-crop') ?>
|
||||
|
||||
<?= Button::danger()
|
||||
->icon('times')
|
||||
->icon('remove')
|
||||
->action('delete', $deleteUrl)
|
||||
->style($editButtonStyle)->sm()
|
||||
->loader(false)
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Url;
|
||||
use humhub\modules\ui\icon\widgets\Icon;
|
||||
|
||||
/* @var $this humhub\modules\ui\view\components\View */
|
||||
?>
|
||||
<li>
|
||||
<!-- load modal confirm widget -->
|
||||
<a href="#" data-action-click="delete">
|
||||
<i class="fa fa-trash-o"></i> <?= Yii::t('ContentModule.base', 'Delete') ?>
|
||||
<?= Icon::get('delete') ?> <?= Yii::t('ContentModule.base', 'Delete') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1,25 +1,27 @@
|
||||
<?php
|
||||
|
||||
use humhub\modules\content\widgets\WallEntry;
|
||||
use humhub\modules\content\widgets\stream\WallStreamEntryWidget;
|
||||
use humhub\modules\ui\icon\widgets\Icon;
|
||||
|
||||
/* @var $this humhub\modules\ui\view\components\View */
|
||||
/* @var $mode string */
|
||||
|
||||
?>
|
||||
<li>
|
||||
<?php if($mode === WallEntry::EDIT_MODE_INLINE) : ?>
|
||||
<?php if($mode === WallStreamEntryWidget::EDIT_MODE_INLINE) : ?>
|
||||
<a href="#" class="stream-entry-edit-link" data-action-click="edit" data-action-url="<?= $editUrl ?>">
|
||||
<i class="fa fa-pencil"></i> <?= Yii::t('ContentModule.base', 'Edit') ?>
|
||||
<?= Icon::get('edit')?> <?= Yii::t('ContentModule.base', 'Edit') ?>
|
||||
</a>
|
||||
<a href="#" class="stream-entry-cancel-edit-link" data-action-click="cancelEdit" style="display:none;">
|
||||
<i class="fa fa-pencil"></i> <?= Yii::t('ContentModule.base', 'Cancel Edit') ?>
|
||||
<?= Icon::get('edit')?> <?= Yii::t('ContentModule.base', 'Cancel Edit') ?>
|
||||
</a>
|
||||
<?php elseif ($mode === WallEntry::EDIT_MODE_MODAL) : ?>
|
||||
<?php elseif ($mode === WallStreamEntryWidget::EDIT_MODE_MODAL) : ?>
|
||||
<a href="#" class="stream-entry-edit-link" data-action-click="editModal" data-action-url="<?= $editUrl ?>">
|
||||
<i class="fa fa-pencil"></i><?= Yii::t('ContentModule.base', 'Edit') ?>
|
||||
<?= Icon::get('edit')?> <?= Yii::t('ContentModule.base', 'Edit') ?>
|
||||
</a>
|
||||
<?php elseif ($mode === WallEntry::EDIT_MODE_NEW_WINDOW) : ?>
|
||||
<?php elseif ($mode === WallStreamEntryWidget::EDIT_MODE_NEW_WINDOW) : ?>
|
||||
<a href="<?= $editUrl ?>" class="stream-entry-edit-link">
|
||||
<i class="fa fa-pencil"></i><?= Yii::t('ContentModule.base', 'Edit') ?>
|
||||
<?= Icon::get('edit')?> <?= Yii::t('ContentModule.base', 'Edit') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use humhub\modules\topic\widgets\TopicPicker;
|
||||
use humhub\modules\ui\icon\widgets\Icon;
|
||||
use yii\helpers\Html;
|
||||
use humhub\modules\content\assets\ContentFormAsset;
|
||||
use humhub\modules\file\widgets\FilePreview;
|
||||
@ -93,10 +94,11 @@ $pickerUrl = ($contentContainer instanceof Space) ? $contentContainer->createUrl
|
||||
<ul class="nav nav-pills preferences" style="right: 0; top: 5px;">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" style="padding: 5px 10px;" data-toggle="dropdown" href="#" aria-label="<?= Yii::t('base', 'Toggle post menu'); ?>" aria-haspopup="true">
|
||||
<i class="fa fa-cogs"></i></a>
|
||||
<?= Icon::get('cogs')?>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<?= Link::withAction(Yii::t('ContentModule.base', 'Notify members'), 'notifyUser')->icon('fa-bell')?>
|
||||
<?= Link::withAction(Yii::t('ContentModule.base', 'Notify members'), 'notifyUser')->icon('bell')?>
|
||||
</li>
|
||||
<?php if(TopicPicker::showTopicPicker($contentContainer)) : ?>
|
||||
<li>
|
||||
@ -106,7 +108,7 @@ $pickerUrl = ($contentContainer instanceof Space) ? $contentContainer->createUrl
|
||||
<?php if ($canSwitchVisibility): ?>
|
||||
<li>
|
||||
<?= Link::withAction(Yii::t('ContentModule.base', 'Make public'), 'changeVisibility')
|
||||
->id('contentForm_visibility_entry')->icon('fa-unlock') ?>
|
||||
->id('contentForm_visibility_entry')->icon('unlock') ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
@ -36,7 +36,7 @@ class Events
|
||||
'id' => 'dashboard',
|
||||
'label' => Yii::t('DashboardModule.base', 'Dashboard'),
|
||||
'url' => ['/dashboard/dashboard'],
|
||||
'icon' => 'tachometer',
|
||||
'icon' => 'dashboard',
|
||||
'sortOrder' => 100,
|
||||
'isActive' => MenuLink::isActiveState('dashboard')
|
||||
]));
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
namespace humhub\modules\directory;
|
||||
|
||||
use humhub\modules\ui\menu\MenuLink;
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
use humhub\modules\user\models\Group;
|
||||
@ -84,14 +85,14 @@ class Module extends \humhub\components\Module
|
||||
$module = Yii::$app->getModule('directory');
|
||||
|
||||
if($module->canAccess()) {
|
||||
$event->sender->addItem([
|
||||
'label' => Yii::t('DirectoryModule.base', 'Directory'),
|
||||
$event->sender->addEntry(new MenuLink([
|
||||
'id' => 'directory',
|
||||
'icon' => '<i class="fa fa-book"></i>',
|
||||
'url' => Url::to(['/directory/directory']),
|
||||
'icon' => 'directory',
|
||||
'label' => Yii::t('DirectoryModule.base', 'Directory'),
|
||||
'url' => ['/directory/directory'],
|
||||
'sortOrder' => 400,
|
||||
'isActive' => (Yii::$app->controller->module && Yii::$app->controller->module->id == 'directory'),
|
||||
]);
|
||||
'isActive' => MenuLink::isActiveState('directory'),
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,7 +112,7 @@ class Module extends \humhub\components\Module
|
||||
|
||||
/**
|
||||
* Show groups in directory
|
||||
*
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isGroupListingEnabled()
|
||||
|
@ -1,19 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Url;
|
||||
use yii\helpers\Html;
|
||||
use humhub\widgets\Button;
|
||||
use humhub\widgets\ModalButton;
|
||||
use humhub\widgets\PanelMenu;
|
||||
use humhub\modules\user\widgets\Image;
|
||||
|
||||
/* @var $newUsers \yii\db\ActiveQuery */
|
||||
/* @var $showInviteButton boolean */
|
||||
/* @var $showMoreButton boolean */
|
||||
?>
|
||||
<div class="panel panel-default members" id="new-people-panel">
|
||||
<?= PanelMenu::widget(['id' => 'new-people-panel']); ?>
|
||||
<?= PanelMenu::widget(['id' => 'new-people-panel']) ?>
|
||||
|
||||
<div class="panel-heading">
|
||||
<?= Yii::t('DirectoryModule.base', '<strong>New</strong> people'); ?>
|
||||
<?= Yii::t('DirectoryModule.base', '<strong>New</strong> people') ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php foreach ($newUsers->limit(10)->all() as $user) : ?>
|
||||
<?= Image::widget(['user' => $user, 'width' => 40, 'showTooltip' => true]); ?>
|
||||
<?= Image::widget(['user' => $user, 'width' => 40, 'showTooltip' => true]) ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($showInviteButton || $showMoreButton): ?>
|
||||
@ -21,11 +25,13 @@ use humhub\modules\user\widgets\Image;
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($showInviteButton): ?>
|
||||
<?= Html::a('<i class="fa fa-paper-plane" aria-hidden="true"></i> ' . Yii::t('DirectoryModule.base', 'Send invite'), Url::to(['/user/invite']), ['data-target' => '#globalModal']); ?>
|
||||
<?= ModalButton::primary(Yii::t('DirectoryModule.base', 'Send invite'))
|
||||
->load(['/user/invite'])->icon('invite')->sm() ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($showMoreButton): ?>
|
||||
<?= Html::a('<i class="fa fa-list-ul" aria-hidden="true"></i> ' . Yii::t('DirectoryModule.base', 'See all'), Url::to(['/directory/directory/members']), ['classx' => 'btn btn-xl btn-primary', 'class' => 'pull-right']); ?>
|
||||
<?= Button::primary(Yii::t('DirectoryModule.base', 'See all'))
|
||||
->link(['/directory/directory/members'])->icon('list-ul')->sm() ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,22 +1,24 @@
|
||||
<?php
|
||||
|
||||
use humhub\libs\Html;
|
||||
use humhub\modules\marketplace\models\Licence;
|
||||
use yii\helpers\Url;
|
||||
use humhub\modules\ui\view\components\View;
|
||||
use humhub\widgets\Button;
|
||||
|
||||
/* @var $this \humhub\modules\ui\view\components\View */
|
||||
/* @var $this View */
|
||||
/* @var $licence Licence */
|
||||
|
||||
?>
|
||||
<div style="padding:20px" class="jumbotron">
|
||||
<div class="pull-left" style="padding-right:24px">
|
||||
<img src="<?= Yii::getAlias('@web-static/img/humhub_pro.jpg'); ?>" style="height:124px;">
|
||||
<?= Html::img(Yii::getAlias('@web-static/img/humhub_pro.jpg'), ['style' => 'height:124px']) ?>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="<?= Url::to(['/marketplace/licence']); ?>" class="btn btn-primary btn-sm"><i class="fa fa-cogs"> </i>
|
||||
<?= Yii::t('MarketplaceModule.base', 'Edit licence'); ?></a>
|
||||
<?= Button::primary(Yii::t('MarketplaceModule.base', 'Edit licence'))
|
||||
->link(['/marketplace/licence'])->icon('cogs')->sm() ?>
|
||||
</div>
|
||||
<span style="font-size:36px">HumHub </span><span style="font-size:24px">Professional Edition</span><br/>
|
||||
<span style="font-size:18px"><?= Yii::t('MarketplaceModule.base', 'Version:'); ?> <?= Yii::$app->version ?></span><br/>
|
||||
<span style="font-size:18px"><?= Yii::t('MarketplaceModule.base', 'Licenced to:'); ?> <?= $licence->licencedTo; ?></span><br/>
|
||||
<span style="font-size:18px"><?= Yii::t('MarketplaceModule.base', 'Max. users:'); ?> <?= $licence->maxUsers; ?></span><br/>
|
||||
<span style="font-size:18px"><?= Yii::t('MarketplaceModule.base', 'Version:') ?> <?= Html::encode(Yii::$app->version) ?></span><br/>
|
||||
<span style="font-size:18px"><?= Yii::t('MarketplaceModule.base', 'Licenced to:') ?> <?= Html::encode($licence->licencedTo) ?></span><br/>
|
||||
<span style="font-size:18px"><?= Yii::t('MarketplaceModule.base', 'Max. users:') ?> <?= Html::encode($licence->maxUsers) ?></span><br/>
|
||||
</div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use humhub\widgets\Button;
|
||||
use humhub\widgets\GridView;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use humhub\modules\space\models\Space;
|
||||
@ -101,13 +102,10 @@ use yii\helpers\Html;
|
||||
return false;
|
||||
},
|
||||
'delete' => function ($url, $model) use($space) {
|
||||
$url = ['/space/manage/member/remove', 'userGuid' => $model->user->guid, 'container' => $space];
|
||||
return Html::a('<i class="fa fa-times"></i>', $url, [
|
||||
'title' => Yii::t('SpaceModule.manage', 'Remove from space'),
|
||||
'class' => 'btn btn-danger btn-xs tt',
|
||||
'data-method' => 'POST',
|
||||
'data-confirm' => 'Are you really sure?'
|
||||
]);
|
||||
return Button::danger()->tooltip(Yii::t('SpaceModule.manage', 'Remove from space'))
|
||||
->link(['/space/manage/member/remove', 'userGuid' => $model->user->guid, 'container' => $space])
|
||||
->options(['data-method' => 'POST', 'data-confirm' => Yii::t('SpaceModule.manage', 'Are you sure you want to remove this member.') ])
|
||||
->icon('remove')->xs();
|
||||
}
|
||||
],
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
namespace humhub\modules\space\widgets;
|
||||
|
||||
use humhub\modules\space\models\Space;
|
||||
use humhub\modules\ui\icon\widgets\Icon;
|
||||
use humhub\modules\ui\menu\DropdownDivider;
|
||||
use humhub\modules\ui\menu\MenuLink;
|
||||
use humhub\modules\ui\menu\widgets\DropdownMenu;
|
||||
@ -31,7 +32,7 @@ class HeaderControlsMenu extends DropdownMenu
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public $label = '<i class="fa fa-cog"></i>';
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
@ -43,6 +44,11 @@ class HeaderControlsMenu extends DropdownMenu
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
if(!$this->label) {
|
||||
$this->label = Icon::get('controls');
|
||||
}
|
||||
|
||||
if ($this->template === '@humhub/widgets/views/dropdownNavigation') {
|
||||
$this->template = '@ui/menu/widgets/views/dropdown-menu.php';
|
||||
@ -107,7 +113,7 @@ class HeaderControlsMenu extends DropdownMenu
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('SpaceModule.manage', 'Cancel Membership'),
|
||||
'url' => $this->space->createUrl('/space/membership/revoke-membership'),
|
||||
'icon' => 'times',
|
||||
'icon' => 'remove',
|
||||
'sortOrder' => 700,
|
||||
'htmlOptions' => ['data-method' => 'POST']
|
||||
]));
|
||||
|
@ -60,7 +60,7 @@ class Menu extends LeftNavigation
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('SpaceModule.base', 'Stream'),
|
||||
'url' => $this->space->createUrl('/space/space/home'),
|
||||
'icon' => 'bars',
|
||||
'icon' => 'stream',
|
||||
'sortOrder' => 100,
|
||||
'isActive' => MenuLink::isActiveState('space', 'space', ['index', 'home']),
|
||||
]));
|
||||
@ -78,7 +78,7 @@ class Menu extends LeftNavigation
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('SpaceModule.base', 'About'),
|
||||
'url' => $this->space->createUrl('/space/space/about'),
|
||||
'icon' => 'info-circle',
|
||||
'icon' => 'about',
|
||||
'sortOrder' => 10000,
|
||||
'isActive' => MenuLink::isActiveState('space', 'space', ['about']),
|
||||
]));
|
||||
|
@ -1,3 +1,6 @@
|
||||
<button class="btn btn-primary" data-action-click="ui.modal.load" data-action-url="<?= $space->createUrl('/space/membership/invite') ?>">
|
||||
<i class="fa fa-plus"></i> <?= Yii::t('SpaceModule.base', 'Invite') ?>
|
||||
</button>
|
||||
<?php
|
||||
use humhub\widgets\ModalButton;
|
||||
?>
|
||||
|
||||
<?= ModalButton::primary(Yii::t('SpaceModule.base', 'Invite'))
|
||||
->load($space->createUrl('/space/membership/invite'))->icon('invite') ?>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use humhub\modules\ui\icon\widgets\Icon;
|
||||
use humhub\modules\ui\view\components\View;
|
||||
use humhub\modules\directory\permissions\AccessDirectory;
|
||||
use humhub\modules\space\assets\SpaceChooserAsset;
|
||||
@ -62,16 +63,16 @@ $canAccessDirectory = $directoryModule->active && Yii::$app->user->can(AccessDir
|
||||
<form action="" class="dropdown-controls">
|
||||
<div <?php if($canAccessDirectory) : ?>class="input-group"<?php endif; ?>>
|
||||
<input type="text" id="space-menu-search" class="form-control" autocomplete="off"
|
||||
placeholder="<?= Yii::t('SpaceModule.chooser', 'Search'); ?>"
|
||||
title="<?= Yii::t('SpaceModule.chooser', 'Search for spaces'); ?>">
|
||||
placeholder="<?= Yii::t('SpaceModule.chooser', 'Search') ?>"
|
||||
title="<?= Yii::t('SpaceModule.chooser', 'Search for spaces') ?>">
|
||||
<?php if($canAccessDirectory) : ?>
|
||||
<span id="space-directory-link" class="input-group-addon" >
|
||||
<a href="<?= Url::to(['/directory/directory/spaces']); ?>">
|
||||
<i class="fa fa-book"></i>
|
||||
<a href="<?= Url::to(['/directory/directory/spaces']) ?>">
|
||||
<?= Icon::get('directory')?>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<div class="search-reset" id="space-search-reset"><i class="fa fa-times-circle"></i></div>
|
||||
<div class="search-reset" id="space-search-reset"><?= Icon::get('times-circle') ?></div>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
|
@ -40,8 +40,8 @@ use yii\helpers\Html;
|
||||
<div class="input-group">
|
||||
<?= Html::activeTextInput($addModel, 'name', ['style' => 'height:36px', 'class' => 'form-control', 'placeholder' => Yii::t('TopicModule.base', 'Add Topic')]) ?>
|
||||
<span class="input-group-btn">
|
||||
<?= Button::defaultType()->icon('fa-plus')->loader()->submit() ?>
|
||||
</span>
|
||||
<?= Button::defaultType()->icon('add')->loader()->submit() ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
@ -59,7 +59,7 @@ use yii\helpers\Html;
|
||||
'buttons' => [
|
||||
'update' => function ($url, $model) use ($contentContainer) {
|
||||
/* @var $model \humhub\modules\topic\models\Topic */
|
||||
return ModalButton::primary()->load($contentContainer->createUrl('edit', ['id' => $model->id]))->icon('fa-pencil')->xs()->loader(false);
|
||||
return ModalButton::primary()->load($contentContainer->createUrl('edit', ['id' => $model->id]))->icon('edit')->xs()->loader(false);
|
||||
},
|
||||
'view' => function ($url, $model) use ($contentContainer) {
|
||||
/* @var $model \humhub\modules\topic\models\Topic */
|
||||
@ -67,7 +67,7 @@ use yii\helpers\Html;
|
||||
},
|
||||
'delete' => function ($url, $model) use ($contentContainer) {
|
||||
/* @var $model \humhub\modules\topic\models\Topic */
|
||||
return Button::danger()->icon('fa-times')->action('topic.removeOverviewTopic', $contentContainer->createUrl('delete', ['id' => $model->id]))->confirm(
|
||||
return Button::danger()->icon('delete')->action('topic.removeOverviewTopic', $contentContainer->createUrl('delete', ['id' => $model->id]))->confirm(
|
||||
Yii::t('TopicModule.base', '<strong>Confirm</strong> topic deletion'),
|
||||
Yii::t('TopicModule.base', 'Do you really want to delete this topic?'),
|
||||
Yii::t('base', 'Delete'))->xs()->loader(false);
|
||||
|
@ -27,7 +27,18 @@ class Module extends \humhub\components\Module
|
||||
* @var array contains all available icon aliases
|
||||
*/
|
||||
public $iconAlias = [
|
||||
'dropdownToggle' => 'angle-down'
|
||||
'dropdownToggle' => 'angle-down',
|
||||
'edit' => 'pencil',
|
||||
'delete' => 'trash',
|
||||
'dashboard' => 'tachometer',
|
||||
'directory' => 'book',
|
||||
'back' => 'arrow-left',
|
||||
'add' => 'plus',
|
||||
'invite' => 'paper-plane',
|
||||
'remove' => 'times',
|
||||
'controls' => 'cog',
|
||||
'about' => 'info-circle',
|
||||
'stream' => 'bars'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -985,11 +985,16 @@ class Icon extends Widget
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function asString()
|
||||
{
|
||||
return (string)$this;
|
||||
try {
|
||||
return (string) $this;
|
||||
} catch (\Throwable $e) {
|
||||
Yii::error($e);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1000,7 +1005,7 @@ class Icon extends Widget
|
||||
try {
|
||||
$result = $this::widget($this->asArray());
|
||||
return $result ?: '';
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Throwable $e) {
|
||||
Yii::error($e);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class ProfileMenu extends LeftNavigation
|
||||
if (!$module->profileDisableStream) {
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('UserModule.profile', 'Stream'),
|
||||
'icon' => 'bars',
|
||||
'icon' => 'stream',
|
||||
'url' => $this->user->createUrl('//user/profile/home'),
|
||||
'sortOrder' => 200,
|
||||
'isActive' => MenuLink::isActiveState('user', 'profile', ['index', 'home'])
|
||||
@ -59,7 +59,7 @@ class ProfileMenu extends LeftNavigation
|
||||
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('UserModule.profile', 'About'),
|
||||
'icon' => 'info-circle',
|
||||
'icon' => 'about',
|
||||
'url' => $this->user->createUrl('/user/profile/about'),
|
||||
'sortOrder' => 300,
|
||||
'isActive' => MenuLink::isActiveState('user', 'profile', 'about'),
|
||||
|
@ -61,7 +61,7 @@ class Button extends BootstrapComponent
|
||||
$text = Yii::t('base', 'Back');
|
||||
}
|
||||
|
||||
return self::defaultType($text)->link($url)->icon('fa-arrow-left')->right()->loader(true);
|
||||
return self::defaultType($text)->link($url)->icon('back')->right()->loader(true)->sm();
|
||||
}
|
||||
|
||||
public static function userPickerSelfSelect($selector, $text = null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user