Making user certs collapsible, adding a recompilation script

This commit is contained in:
Will Bradley 2013-01-25 20:31:23 -07:00
parent c547af5391
commit 7193ec832c
4 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
jQuery ->
$('.collapsible dt').click ->
$(this).parent().toggleClass('expanded')

View File

@ -1,3 +1,10 @@
// Place all the styles related to the UserCertifications controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.collapsible dt { cursor: pointer; }
.collapsible dt:before { content: '\229e'; }
.collapsible dd { display: none; }
.expanded dt:before { content: '\229f'; }
.expanded dd { display: block; }

View File

@ -2,14 +2,14 @@
<%= link_to 'New User Certification', new_user_certification_path %>
<dl>
<% @grouped_user_certs.sort.each do |cert, user_certifications| %>
<dl class="collapsible">
<dt><%= cert.name %></dt>
<% user_certifications.sort{|a,b| a.user.name <=> b.user.name}.each do |user_certification| %>
<dd>
<%= link_to user_certification.user.name, user_certification %>
</dd>
<% end %>
</dl>
<% end %>
</dl>

4
recompile_assets.sh Executable file
View File

@ -0,0 +1,4 @@
sudo rake assets:clean RAILS_ENV=production
sudo rake assets:precompile RAILS_ENV=production
sudo touch tmp/restart.txt