adding a simple form helper and some styles for will_paginate

Oleg committed Nov 10, 2010
commit e57a83dba230fc5fa039fc4447160e2a7555f567
Showing 2 changed files with 37 additions and 1 deletions
comfortable_mexican_sofa/form_builder.rb b/lib/comfortable_mexican_sofa/form_builder.rb +10 -0
@@ @@ -24,6 +24,16 @@ class ComfortableMexicanSofa::FormBuilder < ActionView::Helpers::FormBuilder
).html_safe
end
+ def simple_field(label = nil, content = nil, &block)
+ content ||= @template.capture(&block) if block_given?
+ %(
+ <div class='form_element'>
+ <div class='label'>#{label}</div>
+ <div class='value'>#{content}</div>
+ </div>
+ ).html_safe
+ end
+
def label_for(field, options)
label = options.delete(:label) || field.to_s.titleize.capitalize_all
"<label for=\"#{object_name}_#{field}\">#{label}</label>".html_safe
public/stylesheets/comfortable_mexican_sofa/structure.css +27 -1
@@ @@ -199,6 +199,13 @@ ul.list li .item:hover .action_links,
table.formatted tr:hover td.action_links a {
opacity: 1;
}
+ table.formatted th {
+ background: url(/images/comfortable_mexican_sofa/body_bg.jpg);
+ color: #ececec;
+ text-transform: uppercase;
+ font-size: 10px;
+ letter-spacing: 1px;
+ }
table.formatted th,
table.formatted td {
white-space: nowrap;
@@ @@ -210,4 +217,23 @@ table.formatted th.main,
table.formatted td.main {
width: 100%;
white-space: normal;
- }
\ No newline at end of file
+ }
+ .pagination {
+ margin: 10px 0px;
+ }
+ .pagination span,
+ .pagination em,
+ .pagination a {
+ padding: 2px 5px;
+ margin-right: 2px;
+ background-color: #fff;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ }
+ .pagination span {
+ color: #ececec;
+ }
+ .pagination em {
+ background-color: #1C1F22;
+ color: #fff;
+ }