silverstripe-cms/templates/WidgetAreaEditor.ss
Sean Harvey d02f174f42 BUGFIX When adding a new widget by clicking one of the available widgets, add it to the top of the currently used widgets instead of the bottom
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@97522 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:52:26 +13:00

33 lines
1.1 KiB
Scheme

<div class="WidgetAreaEditor" id="WidgetAreaEditor-$Name" name="$Name"<% if MaxWidgets %> maxwidgets="$MaxWidgets"<% end_if %>>
<input type="hidden" id="$Name" name="$IdxField" value="$Value" />
<div class="availableWidgetsHolder">
<h2><% _t('AVAILABLE', 'Available Widgets') %></h2>
<p>&nbsp;</p>
<div class="availableWidgets" id="availableWidgets-$Name">
<% if AvailableWidgets %>
<% control AvailableWidgets %>
$DescriptionSegment
<% end_control %>
<% else %>
<div class="NoWidgets" id="NoWidgets-$Name">
<p><% _t('NOAVAIL', 'There are currently no widgets available.') %></p>
</div>
<% end_if %>
</div>
</div>
<div class="usedWidgetsHolder">
<h2><% _t('INUSE', 'Widgets currently used') %></h2>
<p><% _t('TOADD', 'To add widgets, click one on the left to add it here') %></p>
<div class="usedWidgets" id="usedWidgets-$Name">
<div id="usedWidgetsStart-$Name"><!-- --></div>
<% if UsedWidgets %>
<% control UsedWidgets %>
$EditableSegment
<% end_control %>
<% else %>
<div class="NoWidgets" id="NoWidgets-$Name"></div>
<% end_if %>
</div>
</div>
</div>