Skip to content

Instantly share code, notes, and snippets.

@JoeWoodward
Created December 13, 2011 22:15
Show Gist options
  • Save JoeWoodward/1474152 to your computer and use it in GitHub Desktop.
Save JoeWoodward/1474152 to your computer and use it in GitHub Desktop.
.page-header
%h1 Website Introduction
.row
- unless collection
.span12
%p
You have not created any text for this section yet, please click
initialise to add text.
.well
= link_to 'Initialise', new_admin_site_intro_path, :class => 'btn large primary'
- else
.span5
%h2 History
= form_tag admin_site_intro_compare_path, :method => :get do
%ul.unstyled
%li.current
- latest = collection.last
= check_box_tag "id[]", latest.id, false
= time_ago_in_words(latest.created_at)
%span.label.notice
= latest.created_by
- @editable_areas.each do |s|
%li
= check_box_tag "id[]", s.id, false
= link_to time_ago_in_words(s.created_at) + " ago", admin_site_intro_path(s)
%span.label.notice
= s.created_by
.alert-message.block-message.info.span4
%p
To compare differences between versions, select
%strong
two
from the list and click 'Compare'.
.alert-actions
= submit_tag 'Compare', class: 'btn'
.span11
%h2 Current Version
%br
%p
= @editable_area.text
%br
.well
= link_to 'Edit', new_admin_site_intro_path, :class => 'btn primary'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment