2011-11-21 01:27:05 +00:00
|
|
|
%script{ :type => 'text/html', :id => 'editable_elements_edit' }
|
|
|
|
|
|
|
|
.nav
|
|
|
|
{{#each blocks}}
|
|
|
|
= link_to '{{name}}', '#block-{{index}}', :class => '{{#unless index}}on{{/unless}}'
|
|
|
|
{{/each}}
|
|
|
|
.clear
|
|
|
|
|
|
|
|
.wrapper
|
|
|
|
%ul
|
|
|
|
{{#each blocks}}
|
|
|
|
%li{ :id => 'block-{{index}}', :class => 'block', :style => 'display: {{#if index}}none{{else}}block{{/if}}' }
|
|
|
|
%fieldset.inputs
|
|
|
|
%ol
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
%script{ :type => 'text/html', :id => 'editable_text_input' }
|
|
|
|
|
|
|
|
%label{ :for => 'page_editable_elements_attributes_{{index}}_content' } {{label}}
|
|
|
|
|
|
|
|
= text_area_tag 'page[editable_elements_attributes][{{index}}][content]', '{{content}}', :id => 'page_editable_elements_attributes_{{index}}_content'
|
|
|
|
|
|
|
|
{{#if hint}}
|
|
|
|
%p.inline-hints {{hint}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
= hidden_field_tag 'page[editable_elements_attributes][{{index}}][id]', '{{id}}', :id => 'page_editable_elements_attributes_{{index}}_id'
|
|
|
|
|
|
|
|
%script{ :type => 'text/html', :id => 'editable_file_input' }
|
|
|
|
|
|
|
|
%label{ :for => 'page_editable_elements_attributes_{{index}}_content' } {{label}}
|
|
|
|
|
2011-11-21 11:12:06 +00:00
|
|
|
%span.file
|
|
|
|
{{#if content}}
|
|
|
|
= link_to '{{filename}}', '{{content}}', :target => '_blank'
|
|
|
|
|
|
|
|
= file_field_tag 'page[editable_elements_attributes][{{index}}][source]', :id => 'page_editable_elements_attributes_{{index}}_source', :style => 'display: none'
|
|
|
|
|
|
|
|
= link_to t('locomotive.pages.form.change_file'), '#', :class => 'change', :'data-alt-label' => t('locomotive.pages.form.cancel')
|
|
|
|
= link_to t('locomotive.pages.form.delete_file'), '#', :class => 'delete', :'data-alt-label' => t('locomotive.pages.form.cancel')
|
|
|
|
|
|
|
|
= hidden_field_tag 'page[editable_elements_attributes][{{index}}][remove_source]', '0', :class => 'remove-flag'
|
|
|
|
|
|
|
|
{{else}}
|
|
|
|
= file_field_tag 'page[editable_elements_attributes][{{index}}][source]', :id => 'page_editable_elements_attributes_{{index}}_source'
|
|
|
|
{{/if}}
|
2011-11-21 01:27:05 +00:00
|
|
|
|
|
|
|
{{#if hint}}
|
|
|
|
%p.inline-hints {{hint}}
|
|
|
|
{{/if}}
|
|
|
|
|
2012-03-21 23:50:34 +00:00
|
|
|
= hidden_field_tag 'page[editable_elements_attributes][{{index}}][id]', '{{id}}', :id => 'page_editable_elements_attributes_{{index}}_id'
|
|
|
|
|
|
|
|
%script{ :type => 'text/html', :id => 'editable_control_input' }
|
|
|
|
|
|
|
|
%label{ :for => 'page_editable_elements_attributes_{{index}}_content' } {{label}}
|
|
|
|
|
|
|
|
= select_tag 'page[editable_elements_attributes][{{index}}][content]', raw('{{#each options}}<option value="{{this.value}}" {{#if this.selected}}selected="selected"{{/if}}>{{this.text}}</option>{{/each}}'), :id => 'page_editable_elements_attributes_{{index}}_content', :class => 'content'
|
|
|
|
|
|
|
|
{{#if hint}}
|
|
|
|
%p.inline-hints {{hint}}
|
|
|
|
{{/if}}
|
|
|
|
|
2011-11-25 01:04:42 +00:00
|
|
|
= hidden_field_tag 'page[editable_elements_attributes][{{index}}][id]', '{{id}}', :id => 'page_editable_elements_attributes_{{index}}_id'
|