public function renderNumberOfPages($numberOfPages) { if (!empty($numberOfPages)) { return Html::encode(rtrim($numberOfPages, '.pf ') . ' pp. '); } return ''; }
* file that was distributed with this source code. */ use yii\widgets\ActiveForm; use jobrunner\inlitteris\helpers\Html; use jobrunner\inlitteris\widgets\Bibliography; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel jobrunner\inlitteris\models\ReferenceSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $model jobrunner\inlitteris\models\CitationStyle */ $this->title = Yii::t('inlitteris', 'Bibliography'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="reference-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a(Yii::t('inlitteris', 'Create Reference'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php $enabledStyles = $model->kvEnabled(); ?> <?php if (count($enabledStyles) > 0) { ?> <?php
use jobrunner\inlitteris\helpers\Html; use jobrunner\inlitteris\widgets\Citation; use jobrunner\inlitteris\widgets\Bibliography; /* @var $this yii\web\View */ /* @var $model jobrunner\inlitteris\models\Reference */ $citation = Citation::widget(['model' => $model]); $breadcrumbCitation = strip_tags($citation); $breadcrumbCitation = preg_replace('/\\R/u', '', $breadcrumbCitation); $breadcrumbCitation = trim($breadcrumbCitation, '()'); $this->params['breadcrumbs'][] = ['label' => Yii::t('inlitteris', 'References'), 'url' => ['index']]; $this->params['breadcrumbs'][] = Html::encode($breadcrumbCitation); ?> <div class="reference-view"> <h2><?php echo Html::encode($breadcrumbCitation); ?> </h2> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id:ntext', ['label' => 'Citation', 'format' => 'html', 'value' => $citation], ['label' => 'Bibliography', 'format' => 'html', 'value' => Bibliography::widget(['model' => $model])], 'referenceType.typeName:ntext', 'authors:ntext', 'title:html', 'secondaryTitle:ntext', 'secondaryAuthors:ntext', 'tertiaryTitle:ntext', 'tertiaryAuthors:ntext', 'year:ntext', 'volume:ntext', 'number:ntext', 'pages:ntext', 'section:ntext', 'edition:ntext', 'place:ntext', 'publisher:ntext', 'isbn:ntext']]); ?> <p style="text-align: center"> <?php echo Html::a(Yii::t('inlitteris', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a(Yii::t('inlitteris', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('inlitteris', 'Are you sure you want to delete this item?'), 'method' => 'post']]); ?> </p>