myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2732] branches/elico: Added layout attribute to


From: noreply
Subject: [myexperiment-hackers] [2732] branches/elico: Added layout attribute to contributions
Date: Fri, 21 Oct 2011 06:21:04 -0400 (EDT)

Revision
2732
Author
"finn"
Date
2011-10-21 06:21:04 -0400 (Fri, 21 Oct 2011)

Log Message

Added layout attribute to contributions

Modified Paths

Added Paths

Diff

Modified: branches/elico/app/controllers/application.rb (2731 => 2732)


--- branches/elico/app/controllers/application.rb	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/controllers/application.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -12,7 +12,7 @@
   
   WhiteListHelper.tags.merge %w(table tr td th div span)
   
-  before_filter :set_configuration
+  #before_filter :set_configuration
 
   include AuthenticatedSystem
   before_filter :login_from_cookie
@@ -1160,5 +1160,21 @@
       :summary                 => summary
     }
   end
+
+  #Applies the layout for the Network with the given network_id to the object (contributable)
+  def update_layout(object,network_id)
+    if network_id.blank?
+      object.contribution.layout = nil
+      object.contribution.save
+    else
+      network = Network.find(network_id.to_i)
+      if network && find_permission_for_contributor(object.contribution.policy.permissions, "Network", network_id.to_i)
+        object.contribution.layout = network.layout
+        object.contribution.save
+      else
+        object.errors.add_to_base("You may only choose layouts for groups that this #{object.class.name.downcase} is shared with.")
+      end
+    end
+
+  end
 end
-

Modified: branches/elico/app/controllers/workflows_controller.rb (2731 => 2732)


--- branches/elico/app/controllers/workflows_controller.rb	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/controllers/workflows_controller.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -343,10 +343,12 @@
         end
 
         policy_err_msg = update_policy(@workflow, params)
-    
+
         # Credits and Attributions:
         update_credits(@workflow, params)
         update_attributions(@workflow, params)
+
+        update_layout(@workflow, params[:layout])
         
         # Refresh the types handler list of types if a new type was supplied this time.
         WorkflowTypesHandler.refresh_all_known_types! if params[:workflow][:type] == 'other'
@@ -501,7 +503,7 @@
         end
       end
     end
-    
+
     params[:workflow][:license_id] = nil if params[:workflow][:license_id] && params[:workflow][:license_id] == "0"
 
     respond_to do |format|
@@ -521,6 +523,8 @@
         update_credits(@workflow, params)
         update_attributions(@workflow, params)
 
+        update_layout(@workflow, params[:layout])
+
         if policy_err_msg.blank?
           flash[:notice] = 'Workflow was successfully updated.'
           format.html { redirect_to workflow_url(@workflow) }
@@ -690,6 +694,7 @@
       
       if Authorization.is_authorized?(action_name, nil, workflow, current_user)
         @latest_version_number = workflow.current_version
+
         @workflow = workflow
         if params[:version]
           if (viewing = @workflow.find_version(params[:version]))
@@ -854,6 +859,28 @@
   
 private
 
+
+  #Upon specifying a group to share with, prompts the user whether or not they want to apply the groups'
+  # custom skin
+
+  def check_sharing_with_branded_group(new_groups)
+    @groups_with_custom_layouts = nil
+    new_shared_with_groups = nil
+
+    # check if "shared with" groups has been changed in the update
+    if action == "create" && params[:group_sharing]
+      new_shared_with_groups = params[:group_sharing].keys
+    elsif action == "update" && (@shared_with_groups_pre_update != @workflow.shared_with_networks)
+      new_shared_with_groups = (@workflow.shared_with_networks - @shared_with_groups_pre_update).map { |n| n.ids }
+    end
+
+    if new_shared_with_groups && !params[:workflow][:skin]
+      # check whether an added/removed group had styling options available
+      group_ids = Conf.virtual_hosts.values.map {|v| v['group_id']} & new_shared_with_groups
+      @groups_with_custom_layouts = Network.find(group_ids)
+    end
+  end
+
   def error(notice, message, attr=:id)
     flash[:error] = notice
     (err = Workflow.new.errors).add(attr, message)

Modified: branches/elico/app/helpers/application_helper.rb (2731 => 2732)


--- branches/elico/app/helpers/application_helper.rb	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/helpers/application_helper.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -799,7 +799,7 @@
   def expand_image(margin_left="0.3em")
     image_tag "folds/unfold.png", :style => "margin-left: #{margin_left}; vertical-align: middle;", :alt => 'Expand'
   end
-  
+  
   def user_tags_for_thing(taggable, user_id)
     return [] if taggable.nil? or user_id.nil? 
     
@@ -827,7 +827,7 @@
 
     return tags
   end
-
+
   def highlight_all(text, string)
     rtn = text
     
@@ -1605,4 +1605,18 @@
 
     result
   end
+
+  #Selects layout for contributables/groups or uses site's default
+  def page_layout
+    contributable = (@workflow || @pack || @blog_post || @blob)
+    layout = nil
+
+    if contributable && contributable.contribution
+      layout = contributable.contribution.layout
+    elsif @network
+      layout = @network.layout
+    end
+
+    return layout || Conf.page_template
+  end
 end

Modified: branches/elico/app/models/network.rb (2731 => 2732)


--- branches/elico/app/models/network.rb	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/models/network.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -182,4 +182,15 @@
     # filter out blogs until they've gone completely
     c.select do |x| x.class != Blog end
   end
+
+  #Returns the page_template defined for this network in settings.yml > layouts:
+  def layout
+    Conf.layouts.each do |k,v|
+      if v["network_id"] == id
+        return v["page_template"]
+      end
+    end
+
+    return nil
+  end
 end

Modified: branches/elico/app/models/workflow.rb (2731 => 2732)


--- branches/elico/app/models/workflow.rb	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/models/workflow.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -55,11 +55,15 @@
 
   has_previews
 
+  has_many :workflow_inputs, :dependent => :destroy
+
   explicit_versioning(:version_column => "current_version", 
                       :extra_attributes => ["image", "svg"],
                       :white_list_columns => ["body"]) do
     
     format_attribute :body
+
+    has_many :workflow_features, :dependent => :destroy
     
     belongs_to :content_blob
     belongs_to :content_type

Modified: branches/elico/app/views/contributions/_sharing_form.rhtml (2731 => 2732)


--- branches/elico/app/views/contributions/_sharing_form.rhtml	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/views/contributions/_sharing_form.rhtml	2011-10-21 10:21:04 UTC (rev 2732)
@@ -145,21 +145,29 @@
 		<p><strong>Share with my Groups:</strong></p>
 
 		<div id="group_sharing_box" class="box_editing" style="padding-left: 1em; font-size: 93%;">
-      <% for n in (current_user.networks + current_user.networks_owned) %>
-          <p>
-          	<% perm = find_permission_for_contributor(perms, "Network", n.id) if edit -%>
-						<label for="" n.id %>">
-							<input <%= 'checked' if perm %> style="margin-right: 0.3em;"
-          		value="<%= n.id %>" type="checkbox" name="group_sharing[<%= n.id %>][id]" id="cb_group_sharing_<%= n.id %>" />
-						  <%= h(n.title) %>
-						</label>
-						<select name="group_sharing[<%= n.id %>][level]" style="font-size: 85%; margin: 0 0.5em;">
-							<option value="0" <%= 'selected="selected"' if perm and perm.level == 0 %>>View only</option>
-							<option value="1" <%= 'selected="selected"' if !edit or !perm or (perm and perm.level == 1) %>>View and Download only</option>
-							<option value="2" <%= 'selected="selected"' if perm and perm.level == 2 %>>View, Download and Update</option>
-						</select>
-					</p>
-        <% end %>
+          <% for n in (current_user.networks + current_user.networks_owned) %>
+              <p>
+                <% perm = find_permission_for_contributor(perms, "Network", n.id) if edit -%>
+                <label for="" n.id %>">
+                  <input <%= 'checked' if perm %> style="margin-right: 0.3em;"
+                         value="<%= n.id %>" type="checkbox" name="group_sharing[<%= n.id %>][id]" id="cb_group_sharing_<%= n.id %>"
+                          elem = $('layout_selection_<%= n.id -%>'); elem.disabled = !this.checked; elem.checked = false;"/>
+                  <%= h(n.title) %>
+                </label>
+                <select name="group_sharing[<%= n.id %>][level]" style="font-size: 85%; margin: 0 0.5em;">
+                  <option value="0" <%= 'selected="selected"' if perm and perm.level == 0 %>>View only</option>
+                  <option value="1" <%= 'selected="selected"' if !edit or !perm or (perm and perm.level == 1) %>>View and Download only</option>
+                  <option value="2" <%= 'selected="selected"' if perm and perm.level == 2 %>>View, Download and Update</option>
+                </select>
+                <% if n.layout %>
+                    <input id="layout_selection_<%= n.id %>" title="Use <%= h(n.title) -%>'s layout" class="layout_selection" type="checkbox" name="layout" value="<%= n.id -%>"
+                           <%= 'checked="checked"' if edit && contributable.contribution.layout == n.layout %>
+                            (box) { if(box.id != 'layout_selection_<%= n.id %>') box.checked = false;})"
+                           <%= 'disabled="disabled"' unless perm -%>/>
+                    Use <%= h(n.title) -%>'s layout
+                <% end %>
+              </p>
+          <% end %>
 		</div>
   </div>
 </div>

Modified: branches/elico/app/views/layouts/application.rhtml (2731 => 2732)


--- branches/elico/app/views/layouts/application.rhtml	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/app/views/layouts/application.rhtml	2011-10-21 10:21:04 UTC (rev 2732)
@@ -1 +1 @@
-<%= render :partial => Conf.page_template %>
+<%= render :partial => page_layout %>

Modified: branches/elico/config/base_schema.xml (2731 => 2732)


--- branches/elico/config/base_schema.xml	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/config/base_schema.xml	2011-10-21 10:21:04 UTC (rev 2732)
@@ -19,6 +19,7 @@
     <column type="string"   name="label"/>
     <column type="integer"  name="content_type_id"/>
     <column type="integer"  name="license_id"/>
+    <column type="string"   name="layout"/>
 
     <index>
       <column name="contributable_id"/>

Added: branches/elico/db/schema.rb (0 => 2732)


--- branches/elico/db/schema.rb	                        (rev 0)
+++ branches/elico/db/schema.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -0,0 +1,803 @@
+# This file is autogenerated. Instead of editing this file, please use the
+# migrations feature of ActiveRecord to incrementally modify your database, and
+# then regenerate this schema definition.
+
+ActiveRecord::Schema.define(:version => 92) do
+
+  create_table "activity_limits", :force => true do |t|
+    t.column "contributor_type", :string,   :null => false
+    t.column "contributor_id",   :integer,  :null => false
+    t.column "limit_feature",    :string,   :null => false
+    t.column "limit_max",        :integer
+    t.column "limit_frequency",  :integer
+    t.column "current_count",    :integer,  :null => false
+    t.column "reset_after",      :datetime
+    t.column "promote_after",    :datetime
+  end
+
+  create_table "announcements", :force => true do |t|
+    t.column "title",      :string
+    t.column "user_id",    :integer
+    t.column "created_at", :datetime
+    t.column "updated_at", :datetime
+    t.column "body",       :text
+    t.column "body_html",  :text
+  end
+
+  create_table "attributions", :force => true do |t|
+    t.column "attributor_id",     :integer
+    t.column "attributor_type",   :string
+    t.column "attributable_id",   :integer
+    t.column "attributable_type", :string
+    t.column "created_at",        :datetime
+    t.column "updated_at",        :datetime
+  end
+
+  create_table "auto_tables", :force => true do |t|
+    t.column "name",   :string
+    t.column "schema", :text
+  end
+
+  create_table "blobs", :force => true do |t|
+    t.column "local_name",       :string
+    t.column "contributor_id",   :integer
+    t.column "body_html",        :text
+    t.column "created_at",       :datetime
+    t.column "body",             :text
+    t.column "title",            :string
+    t.column "content_blob_id",  :integer
+    t.column "updated_at",       :datetime
+    t.column "license_id",       :integer
+    t.column "content_type_id",  :integer
+    t.column "contributor_type", :string
+  end
+
+  create_table "blog_posts", :force => true do |t|
+    t.column "blog_id",    :integer
+    t.column "title",      :string
+    t.column "body",       :text
+    t.column "created_at", :datetime
+    t.column "updated_at", :datetime
+    t.column "body_html",  :text
+  end
+
+  create_table "blogs", :force => true do |t|
+    t.column "contributor_id",   :integer
+    t.column "contributor_type", :string
+    t.column "title",            :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  create_table "bookmarks", :force => true do |t|
+    t.column "title",             :string,   :limit => 50, :default => ""
+    t.column "created_at",        :datetime,                               :null => false
+    t.column "bookmarkable_type", :string,   :limit => 15, :default => "", :null => false
+    t.column "bookmarkable_id",   :integer,                :default => 0,  :null => false
+    t.column "user_id",           :integer,                :default => 0,  :null => false
+  end
+
+  add_index "bookmarks", ["user_id"], :name => "index_bookmarks_on_user_id"
+
+  create_table "citations", :force => true do |t|
+    t.column "user_id",          :integer
+    t.column "workflow_id",      :integer
+    t.column "workflow_version", :integer
+    t.column "authors",          :text
+    t.column "title",            :string
+    t.column "publication",      :string
+    t.column "published_at",     :datetime
+    t.column "accessed_at",      :datetime
+    t.column "url",              :string
+    t.column "isbn",             :string
+    t.column "issn",             :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  create_table "client_applications", :force => true do |t|
+    t.column "name",         :string
+    t.column "url",          :string
+    t.column "support_url",  :string
+    t.column "callback_url", :string
+    t.column "key",          :string,   :limit => 50
+    t.column "secret",       :string,   :limit => 50
+    t.column "user_id",      :integer
+    t.column "key_type",     :string
+    t.column "created_at",   :datetime
+    t.column "updated_at",   :datetime
+    t.column "creator_id",   :integer
+  end
+
+  add_index "client_applications", ["key"], :name => "index_client_applications_on_key", :unique => true
+
+  create_table "comments", :force => true do |t|
+    t.column "comment",          :text
+    t.column "created_at",       :datetime,                               :null => false
+    t.column "commentable_id",   :integer,                :default => 0,  :null => false
+    t.column "commentable_type", :string,   :limit => 15, :default => "", :null => false
+    t.column "user_id",          :integer,                :default => 0,  :null => false
+  end
+
+  add_index "comments", ["user_id"], :name => "index_comments_on_user_id"
+
+  create_table "concept_relations", :force => true do |t|
+    t.column "subject_concept_id", :integer
+    t.column "relation_type",      :string
+    t.column "object_concept_id",  :integer
+  end
+
+  create_table "concepts", :force => true do |t|
+    t.column "vocabulary_id",    :integer
+    t.column "created_at",       :datetime
+    t.column "description_html", :text
+    t.column "updated_at",       :datetime
+    t.column "phrase",           :string
+    t.column "description",      :text
+  end
+
+  create_table "content_blobs", :force => true do |t|
+    t.column "data", :binary
+  end
+
+  create_table "content_types", :force => true do |t|
+    t.column "created_at",       :datetime
+    t.column "category",         :string
+    t.column "description_html", :text
+    t.column "title",            :string
+    t.column "updated_at",       :datetime
+    t.column "mime_type",        :string
+    t.column "user_id",          :integer
+    t.column "description",      :text
+  end
+
+  create_table "contributions", :force => true do |t|
+    t.column "label",                :string
+    t.column "rating",               :float
+    t.column "contributable_type",   :string
+    t.column "contributor_id",       :integer
+    t.column "created_at",           :datetime
+    t.column "policy_id",            :integer
+    t.column "updated_at",           :datetime
+    t.column "license_id",           :integer
+    t.column "rank",                 :float
+    t.column "content_type_id",      :integer
+    t.column "site_downloads_count", :integer,  :default => 0
+    t.column "viewings_count",       :integer,  :default => 0
+    t.column "contributor_type",     :string
+    t.column "downloads_count",      :integer,  :default => 0
+    t.column "site_viewings_count",  :integer,  :default => 0
+    t.column "contributable_id",     :integer
+    t.column "layout",               :string
+  end
+
+  add_index "contributions", ["contributable_id", "contributable_type"], :name => "index_contributions_on_contributable_id_and_contributable_type"
+  add_index "contributions", ["contributor_id", "contributor_type"], :name => "index_contributions_on_contributor_id_and_contributor_type"
+
+  create_table "creditations", :force => true do |t|
+    t.column "creditor_id",     :integer
+    t.column "creditor_type",   :string
+    t.column "creditable_id",   :integer
+    t.column "creditable_type", :string
+    t.column "created_at",      :datetime
+    t.column "updated_at",      :datetime
+  end
+
+  create_table "curation_events", :force => true do |t|
+    t.column "user_id",      :integer
+    t.column "category",     :string
+    t.column "object_type",  :string
+    t.column "object_id",    :integer
+    t.column "details",      :text
+    t.column "details_html", :text
+    t.column "created_at",   :datetime
+    t.column "updated_at",   :datetime
+  end
+
+  create_table "downloads", :force => true do |t|
+    t.column "kind",               :string
+    t.column "created_at",         :datetime
+    t.column "accessed_from_site", :boolean,  :default => false
+    t.column "user_id",            :integer
+    t.column "user_agent",         :string
+    t.column "contribution_id",    :integer
+  end
+
+  add_index "downloads", ["contribution_id"], :name => "index_downloads_on_contribution_id"
+
+  create_table "experiments", :force => true do |t|
+    t.column "title",            :string
+    t.column "description",      :text
+    t.column "description_html", :text
+    t.column "contributor_id",   :integer
+    t.column "contributor_type", :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  create_table "federation_sources", :force => true do |t|
+    t.column "name", :string
+  end
+
+  create_table "friendships", :force => true do |t|
+    t.column "user_id",     :integer
+    t.column "friend_id",   :integer
+    t.column "created_at",  :datetime
+    t.column "accepted_at", :datetime
+    t.column "message",     :string,   :limit => 500
+  end
+
+  add_index "friendships", ["friend_id"], :name => "index_friendships_on_friend_id"
+  add_index "friendships", ["user_id"], :name => "index_friendships_on_user_id"
+
+  create_table "group_announcements", :force => true do |t|
+    t.column "title",      :string
+    t.column "network_id", :integer
+    t.column "user_id",    :integer
+    t.column "public",     :boolean,  :default => false
+    t.column "created_at", :datetime
+    t.column "updated_at", :datetime
+    t.column "body",       :text
+    t.column "body_html",  :text
+  end
+
+  create_table "jobs", :force => true do |t|
+    t.column "title",            :string
+    t.column "description",      :text
+    t.column "description_html", :text
+    t.column "experiment_id",    :integer
+    t.column "user_id",          :integer
+    t.column "runnable_id",      :integer
+    t.column "runnable_version", :integer
+    t.column "runnable_type",    :string
+    t.column "runner_id",        :integer
+    t.column "runner_type",      :string
+    t.column "submitted_at",     :datetime
+    t.column "started_at",       :datetime
+    t.column "completed_at",     :datetime
+    t.column "last_status",      :string
+    t.column "last_status_at",   :datetime
+    t.column "job_uri",          :string
+    t.column "job_manifest",     :binary
+    t.column "inputs_uri",       :string
+    t.column "inputs_data",      :binary
+    t.column "outputs_uri",      :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+    t.column "parent_job_id",    :integer
+  end
+
+  create_table "key_permissions", :force => true do |t|
+    t.column "client_application_id", :integer
+    t.column "for",                   :string
+  end
+
+  create_table "labels", :force => true do |t|
+    t.column "vocabulary_id", :integer
+    t.column "language",      :string
+    t.column "text",          :string
+    t.column "label_type",    :string
+    t.column "concept_id",    :integer
+  end
+
+  create_table "license_attributes", :force => true do |t|
+    t.column "license_id",        :integer
+    t.column "license_option_id", :integer
+    t.column "created_at",        :datetime
+  end
+
+  create_table "license_options", :force => true do |t|
+    t.column "user_id",          :integer
+    t.column "title",            :string
+    t.column "description",      :text
+    t.column "description_html", :text
+    t.column "uri",              :string
+    t.column "predicate",        :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  create_table "licenses", :force => true do |t|
+    t.column "user_id",          :integer
+    t.column "unique_name",      :string
+    t.column "title",            :string
+    t.column "description",      :text
+    t.column "description_html", :text
+    t.column "url",              :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  create_table "memberships", :force => true do |t|
+    t.column "user_id",                :integer
+    t.column "network_id",             :integer
+    t.column "created_at",             :datetime
+    t.column "user_established_at",    :datetime
+    t.column "network_established_at", :datetime
+    t.column "message",                :string,   :limit => 500
+    t.column "administrator",          :boolean,                 :default => false
+  end
+
+  add_index "memberships", ["network_id"], :name => "index_memberships_on_network_id"
+  add_index "memberships", ["user_id"], :name => "index_memberships_on_user_id"
+
+  create_table "messages", :force => true do |t|
+    t.column "from",                 :integer
+    t.column "to",                   :integer
+    t.column "subject",              :string
+    t.column "body",                 :text
+    t.column "reply_id",             :integer
+    t.column "created_at",           :datetime
+    t.column "read_at",              :datetime
+    t.column "body_html",            :text
+    t.column "deleted_by_sender",    :boolean,  :default => false
+    t.column "deleted_by_recipient", :boolean,  :default => false
+  end
+
+  create_table "networks", :force => true do |t|
+    t.column "user_id",          :integer
+    t.column "title",            :string
+    t.column "unique_name",      :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+    t.column "description",      :text
+    t.column "description_html", :text
+    t.column "auto_accept",      :boolean,  :default => false
+  end
+
+  add_index "networks", ["user_id"], :name => "index_networks_on_user_id"
+
+  create_table "oauth_nonces", :force => true do |t|
+    t.column "nonce",      :string
+    t.column "timestamp",  :integer
+    t.column "created_at", :datetime
+    t.column "updated_at", :datetime
+  end
+
+  add_index "oauth_nonces", ["nonce", "timestamp"], :name => "index_oauth_nonces_on_nonce_and_timestamp", :unique => true
+
+  create_table "oauth_tokens", :force => true do |t|
+    t.column "user_id",               :integer
+    t.column "type",                  :string,   :limit => 20
+    t.column "client_application_id", :integer
+    t.column "token",                 :string,   :limit => 50
+    t.column "secret",                :string,   :limit => 50
+    t.column "authorized_at",         :datetime
+    t.column "invalidated_at",        :datetime
+    t.column "created_at",            :datetime
+    t.column "updated_at",            :datetime
+  end
+
+  add_index "oauth_tokens", ["token"], :name => "index_oauth_tokens_on_token", :unique => true
+
+  create_table "ontologies", :force => true do |t|
+    t.column "created_at",       :datetime
+    t.column "description_html", :text
+    t.column "uri",              :string
+    t.column "prefix",           :string
+    t.column "title",            :string
+    t.column "updated_at",       :datetime
+    t.column "user_id",          :integer
+    t.column "description",      :text
+  end
+
+  create_table "pack_contributable_entries", :force => true do |t|
+    t.column "comment",               :text
+    t.column "contributable_type",    :string
+    t.column "contributable_version", :integer
+    t.column "created_at",            :datetime
+    t.column "updated_at",            :datetime
+    t.column "pack_id",               :integer,  :null => false
+    t.column "user_id",               :integer,  :null => false
+    t.column "contributable_id",      :integer,  :null => false
+  end
+
+  create_table "pack_remote_entries", :force => true do |t|
+    t.column "comment",       :text
+    t.column "created_at",    :datetime
+    t.column "uri",           :string
+    t.column "title",         :string
+    t.column "updated_at",    :datetime
+    t.column "pack_id",       :integer,  :null => false
+    t.column "user_id",       :integer,  :null => false
+    t.column "alternate_uri", :string
+  end
+
+  create_table "packs", :force => true do |t|
+    t.column "contributor_id",   :integer
+    t.column "created_at",       :datetime
+    t.column "description_html", :text
+    t.column "title",            :string
+    t.column "updated_at",       :datetime
+    t.column "description",      :text
+    t.column "contributor_type", :string
+  end
+
+  create_table "pending_invitations", :force => true do |t|
+    t.column "email",        :string
+    t.column "created_at",   :datetime
+    t.column "request_type", :string
+    t.column "requested_by", :integer
+    t.column "request_for",  :integer
+    t.column "message",      :string,   :limit => 500
+    t.column "token",        :string
+  end
+
+  create_table "permissions", :force => true do |t|
+    t.column "contributor_id",   :integer
+    t.column "contributor_type", :string
+    t.column "policy_id",        :integer
+    t.column "download",         :boolean,  :default => false
+    t.column "edit",             :boolean,  :default => false
+    t.column "view",             :boolean,  :default => false
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  add_index "permissions", ["policy_id"], :name => "index_permissions_on_policy_id"
+
+  create_table "picture_selections", :force => true do |t|
+    t.column "user_id",    :integer
+    t.column "picture_id", :integer
+    t.column "created_at", :datetime
+  end
+
+  create_table "pictures", :force => true do |t|
+    t.column "data",    :binary
+    t.column "user_id", :integer
+  end
+
+  create_table "policies", :force => true do |t|
+    t.column "name",             :string
+    t.column "contributor_id",   :integer
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+    t.column "update_mode",      :integer
+    t.column "share_mode",       :integer
+    t.column "contributor_type", :string
+    t.column "public_view",      :boolean,  :default => false
+    t.column "public_download",  :boolean,  :default => false
+  end
+
+  create_table "predicates", :force => true do |t|
+    t.column "created_at",       :datetime
+    t.column "description_html", :text
+    t.column "title",            :string
+    t.column "ontology_id",      :integer
+    t.column "updated_at",       :datetime
+    t.column "phrase",           :string
+    t.column "equivalent_to",    :text
+    t.column "description",      :text
+  end
+
+  create_table "previews", :force => true do |t|
+    t.column "created_at",    :datetime
+    t.column "svg_blob_id",   :integer
+    t.column "image_blob_id", :integer
+  end
+
+  create_table "profiles", :force => true do |t|
+    t.column "user_id",             :integer
+    t.column "picture_id",          :integer
+    t.column "email",               :string
+    t.column "website",             :string
+    t.column "created_at",          :datetime
+    t.column "updated_at",          :datetime
+    t.column "body",                :text
+    t.column "body_html",           :text
+    t.column "field_or_industry",   :string
+    t.column "occupation_or_roles", :string
+    t.column "organisations",       :text
+    t.column "location_city",       :string
+    t.column "location_country",    :string
+    t.column "interests",           :text
+    t.column "contact_details",     :text
+  end
+
+  add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id"
+
+  create_table "ratings", :force => true do |t|
+    t.column "rating",        :integer,                :default => 0
+    t.column "created_at",    :datetime,                               :null => false
+    t.column "rateable_type", :string,   :limit => 15, :default => "", :null => false
+    t.column "rateable_id",   :integer,                :default => 0,  :null => false
+    t.column "user_id",       :integer,                :default => 0,  :null => false
+  end
+
+  add_index "ratings", ["user_id"], :name => "index_ratings_on_user_id"
+
+  create_table "relationships", :force => true do |t|
+    t.column "context_id",   :integer
+    t.column "created_at",   :datetime
+    t.column "context_type", :string
+    t.column "objekt_type",  :string
+    t.column "objekt_id",    :integer
+    t.column "subject_id",   :integer
+    t.column "predicate_id", :integer
+    t.column "subject_type", :string
+    t.column "user_id",      :integer
+  end
+
+  create_table "remote_workflows", :force => true do |t|
+    t.column "workflow_id",        :integer
+    t.column "workflow_version",   :integer
+    t.column "taverna_enactor_id", :integer
+    t.column "workflow_uri",       :string
+  end
+
+  create_table "reviews", :force => true do |t|
+    t.column "title",           :string,                 :default => ""
+    t.column "review",          :text
+    t.column "created_at",      :datetime,                               :null => false
+    t.column "updated_at",      :datetime,                               :null => false
+    t.column "reviewable_id",   :integer,                :default => 0,  :null => false
+    t.column "reviewable_type", :string,   :limit => 15, :default => "", :null => false
+    t.column "user_id",         :integer,                :default => 0,  :null => false
+  end
+
+  add_index "reviews", ["user_id"], :name => "index_reviews_on_user_id"
+
+  create_table "service_categories", :force => true do |t|
+    t.column "label",        :string
+    t.column "uri",          :string
+    t.column "retrieved_at", :datetime
+    t.column "created_at",   :datetime
+    t.column "updated_at",   :datetime
+    t.column "service_id",   :integer
+  end
+
+  create_table "service_deployments", :force => true do |t|
+    t.column "service_provider_id",  :integer
+    t.column "iso3166_country_code", :string
+    t.column "city",                 :string
+    t.column "submitter_label",      :string
+    t.column "uri",                  :string
+    t.column "retrieved_at",         :datetime
+    t.column "created_at",           :datetime
+    t.column "submitter_uri",        :string
+    t.column "country",              :string
+    t.column "updated_at",           :datetime
+    t.column "service_id",           :integer
+    t.column "flag_url",             :string
+    t.column "created",              :datetime
+    t.column "endpoint",             :string
+  end
+
+  create_table "service_providers", :force => true do |t|
+    t.column "name",         :string
+    t.column "uri",          :string
+    t.column "retrieved_at", :datetime
+    t.column "created_at",   :datetime
+    t.column "updated_at",   :datetime
+    t.column "description",  :text
+    t.column "created",      :datetime
+  end
+
+  create_table "service_tags", :force => true do |t|
+    t.column "label",        :string
+    t.column "uri",          :string
+    t.column "retrieved_at", :datetime
+    t.column "created_at",   :datetime
+    t.column "updated_at",   :datetime
+    t.column "service_id",   :integer
+  end
+
+  create_table "service_types", :force => true do |t|
+    t.column "label",        :string
+    t.column "retrieved_at", :datetime
+    t.column "created_at",   :datetime
+    t.column "updated_at",   :datetime
+    t.column "service_id",   :integer
+  end
+
+  create_table "services", :force => true do |t|
+    t.column "iso3166_country_code",     :string
+    t.column "city",                     :string
+    t.column "name",                     :string
+    t.column "contributor_id",           :integer
+    t.column "submitter_label",          :string
+    t.column "uri",                      :string
+    t.column "retrieved_at",             :datetime
+    t.column "created_at",               :datetime
+    t.column "monitor_symbol_url",       :string
+    t.column "country",                  :string
+    t.column "submitter_uri",            :string
+    t.column "updated_at",               :datetime
+    t.column "monitor_message",          :text
+    t.column "monitor_label",            :string
+    t.column "monitor_last_checked",     :datetime
+    t.column "monitor_small_symbol_url", :string
+    t.column "description",              :text
+    t.column "flag_url",                 :string
+    t.column "wsdl",                     :string
+    t.column "provider_label",           :string
+    t.column "contributor_type",         :string
+    t.column "documentation_uri",        :string
+    t.column "endpoint",                 :string
+    t.column "provider_uri",             :string
+    t.column "created",                  :datetime
+  end
+
+  create_table "sessions", :force => true do |t|
+    t.column "session_id", :string
+    t.column "data",       :text
+    t.column "updated_at", :datetime
+  end
+
+  add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
+  add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
+
+  create_table "taggings", :force => true do |t|
+    t.column "tag_id",        :integer
+    t.column "taggable_id",   :integer
+    t.column "taggable_type", :string
+    t.column "user_id",       :integer
+    t.column "created_at",    :datetime
+  end
+
+  add_index "taggings", ["tag_id", "taggable_type"], :name => "index_taggings_on_tag_id_and_taggable_type"
+  add_index "taggings", ["user_id", "tag_id", "taggable_type"], :name => "index_taggings_on_user_id_and_tag_id_and_taggable_type"
+  add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type"
+  add_index "taggings", ["user_id", "taggable_id", "taggable_type"], :name => "index_taggings_on_user_id_and_taggable_id_and_taggable_type"
+
+  create_table "tags", :force => true do |t|
+    t.column "name",             :string
+    t.column "taggings_count",   :integer,  :default => 0, :null => false
+    t.column "vocabulary_id",    :integer
+    t.column "description",      :text
+    t.column "description_html", :text
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  add_index "tags", ["name"], :name => "index_tags_on_name"
+  add_index "tags", ["taggings_count"], :name => "index_tags_on_taggings_count"
+
+  create_table "taverna_enactors", :force => true do |t|
+    t.column "title",            :string
+    t.column "description",      :text
+    t.column "contributor_id",   :integer
+    t.column "contributor_type", :string
+    t.column "url",              :string
+    t.column "username",         :string
+    t.column "crypted_password", :string
+    t.column "created_at",       :datetime
+    t.column "updated_at",       :datetime
+  end
+
+  create_table "topic_feedbacks", :force => true do |t|
+    t.column "submit_dt", :datetime
+    t.column "user_id",   :integer
+    t.column "score",     :integer
+    t.column "topic_id",  :integer
+  end
+
+  create_table "topic_runs", :force => true do |t|
+    t.column "runtime",     :datetime
+    t.column "description", :string
+  end
+
+  create_table "topic_tag_map", :force => true do |t|
+    t.column "display_flag", :boolean
+    t.column "tag_id",       :integer
+    t.column "topic_id",     :integer
+    t.column "probability",  :float
+  end
+
+  create_table "topic_workflow_map", :force => true do |t|
+    t.column "display_flag", :boolean
+    t.column "workflow_id",  :integer
+    t.column "topic_id",     :integer
+    t.column "probability",  :float
+  end
+
+  create_table "topics", :force => true do |t|
+    t.column "name",        :string
+    t.column "orig_run_id", :integer
+    t.column "run_id",      :integer
+  end
+
+  create_table "user_reports", :force => true do |t|
+    t.column "report",       :text
+    t.column "created_at",   :datetime
+    t.column "subject_id",   :integer
+    t.column "subject_type", :string
+    t.column "user_id",      :integer
+    t.column "content",      :text
+  end
+
+  create_table "users", :force => true do |t|
+    t.column "openid_url",                :string
+    t.column "name",                      :string
+    t.column "created_at",                :datetime
+    t.column "updated_at",                :datetime
+    t.column "last_seen_at",              :datetime
+    t.column "username",                  :string
+    t.column "crypted_password",          :string,   :limit => 40
+    t.column "salt",                      :string,   :limit => 40
+    t.column "remember_token",            :string
+    t.column "remember_token_expires_at", :datetime
+    t.column "downloads_count",           :integer,                :default => 0
+    t.column "viewings_count",            :integer,                :default => 0
+    t.column "email",                     :string
+    t.column "unconfirmed_email",         :string
+    t.column "email_confirmed_at",        :datetime
+    t.column "activated_at",              :datetime
+    t.column "receive_notifications",     :boolean,                :default => true
+    t.column "reset_password_code",       :string
+    t.column "reset_password_code_until", :datetime
+  end
+
+  create_table "viewings", :force => true do |t|
+    t.column "contribution_id",    :integer
+    t.column "user_id",            :integer
+    t.column "created_at",         :datetime
+    t.column "user_agent",         :string
+    t.column "accessed_from_site", :boolean,  :default => false
+  end
+
+  add_index "viewings", ["contribution_id"], :name => "index_viewings_on_contribution_id"
+
+  create_table "vocabularies", :force => true do |t|
+    t.column "created_at",       :datetime
+    t.column "description_html", :text
+    t.column "uri",              :string
+    t.column "prefix",           :string
+    t.column "title",            :string
+    t.column "updated_at",       :datetime
+    t.column "user_id",          :integer
+    t.column "description",      :text
+  end
+
+  create_table "workflow_processors", :force => true do |t|
+    t.column "name",           :string
+    t.column "wsdl_operation", :string
+    t.column "workflow_id",    :integer
+    t.column "wsdl",           :string
+  end
+
+  create_table "workflow_versions", :force => true do |t|
+    t.column "contributor_id",    :integer
+    t.column "revision_comments", :text
+    t.column "created_at",        :datetime
+    t.column "body_html",         :text
+    t.column "body",              :text
+    t.column "title",             :string
+    t.column "content_blob_id",   :integer
+    t.column "license",           :string
+    t.column "updated_at",        :datetime
+    t.column "last_edited_by",    :string
+    t.column "svg",               :string
+    t.column "unique_name",       :string
+    t.column "content_type_id",   :integer
+    t.column "version",           :integer
+    t.column "workflow_id",       :integer
+    t.column "contributor_type",  :string
+    t.column "preview_id",        :integer
+    t.column "image",             :string
+    t.column "file_ext",          :string
+  end
+
+  add_index "workflow_versions", ["workflow_id"], :name => "index_workflow_versions_on_workflow_id"
+
+  create_table "workflows", :force => true do |t|
+    t.column "contributor_id",   :integer
+    t.column "created_at",       :datetime
+    t.column "body_html",        :text
+    t.column "body",             :text
+    t.column "title",            :string
+    t.column "content_blob_id",  :integer
+    t.column "updated_at",       :datetime
+    t.column "last_edited_by",   :string
+    t.column "svg",              :string
+    t.column "license_id",       :integer
+    t.column "unique_name",      :string
+    t.column "content_type_id",  :integer
+    t.column "current_version",  :integer
+    t.column "contributor_type", :string
+    t.column "preview_id",       :integer
+    t.column "image",            :string
+    t.column "file_ext",         :string
+  end
+
+end

Modified: branches/elico/lib/conf.rb (2731 => 2732)


--- branches/elico/lib/conf.rb	2011-10-21 10:17:27 UTC (rev 2731)
+++ branches/elico/lib/conf.rb	2011-10-21 10:21:04 UTC (rev 2732)
@@ -165,6 +165,10 @@
     self.fetch_entry('recaptcha_private')
   end
 
+  def self.layouts
+    self.fetch_entry('layouts')
+  end
+
   # This method is required to create an administrator in the test fixtures
 
   def self.admins=(value)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]