<?php /* @var $this SettingsController */ /* @var $form TbActiveForm */ /* @var $settings Setting[] */ /* @var $definitions array */ $this->pageTitle = $title = Yii::t('Settings', 'Settings'); ?> <h2><?php echo $title; ?> </h2> <?php echo FormHelper::helpBlock(Yii::t('Settings', 'This is where you configure global application settings. These settings apply regardless of which backend is currently in use.')); ?> <hr /> <?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('layout' => TbHtml::FORM_LAYOUT_HORIZONTAL, 'htmlOptions' => array('class' => 'setting-form'))); foreach ($settings as $setting) { $name = $setting->name; $definition = $definitions[$name]; if (isset($definition['htmlOptions'])) { $htmlOptions = $definition['htmlOptions']; } else { $htmlOptions = array(); }
<?php /* @var $this Controller */ /* @var $model ChangeLanguageForm */ /* @var $form TbActiveForm */ $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('layout' => TbHtml::FORM_LAYOUT_HORIZONTAL)); // Cache the contents of the form $cacheDependency = new CFileCacheDependency(Yii::app()->basePath . '/messages'); $cacheDuration = 60 * 60 * 24 * 365; if ($this->beginCache('ChangeLanguageModal', array('dependency' => $cacheDependency, 'duration' => $cacheDuration, 'varyByExpression' => function () { return implode('_', array(Yii::app()->user->role, Yii::app()->language)); }))) { // Notify administrators that changing the language here only affects them if (Yii::app()->user->getRole() === User::ROLE_ADMIN) { $settingsLink = CHtml::link(Yii::t('Settings', 'Settings'), $this->createUrl('setting/admin')); echo FormHelper::helpBlock(Yii::t('Language', 'To change the application language for all users go to {settingsUrl} instead', array('{settingsUrl}' => $settingsLink))); } echo $form->dropdownListControlGroup($model, 'language', LanguageManager::getAvailableLanguages()); echo $form->checkboxControlGroup($model, 'setDefault'); ?> <div class="form-actions"> <?php echo TbHtml::submitButton(Yii::t('ChangeLanguageForm', 'Change language'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY)); ?> <?php echo TbHtml::button(Yii::t('ChangeLanguageForm', 'Close'), array('class' => 'btn-padded', 'color' => TbHtml::BUTTON_COLOR_INFO, 'data-toggle' => 'modal', 'data-target' => '#change-language-modal')); ?> </div> <?php
<?php /* @var $this BackendController */ /* @var $model Backend */ $this->pageTitle = $title = Yii::t('Backend', 'Manage backends'); ?> <h2><?php echo $title; ?> </h2> <?php echo FormHelper::helpBlock(Yii::t('Backend', 'This is where you configure your backends. A backend is an instance of XBMC that the application connects to and serves library contents from. If you specify more than one backend, a new item will appear in the main menu, allowing you to easily switch backends.')); ?> <?php echo TbHtml::linkButton(Yii::t('Backend', 'Create new backend'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => array('create'))); ?> <hr /> <?php $this->widget('bootstrap.widgets.TbGridView', array('type' => TbHtml::GRID_TYPE_STRIPED, 'dataProvider' => Backend::model()->dataProvider, 'enableSorting' => false, 'template' => '{items}', 'columns' => array('name', 'hostname', 'port', 'tcp_port', array('name' => 'default', 'header' => Yii::t('Backend', 'Default'), 'type' => 'raw', 'value' => function ($data) { return $data->default ? TbHtml::icon(TbHtml::ICON_OK) : ''; }), 'macAddress', 'subnetMask', array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{update} {delete}'))));
<?php /* @var $model Log */ $this->pageTitle = $title = Yii::t('Log', 'Application log'); ?> <h2><?php echo $title; ?> </h2> <?php echo FormHelper::helpBlock(Yii::t('Log', 'This is the system log. You can sort and filter the table freely to find the information you need. To see the full error message (in case it has been clipped), click the view icon on the right. You can also flush the log by pressing the <i>Flush logs</i> button.')); ?> <?php echo TbHtml::linkButton(Yii::t('Log', 'Flush logs'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => array('flush'), 'confirm' => Yii::t('Misc', 'Are you sure?'))); ?> <hr /> <div class="log-grid"> <?php $this->widget('bootstrap.widgets.TbGridView', array('type' => array(TbHtml::GRID_TYPE_STRIPED), 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('level', 'category', 'logtime', 'source_address', array('name' => 'message', 'cssClassExpression' => function () { return 'message-column'; }), array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{view}')), 'rowCssClassExpression' => function ($row, $data) { if ($data->level === CLogger::LEVEL_ERROR) { return 'error-row';
<?php /* @var $this UserController */ /* @var $model User */ $this->pageTitle = $title = Yii::t('User', 'Manage users'); ?> <h2><?php echo $title; ?> </h2> <?php echo FormHelper::helpBlock(Yii::t('User', 'This is where you configure users. Every user has a role. Administrators can do anything while a normal user can only switch backends (if more than one has been configured).')); ?> <?php echo TbHtml::linkButton(Yii::t('User', 'Create new user'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => array('create'))); ?> <hr /> <?php $this->widget('bootstrap.widgets.TbGridView', array('type' => TbHtml::GRID_TYPE_STRIPED, 'dataProvider' => $model->getDataProvider(), 'enableSorting' => false, 'template' => '{items}', 'columns' => array('username', array('name' => 'role', 'value' => '$data->getRoleName()'), array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{update} {delete}'))));
/* @var $form TbActiveForm */ /* @var $model Backend */ $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('layout' => TbHtml::FORM_LAYOUT_HORIZONTAL)); echo $form->textFieldControlGroup($model, 'name'); echo $form->checkBoxControlGroup($model, 'default'); echo '<hr />'; echo $form->textFieldControlGroup($model, 'hostname'); echo $form->textFieldControlGroup($model, 'port', array('span' => 1)); echo $form->textFieldControlGroup($model, 'username'); echo $form->passwordFieldControlGroup($model, 'password'); echo '<hr />'; $readmeUrl = 'https://github.com/Jalle19/xbmc-video-server/wiki/Configuring-a-reverse-proxy'; echo $form->textFieldControlGroup($model, 'proxyLocation', array('help' => Yii::t('Backend', 'See {readmeUrl} for how to configure this', array('{readmeUrl}' => CHtml::link($readmeUrl, $readmeUrl, array('target' => '_blank')))))); echo '<hr />'; echo FormHelper::helpBlock(Yii::t('Backend', 'The following items are only required if you want the backend to me woken using Wake on LAN')); echo $form->textFieldControlGroup($model, 'macAddress', array('help' => Yii::t('Backend', 'If a MAC address is entered a Wake-on-LAN packet will be sent to it whenever someone logs in'))); echo $form->textFieldControlGroup($model, 'subnetMask', array('help' => Yii::t('Backend', "If you don't know what this, leave it empty. Otherwise enter the subnet mask, e.g. 255.255.0.0"))); echo '<hr />'; echo FormHelper::helpBlock(Yii::t('Backend', "The following item must only be changed if you've changed the port through advancedsettings.xml")); echo $form->textFieldControlGroup($model, 'tcp_port', array('span' => 1, 'help' => Yii::t('Backend', 'If the backend allows TCP connections from other machines, XBMC Video Server will use it to determine when triggered library updates are finished'))); ?> <div class="form-actions"> <?php echo TbHtml::submitButton($model->isNewRecord ? Yii::t('Forms', 'Create') : Yii::t('Forms', 'Save changes'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY)); ?> <?php echo FormHelper::cancelButton(array('backend/admin')); ?> </div> <?php $this->endWidget();
<?php /* @var $this TvShowController */ /* @var $dataProvider LibraryDataProvider */ $this->pageTitle = $title = Yii::t('TVShows', 'Recently added episodes'); ?> <h2><?php echo $title; ?> </h2> <?php echo FormHelper::helpBlock(Yii::t('TVShows', 'You can click the show name to jump directly to the show details page')); $this->widget('RecentlyAddedEpisodeList', array('dataProvider' => $dataProvider));
<?php /* @var $actorDataProvider LibraryDataProvider */ ?> <div class="cast"> <h3><?php echo Yii::t('Media', 'Cast'); ?> </h3> <?php echo FormHelper::helpBlock(Yii::t('Movies', "Click an image to see other movies with that person, or click the name to go to the person's IMDb page")); ?> <div class="row-fluid"> <?php $this->widget('zii.widgets.CListView', array('dataProvider' => $actorDataProvider, 'itemView' => '//videoLibrary/_actorGridItem', 'itemsTagName' => 'ul', 'itemsCssClass' => 'thumbnails actor-grid', 'enablePagination' => false, 'template' => '{items}')); ?> </div> </div>