This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HarleyHealthVip::Application.routes.draw do | |
resources :faqs | |
resources :notices, :only => [:index, :show] | |
# events routes | |
get 'events' => 'events#index', :as => 'events' | |
get 'events/:id' => 'events#show', :as => 'event' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- for section in @sections | |
.contact-section | |
- if section.present? | |
- section.each do |user| | |
.contact-card | |
.photo | |
= image_tag user.avatar | |
.contact-details | |
%h3= "#{user.title} #{user.full_name}" | |
.contact-email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StaticPagesController < ApplicationController | |
def info | |
@favorite_links = Link.where(:favourite => true) | |
@links = Link.where(:favourite => false) | |
render 'info' | |
end | |
def contact | |
if request.subdomain.present? | |
@section = User.where(:role_ids == Role.find_by_name(request.subdomain).id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.inner | |
.alert-message.warning | |
Your account has now been activated! Be sure to set your password below. | |
= simple_form_for [:admin, @user] do |f| | |
%fieldset | |
.clearfix | |
.input | |
= f.input :email | |
.clearfix | |
.input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#controller | |
def activate | |
if @user = User.load_from_activation_token(params[:activation_token]) | |
@user.inactive = true | |
@user.activate! | |
login(@user.email, @user.password) | |
else | |
redirect_to login_path, :alert => 'Account has been activated already, please login' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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_resource_path, :class => 'btn large primary' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def new | |
@editable_area = EditableArea.new | |
if EditableArea.all.last.present? | |
@editable_area.text = EditableArea.all.last.text | |
end | |
@editable_areas = EditableArea.order('created_at desc').limit(15) | |
new! | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def markdown(text) | |
options = [:hard_wrap, :filter_html, :autolink] | |
Redcarpet.new(text, *options).to_html.html_safe | |
end | |
# Use within views to set the page's HTML title | |
def title(title = nil) | |
default = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.block | |
.content | |
%h2 All Editor Accounts | |
.inner | |
.actions-bar.wat-cf | |
= paginate @users | |
%table.table | |
%thead | |
%tr | |
%th Email |