forked from OpenMissouri/OpenMissouri
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
102 additions
and
41 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
class Page < ActiveRecord::Base | ||
|
||
|
||
def to_param | ||
"#{id}-#{title.gsub(/[^a-z0-9]+/i, '-').downcase}" | ||
end | ||
|
||
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div id="sidebar_content"> | ||
<ul> | ||
|
||
<% unless @page_links.blank? %> | ||
<% @page_links.each do |page| %> | ||
<li><%= link_to page.title, page_path(page.section, page) %></li> | ||
|
||
<% end %> | ||
<% end %> | ||
</ul> | ||
</div> |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
<% title 'Listing pages' %> | ||
<h1><%= @page.title %></h1> | ||
|
||
<% unless @pages.blank? %> | ||
<%= table_for(@pages) %> | ||
<%= will_paginate(@pages) %> | ||
<% else %> | ||
<p>Now it's time to create some data here. To create new entry, please use the button below.</p> | ||
<br /><br /> | ||
<% end %> | ||
|
||
<br /> | ||
|
||
<p> | ||
<%= link_to 'New Page', new_page_path, :class => 'button' %> | ||
</p> | ||
<div id="sidebar"> | ||
<%= render :partial => "sidebar"%> | ||
</div> | ||
|
||
<div id="content" class="clearfix"> | ||
<%= raw @page.body %> | ||
</div> |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
<p id="notice"><%= notice %></p> | ||
<h1><%= @page.title %></h1> | ||
|
||
<div id="sidebar"> | ||
<%= render :partial => "sidebar"%> | ||
</div> | ||
|
||
<div id="content" class="clearfix"> | ||
<%= raw @page.body %> | ||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<%= link_to 'Edit', edit_page_path(@page) %> | | ||
<%= link_to 'Back', pages_path %> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddPagesLinkName < ActiveRecord::Migration | ||
def self.up | ||
add_column :pages, :link_name, :string | ||
remove_column :pages, :body_html | ||
end | ||
|
||
def self.down | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddPagesLinkPublished < ActiveRecord::Migration | ||
def self.up | ||
add_column :pages, :published, :boolean, :default => true | ||
end | ||
|
||
def self.down | ||
remove_column :pages, :published | ||
end | ||
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