namespace yii_app\helpers;
+use Yii;
+use yii\helpers\Html;
+use yii\helpers\Url;
+
class PrintBlockHelper {
public static function printBlock($title, $block, $reverse = false) {
?>
</div>
<?php
}
-}
\ No newline at end of file
+
+ public static function printDocAnchor($url = ['wiki/show-doc', 'returnUrl' => null], $htmlOptions = [])
+ {
+ if (is_array($url)) {
+ if (!isset($url['returnUrl']) || $url['returnUrl'] === null) {
+ $url['returnUrl'] = Yii::$app->request->url;
+ }
+ $linkUrl = Url::to($url);
+ } else {
+ $linkUrl = $url;
+ }
+
+ $defaultOptions = [
+ 'class' => '',
+ 'target' => '_blank',
+ 'title' => 'Открыть документацию',
+ ];
+
+ $options = array_merge($defaultOptions, $htmlOptions);
+
+ $svgIcon = '<svg fill="#000000" version="1.1" id="Capa_1" width="20px" height="20px"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
+ viewBox="0 0 416.979 416.979" xml:space="preserve"><g id="SVGRepo_bgCarrier"
+ stroke-width="0"></g><g id="SVGRepo_tracerCarrier"
+ stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g>
+ <path d="M356.004,61.156c-81.37-81.47-213.377-81.551-294.848-0.182c-81.47,81.371-81.552,213.379-0.181,
+ 294.85 c81.369,81.47,213.378,81.551,294.849,0.181C437.293,274.636,437.375,142.626,356.004,61.156z M237.6,
+ 340.786 c0,3.217-2.607,5.822-5.822,5.822h-46.576c-3.215,0-5.822-2.605-5.822-5.822V167.885c0-3.217,
+ 2.607-5.822,5.822-5.822h46.576 c3.215,0,5.822,2.604,5.822,5.822V340.786z M208.49,137.901c-18.618,
+ 0-33.766-15.146-33.766-33.765 c0-18.617,15.147-33.766,33.766-33.766c18.619,0,33.766,15.148,33.766,
+ 33.766C242.256,122.755,227.107,137.901,208.49,137.901z">
+ </path> </g> </g></svg>';
+
+ return Html::a($svgIcon, $linkUrl, $options);
+ }
+
+}
use yii\helpers\Html;
use yii\base\DynamicModel;
+use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\select2\Select2;
use dosamigos\datetimepicker\DateTimePicker;
+use yii_app\helpers\PrintBlockHelper;
use yii_app\records\Admin;
use yii_app\records\AdminGroup;
use yii_app\records\StoreType;
?>
<div class="salesWriteOffsPlanIndex m-5">
-
- <h1>План продаж и списания</h1>
+ <div class="row my-4">
+ <div class="col-8">
+ <h1>План продаж и списания
+ <?= PrintBlockHelper::printDocAnchor() ?>
+ </h1>
+ <?= Html::a(
+ '📖 Документация',
+ Url::to(
+ ['wiki/show-doc', 'returnUrl' => Yii::$app->request->url]
+ ),
+ ['class' => 'ms-3', 'target' => '_blank', 'title' => 'Открыть документацию']
+ ) ?>
+ </div>
+ </div>
<?php $form = ActiveForm::begin([
'method' => 'GET',