Skip to content

Commit

Permalink
fix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cbellone committed Jul 6, 2016
1 parent e5f7e0c commit 9930d24
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -1,93 +1,95 @@
<div class="text-center" data-ng-if="eventConf.loading">
<i class="fa fa-cog fa-spin fa-3x"></i><span class="sr-only">Loading...</span>
</div>
<div class="alert alert-warning" data-ng-if="eventConf.noResults">
<h1>You are not authorized to see Event configuration.</h1>
</div>
<div data-ng-if="eventConf.hasResults">

<div>
<h1>Configuration for {{eventConf.event.displayName}}</h1>
<div class="container">
<div class="text-center" data-ng-if="eventConf.loading">
<i class="fa fa-cog fa-spin fa-3x"></i><span class="sr-only">Loading...</span>
</div>

<div class="page-header">
<h2>General</h2>
<span>General settings</span>
<div class="alert alert-warning" data-ng-if="eventConf.noResults">
<h1>You are not authorized to see Event configuration.</h1>
</div>
<div data-ng-if="eventConf.hasResults">

<form name="settingsForm" novalidate data-ng-submit="eventConf.saveSettings(settingsForm)">
<div data-ng-if="eventConf.general">
<div data-ng-repeat="setting in eventConf.general.settings">
<setting data-obj="setting" data-display-delete-if-needed="true" data-global-settings="eventConf.globalSettings" data-delete-handler="eventConf.delete(config)" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}"></setting>
</div>
<div>
<h1>Configuration for {{eventConf.event.displayName}}</h1>
</div>

<div class="page-header" data-ng-if="eventConf.mail">
<h2>E-Mail</h2>
<span>E-Mail settings</span>
<div class="page-header">
<h2>General</h2>
<span>General settings</span>
</div>

<div data-ng-if="eventConf.mail">
<div data-ng-if="eventConf.mail.type" class="system-setting">
<div class="radio-inline">
<label>
<input type="radio" name="mailer.type" data-ng-model="eventConf.mail.type.value" data-ng-value="'smtp'">
SMTP
</label>
<form name="settingsForm" novalidate data-ng-submit="eventConf.saveSettings(settingsForm)">
<div data-ng-if="eventConf.general">
<div data-ng-repeat="setting in eventConf.general.settings">
<setting data-obj="setting" data-display-delete-if-needed="true" data-global-settings="eventConf.globalSettings" data-delete-handler="eventConf.delete(config)" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}"></setting>
</div>
<div class="radio-inline">
<label>
<input type="radio" name="mailer.type" data-ng-model="eventConf.mail.type.value" data-ng-value="'mailgun'">
Mailgun.com
</label>
</div>

<div class="page-header" data-ng-if="eventConf.mail">
<h2>E-Mail</h2>
<span>E-Mail settings</span>
</div>

<div data-ng-if="eventConf.mail">
<div data-ng-if="eventConf.mail.type" class="system-setting">
<div class="radio-inline">
<label>
<input type="radio" name="mailer.type" data-ng-model="eventConf.mail.type.value" data-ng-value="'smtp'">
SMTP
</label>
</div>
<div class="radio-inline">
<label>
<input type="radio" name="mailer.type" data-ng-model="eventConf.mail.type.value" data-ng-value="'mailgun'">
Mailgun.com
</label>
</div>
<div data-ng-repeat="setting in eventConf.mail.settings | mailSettingsFilter:eventConf.mail.type.value" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}">
<setting data-obj="setting" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
</div>
<div>
<setting obj="eventConf.mail.maxEmailPerCycle" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)" class="system-setting"></setting>
</div>
<div>
<setting obj="eventConf.mail.mailReplyTo" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
</div>
</div>
<div data-ng-repeat="setting in eventConf.mail.settings | mailSettingsFilter:eventConf.mail.type.value" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}">
<div data-ng-repeat="setting in eventConf.mail.settings" data-ng-if="!eventConf.mail.type" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}">
<setting data-obj="setting" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
</div>
<div>
<setting obj="eventConf.mail.maxEmailPerCycle" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)" class="system-setting"></setting>
</div>
<div>
<setting obj="eventConf.mail.mailReplyTo" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
</div>
</div>
<div data-ng-repeat="setting in eventConf.mail.settings" data-ng-if="!eventConf.mail.type" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}">
<setting data-obj="setting" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
</div>
</div>

<div class="page-header" data-ng-if="eventConf.payment">
<h2>Payment</h2>
<span>Payment provider settings</span>
</div>

<div data-ng-if="eventConf.payment">
<div data-ng-repeat="setting in eventConf.payment.settings" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}">
<setting data-obj="setting" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
<div class="page-header" data-ng-if="eventConf.payment">
<h2>Payment</h2>
<span>Payment provider settings</span>
</div>
</div>

<div data-ng-if="eventConf.pluginSettingsByPluginId">
<div class="page-header">
<h2>Plugins</h2>
<span>Plugins settings</span>
<div data-ng-if="eventConf.payment">
<div data-ng-repeat="setting in eventConf.payment.settings" data-ng-class="{'system-setting': setting.configurationPathLevel === 'SYSTEM'}">
<setting data-obj="setting" data-display-delete-if-needed="true" data-delete-handler="eventConf.delete(config)"></setting>
</div>
</div>

<div data-ng-repeat="(key, settings) in eventConf.pluginSettingsByPluginId">
<div class="page-header"><h3 data-ng-bind="key"></h3></div>
<div data-ng-repeat="setting in settings">
<setting data-obj="setting" data-display-delete-if-needed="true" data-organization="systemConf.organization"></setting>
<div data-ng-if="eventConf.pluginSettingsByPluginId">
<div class="page-header">
<h2>Plugins</h2>
<span>Plugins settings</span>
</div>

<div data-ng-repeat="(key, settings) in eventConf.pluginSettingsByPluginId">
<div class="page-header"><h3 data-ng-bind="key"></h3></div>
<div data-ng-repeat="setting in settings">
<setting data-obj="setting" data-display-delete-if-needed="true" data-organization="systemConf.organization"></setting>
</div>
</div>
</div>
</div>

<div class="pull-left wMarginBottom wMarginTop" data-ng-if="eventConf.eventName">
<a class="btn btn-default" data-ng-if="eventConf.eventName" data-ui-sref="events.single.detail({eventName: eventConf.eventName})">back to event</a>
</div>
<div class="pull-right wMarginBottom wMarginTop">
<button type="submit" class="btn btn-success" data-ng-disabled="eventConf.loading">save</button>
<a class="btn btn-default" data-ng-if="!eventConf.eventName" data-ui-sref="index">cancel</a>
<a class="btn btn-default" data-ng-if="eventConf.eventName" data-ui-sref="events.single.detail({eventName: eventConf.eventName})">cancel</a>
</div>
</form>
</div>
<div class="pull-left wMarginBottom wMarginTop" data-ng-if="eventConf.eventName">
<a class="btn btn-default" data-ng-if="eventConf.eventName" data-ui-sref="events.single.detail({eventName: eventConf.eventName})">back to event</a>
</div>
<div class="pull-right wMarginBottom wMarginTop">
<button type="submit" class="btn btn-success" data-ng-disabled="eventConf.loading">save</button>
<a class="btn btn-default" data-ng-if="!eventConf.eventName" data-ui-sref="index">cancel</a>
<a class="btn btn-default" data-ng-if="eventConf.eventName" data-ui-sref="events.single.detail({eventName: eventConf.eventName})">cancel</a>
</div>
</form>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="page-header">
<h1>{{event.displayName}}
<a class="btn btn-default visible-xs" data-ng-if="isInternal(event)" data-ui-sref="events.configuration({eventName: event.shortName})"><i class="fa fa-wrench"></i><span class="sr-only"> settings</span></a>
<a class="btn btn-default visible-xs" data-ng-if="isInternal(event)" data-ui-sref="events.single.configuration({eventName: event.shortName})"><i class="fa fa-wrench"></i><span class="sr-only"> settings</span></a>
<button type="button" ng-click="openDeleteWarning(event)" class="btn btn-danger visible-xs" ng-if="isInternal(event)"><i class="fa fa-trash"></i> Delete</button>
</h1>
<h4 class="text-muted">{{event.shortDescription}}</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<li>
<ul class="nav nav-pills nav-stacked" data-ng-if="ctrl.internal">
<li role="presentation" data-ui-sref-active="active">
<a data-ui-sref="events.configuration({eventName: ctrl.event.shortName})"><i class="fa fa-wrench"></i> edit configuration</a>
<a data-ui-sref="events.single.configuration({eventName: ctrl.event.shortName})"><i class="fa fa-wrench"></i> edit configuration</a>
</li>
</ul>
<ul class="nav nav-pills nav-stacked" data-ng-if="ctrl.internal">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<a class="btn btn-primary btn-xs hidden-xs" data-ui-sref="events.single.detail({eventName: event.shortName})">
<i class="fa fa-bar-chart"></i> Detail
</a>
<a class="btn btn-primary btn-xs hidden-xs" data-ui-sref="events.configuration({eventName: event.shortName})">
<a class="btn btn-primary btn-xs hidden-xs" data-ui-sref="events.single.configuration({eventName: event.shortName})">
<i class="fa fa-wrench"></i> Settings
</a>
<a class="btn btn-primary btn-xs" data-ng-if="!event.expired" data-ui-sref="events.single.checkIn({eventName: event.shortName})">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
controller: 'EventConfigurationController',
controllerAs: 'eventConf'
})
.state('events.configuration', {
url: '/:eventName/configuration',
.state('events.single.configuration', {
url: '/configuration',
templateUrl: '/resources/angular-templates/admin/partials/configuration/event.html',
controller: 'EventConfigurationController',
controllerAs: 'eventConf'
Expand Down

0 comments on commit 9930d24

Please sign in to comment.