Skip to content

Instantly share code, notes, and snippets.

@pke
Created January 26, 2012 09:46
Show Gist options
  • Save pke/1681999 to your computer and use it in GitHub Desktop.
Save pke/1681999 to your computer and use it in GitHub Desktop.
slim example
-@title = 'License Slots'
.block
.secondary-navigation
ul.wat-cf
li.first==link_to pat(:list), url(:licenses, :index)
li==link_to pat(:new), url(:licenses, :new)
li==link_to pat(:edit), url(:licenses, :edit, :id => @license.id)
li.active==link_to pat(:slots), url(:licenses, :slots, :id => @license.id)
.content
.secondary-navigation
ul.wat-cf
- @categories.each do |c|
li==link_to c.name, url(:licenses, :slots, :id => @license.id, :category => c.id), :class => c.id == params[:category] ? 'active' : ''
.inner
==form_for :license, url(:licenses, :slots, :id => @license.id), :method => :put, :class => :form do |f|
- if @slots[:none]
table
tr
th=pat(:name)
th=pat(:user)
th=pat(:expires)
-@slots.delete(:none).each do |s|
==partial "licenses/slot", :locals => { :f => f, :s => s }
- @slots.each_key do |k|
fieldset
legend=k
table
tr
th=pat(:name)
th=pat(:user)
th=pat(:expires)
-@slots[k].each do |s|
==partial "licenses/slot", :locals => { :f => f, :s => s }
==f.submit pat(:save)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment