Hi,

I have a list of things in my application (let it be list with something
to borrow).
I wanted to change in css and view something.

I wanted to see row with has one field empty (let us say it will be
given back date) in different color(red or something)

Fragement of my view ...

<% for list in @lists -%>
<tr class="<%= 'list-line-even' -%>" >
<td><%=h list.id -%>)</td>
<td><%=h list.title %></td>
<td><%=h list.body %></td>
<td><%=h list.char %></td>
<td><%=h list.sim %></td>
<td><%=h list.oth %></td>
<td><%=h list.wyp %></td>
<td><%=h list.od %></td>
<td><%=h list.comm %></td>
<% end %>

and CSS

.list-line-even {
              background: #f8b0f8 ;
}

that changing color of my list view perfectly i wonder how to add this
feature

if some empty field is in row class is being changed do different..

I thought about :

<% for list in @lists -%>
<tr class="<%= 'list-line-even1' -%>" >
<% if list.od = ''-%>    <tr class="<%= 'list-line-even' -%>" >

<td><%=h list.id -%>)</td>
<td><%=h list.title %></td>
<td><%=h list.body %></td>
<td><%=h list.char %></td>
<td><%=h list.sim %></td>
<td><%=h list.oth %></td>
<td><%=h list.wyp %></td>
<td><%=h list.od %></td>
<td><%=h list.comm %></td>
<% end %>

and CSS

.list-line-even1 {
              background: #f8b0f8 ;
}


.list-line-even {
              background: #fff ;
}

that changig color of my list view perfectly i wonder how to add this
feature

if some empty field is in row class is being changed do different..

Regards
beny18241
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to