media3-0/apki.org

View on GitHub
app/views/school/educator_news.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title, " - Nowy news szkoły" %>

<h3>News</h3>
<%= simple_form_for @news,
                    url: url_for(action: 'educator_news', controller: 'school'),
                    method: :post do |f| %>
    <%- if @news_id -%>
    <%= f.input :id, as: :hidden, :input_html => { :value => @news_id } -%>
    <%- end -%>
    <%= f.input :title, label: 'Tytuł:' %>
    <%= f.input :image, label: 'Url obrazka:', as: :image_preview, input_html: {preview_version: :thumb} -%>
    <%= f.input :content, label: 'Treść:', as: :pagedown, input_html: { preview: true, rows: 20 } %>
    <%= f.button :submit, value: 'Zatwierdź' %>
<% end %>