Permalink
Browse files

mock out schema page

  • Loading branch information...
themattharris committed Apr 22, 2012
1 parent 34beaf7 commit f384eeaee8a109732eb93617496fc6e8ebab9340
Showing with 16 additions and 0 deletions.
  1. +2 −0 app/controllers/data_sources_controller.rb
  2. +12 −0 app/views/data_sources/show.html.erb
  3. +2 −0 config/routes.rb
@@ -6,6 +6,8 @@ def show
@categories = @data_source.categories
@curators = @data_source.curators
+ @datasets = DataSource.find_all_by_parent_id(@data_source.remote_id)
+
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @data_source }
@@ -4,6 +4,18 @@
<p><a class="btn btn-primary btn-large" href="<%= @data_source.more_info_link %>">Learn more &raquo;</a></p>
</div>
+ <% if !@datasets.nil? %>
+ <h2>Datasets</h2>
+ <% @datasets.each do |set| %>
+ <div class="hero-unit">
+ <h3><%= link_to set.title, set.more_info_link %></h3>
+ <p><%= h set.content %></p>
+ <p><a class="btn btn-primary" href="<%= set.url %>">View Dataset</a>
+ <a class="btn" href="/schema/1">View Schema</a></p>
+ </div>
+ <% end %>
+ <% end %>
+
<div class="row">
<%= render(:partial => '/tags/teaser') if @tags.count > 0 %>
<%= render(:partial => '/categories/teaser') if @categories.count > 0 %>
View
@@ -9,6 +9,8 @@
map.curators 'curator', :controller => 'curators', :action => 'index'
map.curator 'curator/:id', :controller => 'curators', :action => 'index'
+ map.schema 'schema/:id', :controller => 'schemas', :action => 'show'
+
map.data_source 'source/:id', :controller => 'data_sources', :action => 'show'
# Install the default routes as the lowest priority.

0 comments on commit f384eea

Please sign in to comment.