Sha256: 9a6e2aa72f8f587028a0d1d817a5fa536fa021086fdeedd01c52eb006f80d8e4

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

<%= form_for resource, as: :post, validate: true do |f| %>
<%= transit_toolbar(resource) do %>
	<ol>
		<% unless resource.new_record %>
		<li class="menu">
			<span class='ui-icon ui-icon-circle-plus'></span>
			Add a New Item
			<ol class="ui-state-hover">
				<% Transit.contexts.map(&:to_s).each do |type| %>
				<li class="icon_<%= type.underscore %>">
					<%= link_to type, new_polymorphic_path([resource, Transit::Context], type: type, form_name: 'post'), :remote => true %>
				</li>
				<% end %>
			</ol>
		</li>
		<% end %>
		<li class="multifield post_date menu" id="datepicker_target">
			<span class='ui-icon ui-icon-calendar'></span>
			Post Date
			<span id="post_date_selects"><%= f.date_select :post_date, { order: [:month, :day, :year], use_short_month: true } %></span>
		</li>
		<% unless resource.new_record? %>
		<li>
			<%= f.check_box :published, class: 'toggle_button', data: { 'ui-icon' => 'ui-icon-star' } %>
			<%= f.label :published %>
		</li>		
		<li>
			<%= toolbar_button('Delete This Post', polymorphic_path(resource), method: :delete, class: 'ui-icon-red', icon: 'closethick') %>
		</li>
		<% end %>
	</ol>
	<%= f.hidden_field(:user, value: current_user.id) if resource.delivers?(:owner) %>	
<% end %>

<div id="post">
	<%= render partial: 'transit/posts/fields/title', locals: { form: f } %>
	<%= render template: 'transit/contexts/index', locals: { form: f } %>
</div>
<div id='edit_post_sidebar'>
	<% if resource.delivers?(:topics) %>
	<%= render(partial: 'transit/topics/model', locals: { form: f }) %>
	<% end %>
	<% if resource.delivers?(:assets) %>
	<%= render(partial: 'transit/assets/model', locals: { form: f }) %>
	<% end %>

<%= f.button %>
<% end %>
<%= text_field_tag :datepicker_holder, resource.post_date.strftime('%Y-%m-%d'), rel: 'post_post_date', data: { 'calendar-link' => "#post_date_menu" } %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transit-0.0.2 app/views/transit/posts/_form.html.erb