Show More
Commit Description:
add model solution
Commit Description:
add model solution
References:
File last commit:
Show/Diff file:
Action:
app/views/announcements/edit.html.haml
| 45 lines
| 1.4 KiB
| text/x-haml
| HamlLexer
|
r804 | %h1 Edit Announcement | |||
-content_for(:form_buttons) do | ||||
= link_to t(:back), announcements_path, class: 'card-link btn btn-secondary' | ||||
= render 'form' | ||||
-# old style | ||||
.container-fluid | ||||
%h1 Editing announcement | ||||
= error_messages_for :announcement | ||||
.row | ||||
.col-md-6 | ||||
= form_for(@announcement) do |f| | ||||
.form-group | ||||
%label Title | ||||
= f.text_field :title, class: 'form-control' | ||||
.form-group | ||||
%label Notes | ||||
(shown internally, used to organize announcements) | ||||
= f.text_field :notes, class: 'form-control' | ||||
.form-group | ||||
%label Body | ||||
= f.text_area :body, class: 'form-control', style: 'height: 200px;' | ||||
.form-group | ||||
%label Author | ||||
= f.text_field :author, class: 'form-control' | ||||
.checkbox | ||||
%label | ||||
= f.check_box :published | ||||
Published | ||||
.checkbox | ||||
%label | ||||
= f.check_box :frontpage | ||||
Show on front page? | ||||
.checkbox | ||||
%label | ||||
= f.check_box :on_nav_bar | ||||
Show on top menu bar? | ||||
.checkbox | ||||
%label | ||||
= f.check_box :contest_only | ||||
Show only in contest? | ||||
= f.submit "Update", class: 'btn btn-primary' | ||||
= link_to 'Show', @announcement, class: 'btn btn-default' | ||||
= link_to 'Back', announcements_path, class: 'btn btn-default' | ||||