Skip to content

Commit

Permalink
Fixed issue #10400: No plugin settings in survey
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 12, 2016
1 parent 25dcd4c commit fc089ff
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<a class="btn btn-default btn-xs hide-button hidden-xs opened handleAccordion">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="collapsed" role="button" data-toggle="collapse" href="#integrationoptions" aria-expanded="false" aria-controls="resourcesoptions">
<a class="collapsed" role="button" data-toggle="collapse" href="#integrationoptions" aria-expanded="false" aria-controls="integrationoptions">
<?php eT("Panel integration"); ?>
</a>
</h4>
Expand Down Expand Up @@ -143,5 +143,24 @@
</div>
</div>
</div>

<!-- PLugin settings -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingEight">
<h4 class="panel-title">
<a class="btn btn-default btn-xs hide-button hidden-xs opened handleAccordion">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="collapsed" role="button" data-toggle="collapse" href="#pluginsoptions" aria-expanded="false" aria-controls="pluginsoptions">
<?php eT("Plugins"); ?>
</a>
</h4>
</div>
<div id="pluginsoptions" class="panel-collapse collapse" role="tabpanel" aria-labelledby="pluginoptions">
<div class="panel-body">
<?php $this->renderPartial('/admin/survey/subview/accordion/_plugins_panel', $data); ?>
</div>
</div>
</div>
<?php endif;?>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Plugin options panel
*/
?>
<div id='resources' class="tab-pane fade in">

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Feb 12, 2016

Collaborator

Are your sure for id ;)

What did you think if we make a tab for each plugin ? I make a test and a pull request :)

<?php
if (isset($pluginSettings))
{
foreach ($pluginSettings as $id => $plugin)
{
$this->widget('ext.SettingsWidget.SettingsWidget', array(
'settings' => $plugin['settings'],
'form' => false,
'title' => sprintf(gT("Settings for plugin %s"), $plugin['name']),
'prefix' => "plugin[{$plugin['name']}]"

));
// foreach ($plugin['settings'] as $name => $setting)
// {
// $name = "plugin[{$plugin['name']}][$name]";
// echo CHtml::tag('li', array(), $PluginSettings->renderSetting($name, $setting, null, true));
// }
}


// Yii::import('application.helpers.PluginSettingsHelper');
// $PluginSettings = new PluginSettingsHelper();
}

?>
</div>

0 comments on commit fc089ff

Please sign in to comment.