Skip to content
Browse files

Admin form designs

  • Loading branch information...
1 parent 501b49c commit 4ee9e9c9816d6b4e947d734a3ac85bef229adf20 faithfulgeek committed
Showing with 47 additions and 21 deletions.
  1. +34 −15 app/views/posts/_form.html.haml
  2. +6 −5 app/views/posts/_post.html.haml
  3. +7 −1 public/stylesheets/admin.css
View
49 app/views/posts/_form.html.haml
@@ -1,17 +1,36 @@
= error_messages_for :post
-- form_for(@post) do |f|
- %p
- = title_label
- = f.text_field :title
- %p
- = body_label
- ~ f.text_area :body
- %p
- = tags_label
- = f.text_field :tag_list
- %p
- = is_published_label
- = f.check_box :is_published
- %p
- = f.submit "Submit"
+#new-post-form
+ - form_for(@post) do |f|
+ %p
+ = label :post_type, "Type:"
+ = select :post, :post_type, [["Event", "event"], ["Post", "post"]]
+ %p
+ = label :title, "Title:"
+ = f.text_field :title, :class => :textbox_body
+ %p
+ = label :body, "Body:"
+ ~ f.text_area :body, :class => :textbox_body
+ %p
+ = label :tags, "Tags:"
+ = f.text_field :tag_list, :class => :textbox_body
+ %p
+ = label :presenter, "Presenter:"
+ ~ f.text_field :presenter, :class => :textbox_body
+ %p
+ = label :location_id, "Location:"
+ = select :post, :location_id, locations_for_select_list
+ %p
+ = label :start_time, "Start date/time:"
+ = f.text_field :start_time, :class => :textbox_body
+ %p
+ = label :end_time, "End date/time:"
+ = f.text_field :end_time, :class => :textbox_body
+ %p
+ = f.check_box :is_published
+ = label :post, :is_published, "Published?", :class => "boolean"
+ %p
+ = f.check_box :sticky
+ = label :post, :sticky, "Sticky?", :class => "boolean"
+ %p
+ = f.submit "Submit"
View
11 app/views/posts/_post.html.haml
@@ -1,13 +1,14 @@
.post
%strong.chicklet
- = event.type || "Post"
+ = event.post_type || "Post"
%p.info
%h1= event.title
- - if event.type == "Event"
+ - if event.post_type == "event"
.event-meta
- .presenting
- %em Presenting
- = event.presenter
+ - unless event.presenter.empty?
+ .presenting
+ %em Presenting
+ = event.presenter
.date
%em
= event.start_time.to_s :long_ordinal_12hour
View
8 public/stylesheets/admin.css
@@ -21,7 +21,7 @@ div#navigation
div#page-content { margin-left: 100px; }
/*********** Layout ***********/
-h1 { font-size: 2.25em; font-weight: bold; font-family: Helvetica; }
+h1 { font-size: 2.25em; font-weight: bold; font-family: Helvetica; padding: 25px; }
/*********** Admin Experience ***********/
div.login { margin: 100px auto; border: solid 5px #666; background-color: #ddd; width: 400px; padding: 80px 10px; }
@@ -49,3 +49,9 @@ ol#article-listing div.tools { float: left; padding-top: 4px; margin-right: 10px
#creation-tools a.add-new-event { background-image: url(/images/add_new_event.png); height: 33px; width: 204px; margin-bottom: 35px; }
#creation-tools a.add-new-location { background-image: url(/images/add_new_location.png); height: 33px; width: 204px; }
+#new-post-form p { padding: 15px; }
+#new-post-form p label { display: block; font-size: 16px; font-family: sans-serif; font-weight: bold; }
+#new-post-form p label.boolean { display: inline; font-weight: normal; }
+#new-post-form p .textbox_body { border-color:#848484 #DBDBDB #DBDBDB #848484; border-style: solid; border-width: 1px; padding: 3px; font-size: 24px; }
+#new-post-form p .textbox_body:hover, #new-post-form p .textbox_body:focus { background-color: #FFFFCC }
+#new-post-form p textarea.textbox_body { width: 484px; height: 200px }

0 comments on commit 4ee9e9c

Please sign in to comment.
Something went wrong with that request. Please try again.