mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #134 from silverstripe-big-o/settings-fixes
Settings fixes
This commit is contained in:
commit
aa0bc8f90b
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class CMSSettingsController extends CMSMain {
|
||||
class CMSSettingsController extends LeftAndMain {
|
||||
|
||||
static $url_segment = 'settings';
|
||||
static $url_rule = '/$Action/$ID/$OtherID';
|
||||
@ -16,9 +16,9 @@ class CMSSettingsController extends CMSMain {
|
||||
$actions = $siteConfig->getCMSActions();
|
||||
$form = new Form($this, 'EditForm', $fields, $actions);
|
||||
$form->addExtraClass('root-form');
|
||||
$form->addExtraClass('cms-edit-form');
|
||||
// TODO Can't merge $FormAttributes in template at the moment
|
||||
$form->addExtraClass('cms-content center ss-tabset cms-panel-padded');
|
||||
|
||||
$form->addExtraClass('cms-edit-form cms-panel-padded center');
|
||||
|
||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
$form->setHTMLID('Form_EditForm');
|
||||
$form->loadDataFrom($siteConfig);
|
||||
@ -33,6 +33,7 @@ class CMSSettingsController extends CMSMain {
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save the current sites {@link SiteConfig} into the database
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
<% if Pages %>
|
||||
<% control Pages %>
|
||||
<% loop Pages %>
|
||||
<% if Last %>$Title.XML<% else %><a href="$Link">$MenuTitle.XML</a> »<% end_if %>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
@ -9,15 +9,15 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% control Versions %>
|
||||
<% loop Versions %>
|
||||
<tr id="page-$RecordID-version-$Version" class="$EvenOdd $PublishedClass<% if not WasPublished %><% if not Active %> ui-helper-hidden<% end_if %><% end_if %><% if Active %> active<% end_if %>" data-published="<% if WasPublished %>true<% else %>false<% end_if %>">
|
||||
<td class="ui-helper-hidden"><input type="checkbox" name="Versions[]" id="cms-version-{$Version}" value="$Version"<% if Active %> checked="checked"<% end_if %> /></td>
|
||||
<% control LastEdited %>
|
||||
<% with LastEdited %>
|
||||
<td class="last-edited first-column" title="$Ago - $Nice">$Nice</td>
|
||||
<% end_control %>
|
||||
<% end_with %>
|
||||
<td><% if Author %>$Author.FirstName $Author.Surname.Initial<% else %><% _t('UNKNOWN','Unknown') %><% end_if %></td>
|
||||
<td class="last-column"><% if Published %><% if Publisher %>$Publisher.FirstName $Publisher.Surname.Initial<% else %><% _t('UNKNOWN','Unknown') %><% end_if %><% else %><% _t('NOTPUBLISHED','Not published') %><% end_if %></td>
|
||||
</tr>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</tbody>
|
||||
</table>
|
@ -2,27 +2,27 @@
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
<% control EditForm %>
|
||||
<% with EditForm %>
|
||||
<% include BackLink_Button %>
|
||||
|
||||
<h2 id="page-title-heading">
|
||||
<% control Controller %>
|
||||
<% with Controller %>
|
||||
<% include CMSSectionIcon %>
|
||||
<% include CMSBreadcrumbs %>
|
||||
<% end_control %>
|
||||
<% end_with %>
|
||||
</h2>
|
||||
<% if Fields.hasTabset %>
|
||||
<% with Fields.fieldByName('Root') %>
|
||||
<div class="cms-content-header-tabs">
|
||||
<ul>
|
||||
<% control Tabs %>
|
||||
<% loop Tabs %>
|
||||
<li<% if extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
<% end_control %>
|
||||
<% end_with %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,17 +8,17 @@
|
||||
|
||||
<fieldset>
|
||||
<% if Legend %><legend>$Legend</legend><% end_if %>
|
||||
<% control Fields %>
|
||||
<% loop Fields %>
|
||||
$FieldHolder
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
<div class="clear"><!-- --></div>
|
||||
</fieldset>
|
||||
|
||||
<% if Actions %>
|
||||
<div class="Actions">
|
||||
<% control Actions %>
|
||||
<% loop Actions %>
|
||||
$Field
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
<% if CurrentPage.LinkPreview %>
|
||||
<a href="$CurrentPage.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% _t('LeftAndMain.PreviewButton', 'Preview') %> »
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
<fieldset>
|
||||
<% if Legend %><legend>$Legend</legend><% end_if %>
|
||||
<% control Fields %>
|
||||
<% loop Fields %>
|
||||
$FieldHolder
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
<div class="clear"><!-- --></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
@ -19,9 +19,9 @@
|
||||
<div class="cms-content-actions south">
|
||||
<% if Actions %>
|
||||
<div class="Actions">
|
||||
<% control Actions %>
|
||||
<% loop Actions %>
|
||||
$Field
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
<% if Controller.LinkPreview %>
|
||||
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% _t('LeftAndMain.PreviewButton', 'Preview') %> »
|
||||
|
@ -17,18 +17,18 @@
|
||||
|
||||
<fieldset>
|
||||
<% if Legend %><legend>$Legend</legend><% end_if %>
|
||||
<% control Fields %>
|
||||
<% loop Fields %>
|
||||
$FieldHolder
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="cms-content-actions south">
|
||||
<% if Actions %>
|
||||
<div class="Actions">
|
||||
<% control Actions %>
|
||||
<% loop Actions %>
|
||||
$Field
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
@ -1 +1,33 @@
|
||||
$EditForm
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
<% with EditForm %>
|
||||
<h2>
|
||||
<% with Controller %>
|
||||
<% include CMSSectionIcon %>
|
||||
<% include CMSBreadcrumbs %>
|
||||
<% end_with %>
|
||||
</h2>
|
||||
<% if Fields.hasTabset %>
|
||||
<% with Fields.fieldByName('Root') %>
|
||||
<div class="cms-tabset cms-content-header-tabs ss-ui-tabs-nav">
|
||||
<ul>
|
||||
<% loop Tabs %>
|
||||
<li<% if extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
<% end_with %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cms-content-fields center ui-widget-content" data-layout-type="border">
|
||||
|
||||
$EditForm
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
30
templates/Includes/CMSSettingsController_EditForm.ss
Normal file
30
templates/Includes/CMSSettingsController_EditForm.ss
Normal file
@ -0,0 +1,30 @@
|
||||
<form $FormAttributes>
|
||||
|
||||
<% if Message %>
|
||||
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
|
||||
<% else %>
|
||||
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
|
||||
<% end_if %>
|
||||
|
||||
<fieldset>
|
||||
<% if Legend %><legend>$Legend</legend><% end_if %>
|
||||
<% loop Fields %>
|
||||
$FieldHolder
|
||||
<% end_loop %>
|
||||
<div class="clear"><!-- --></div>
|
||||
</fieldset>
|
||||
|
||||
<% if Actions %>
|
||||
<div class="Actions">
|
||||
<% loop Actions %>
|
||||
$Field
|
||||
<% end_loop %>
|
||||
<% if CurrentPage.LinkPreview %>
|
||||
<a href="$CurrentPage.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% _t('LeftAndMain.PreviewButton', 'Preview') %> »
|
||||
</a>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
</form>
|
@ -4,9 +4,9 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<% control UnsuccessfulFiles %>
|
||||
<% loop UnsuccessfulFiles %>
|
||||
<li>$File</li>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<p style="margin: 1em 0">
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
<% control EditForm %>
|
||||
<% with EditForm %>
|
||||
<% include BackLink_Button %>
|
||||
|
||||
<h2 id="page-title-heading">
|
||||
<% control Controller %>
|
||||
<% with Controller %>
|
||||
<% include CMSSectionIcon %>
|
||||
<% include CMSBreadcrumbs %>
|
||||
<% end_control %>
|
||||
<% end_with %>
|
||||
</h2>
|
||||
<% end_control %>
|
||||
<% end_with %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13,11 +13,11 @@
|
||||
<h4><% _t('ReportAdminForm.FILTERBY', 'Filter by') %></h4>
|
||||
|
||||
<div class="filters">
|
||||
<% control FieldMap.Filters %>
|
||||
<% control Children %>
|
||||
<% loop FieldMap.Filters %>
|
||||
<% loop Children %>
|
||||
$FieldHolder
|
||||
<% end_control %>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
|
||||
<div id="action_updatereport">
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
$FieldMap.ReportContent.FieldHolder
|
||||
|
||||
<% control HiddenFields %>$Field<% end_control %>
|
||||
<% loop HiddenFields %>$Field<% end_loop %>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
@ -8,19 +8,19 @@
|
||||
|
||||
<%-- <body onload="window.print();"> --%>
|
||||
<body>
|
||||
<% control Form.Controller %>
|
||||
<% with Form.Controller %>
|
||||
<h1 style="margin-bottom: 0">$CurrentReport.Title</h1>
|
||||
<% control CurrentReport.getCmsFields %>
|
||||
<% with CurrentReport.getCmsFields %>
|
||||
<% if Name == Filters %>
|
||||
<h2 style="margin-bottom: 0; margin-top: 0;">Filters</h2>
|
||||
<ul style="margin-top: 0">
|
||||
<% control FieldSet %>
|
||||
<% loop FieldSet %>
|
||||
<li>$Title = $performReadonlyTransformation.Field</li>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
<% end_if %>
|
||||
<% end_control %>
|
||||
<% end_control %>
|
||||
<% end_with %>
|
||||
<% end_with %>
|
||||
<% include TableListField %>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user