silverstripe-cms/templates/forms/SiteTreeURLSegmentField.ss
Ingo Schommer 00097a5d5d NEW Clickable URL preview in CMS
- Refactored SiteTreeURLSegmentField to render controls in template
rather than JS for better clientside performance, and cleaner behaviour.
- Added dynamic ellipsis to start of URL, to retain most relevant
part of the URL (the last bits)
- Added "suffix" setting to field, which defaults to ?stage=Stage
- Removed prefix from edit view to leave more room for URL

Thanks to @sunnysideup for getting this started in
https://github.com/silverstripe/silverstripe-cms/pull/269
2013-02-04 12:12:28 +01:00

18 lines
542 B
Scheme

<div class="preview-holder">
<a class="preview" href="$URL" target="_blank">
$URL
</a>
<button class="ss-ui-button ss-ui-button-small edit">
<% _t('URLSegmentField.Edit', 'Edit') %>
</button>
</div>
<div class="edit-holder">
<input $AttributesHTML />
<button class="update ss-ui-button-small">
<% _t('URLSegmentField.OK', 'OK') %>
</button>
<button class="cancel ss-ui-button-small ss-ui-action-minor">
<% _t('URLSegmentField.Cancel', 'Cancel') %>
</button>
<% if HelpText %><p class="help">$HelpText</p><% end_if %>
</div>