Sha256: 3c4e983d4d38f26a71c859a5c6dea69c43046b736a15bbcc8e0784f74f9f5d5d

Contents?: true

Size: 961 Bytes

Versions: 5

Compression:

Stored size: 961 Bytes

Contents

<%= render 'shared/form/error_messages', resource: f.object %>

<%= f.hidden_field :id %>

<% f.object.resource ||= Asset.new %>

<% @candidature_states ||= {} %>
<% @candidature_states[f.object.state] ||= 0 %>
<% @candidature_states[f.object.state] += 1 %>

<% if @candidature_states[f.object.state] == 1 %>
  <p>
    <h5><%= I18n.t("general.#{f.object.state}") %></h5>
  </p>
<% end%>

<% if f.object.state == 'new' %>
  <%= f.simple_fields_for :resource do |resource_form| %>
    <%= render_product_specific_partial_if_available(
      resource_form.object, 'products/types/classified_advertisement/workflow/tasks/resource_fields', f: resource_form
    ) %>
  <% end %>
<% else %>
  <hr/>
  <p>
    <strong><%= I18n.t('activerecord.attributes.general.name') %></strong> <%= f.object.resource.name %> <br/>
    <br/>
    <strong><%= I18n.t('activerecord.attributes.general.text') %></strong><br/>
    <br/>
    <%= f.object.resource.text %> 
  </p>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
voluntary_classified_advertisement-0.3.1 app/views/products/types/classified_advertisement/workflow/tasks/_candidature_fields.html.erb
voluntary_classified_advertisement-0.3.0 app/views/products/types/classified_advertisement/workflow/tasks/_candidature_fields.html.erb
voluntary_classified_advertisement-0.2.0 app/views/products/types/classified_advertisement/workflow/tasks/_candidature_fields.html.erb
voluntary_classified_advertisement-0.1.0 app/views/products/types/classified_advertisement/workflow/tasks/_candidature_fields.html.erb
voluntary_classified_advertisement-0.0.1 app/views/products/types/classified_advertisement/workflow/tasks/_candidature_fields.html.erb