-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add styling to the new, edit and form event view
- Loading branch information
1 parent
bfb0c0a
commit 346af81
Showing
8 changed files
with
62 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<%= simple_form_for(@event) do |f| %> | ||
<%= f.error_notification %> | ||
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> | ||
|
||
<div class="form-inputs"> | ||
<%= f.input :title, label: "Event name:", input_html: { class: " textarea "}, wrapper: false, label_html: { class: "label" }, placeholder: "Event name", autofocus: true %> | ||
<%= f.input :description, label: "Description:", input_html: { class: "textarea "}, wrapper: false, label_html: { class: "label" }, placeholder: "Describe your event", autofocus: true %> | ||
<%= f.input :location, label: "Location:", input_html: { class: " textarea "}, wrapper: false, label_html: { class: "label" } %> | ||
<%= f.input :date, label: "date", input_html: { class: "datetime_select "}, wrapper: false, label_html: {class: "label"}, placeholder: "Where is it going to be?" %> | ||
<%= f.error_notification %> | ||
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> | ||
<%= f.input :title, label: "Event Title:", input_html: { class: "textarea" }, label_html: { class: 'new-form-label' }, wrapper: false %> | ||
<br> | ||
<%= f.input :description, label: "Description:", input_html: { class: "textarea new-form-description" }, label_html: { class: 'new-form-label' }, wrapper: false, placeholder: "Describe your event" %> | ||
<br> | ||
<%= f.input :location, label: "Location:", input_html: { class: " textarea" }, label_html: { class: 'new-form-label' }, wrapper: false, placeholder: "Where is it going to be?" %> | ||
<br> | ||
|
||
<div class="is-flex is-align-content-center mt-5"> | ||
<%= f.input :date, label: "Date:", input_html: { class: "date button is-flex is-align-content-center mx-1 is-primary is-outlined" }, wrapper: false, label_html: { class: 'new-form-label date-label' } %> | ||
</div> | ||
|
||
<div class="form-actions"> | ||
<%= f.button :submit %> | ||
</div> | ||
<% end %> | ||
|
||
<p class="mt-5 pt-3 is-flex"> | ||
<%= f.button :submit, class: 'button is-primary' %> | ||
</p> | ||
<br> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<h1>Editing Event</h1> | ||
|
||
<%= render 'form', event: @event %> | ||
<%= link_to 'Show', @event %> | ||
<%= link_to 'Back', events_path %> | ||
<div class="columns mt-5"> | ||
<div class="column is-10 is-offset-1"> | ||
<h1 class="title">Editing Event</h1> | ||
<%= render 'form', event: @event %> | ||
<div class="mt-6"> | ||
<%= link_to 'Back to Events', @event, class: "button is-info is-outlined" %> | ||
<%= link_to 'Go to Homepage', events_path, class: "button ml-2 is-link is-outlined" %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<h1 class="title">Create a new Event</h1> | ||
<%= render 'form', event: @event %> | ||
|
||
<p class="control"> | ||
<%= link_to 'Cancel', events_path, class: "button is-dark" %> | ||
</p> | ||
<div class="columns mt-5"> | ||
<div class="column is-10 is-offset-1"> | ||
<h1 class="title">Create a new Event</h1> | ||
<%= render 'form', event: @event %> | ||
<div class="mt-6"> | ||
<%= link_to 'Cancel', events_path, class: "button is-dark is-outlined mt-6" %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters