Diff
Modified: trunk/app/controllers/application_controller.rb (3467 => 3468)
--- trunk/app/controllers/application_controller.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/controllers/application_controller.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -530,4 +530,15 @@
end
end
+
+
+ def check_context
+ if params[:user_id]
+ @context = User.find_by_id(params[:user_id])
+ error("User not found") if @context.nil?
+ elsif params[:network_id]
+ @context = Network.find_by_id(params[:network_id])
+ error("Group not found") if @context.nil?
+ end
+ end
end
Modified: trunk/app/controllers/blobs_controller.rb (3467 => 3468)
--- trunk/app/controllers/blobs_controller.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/controllers/blobs_controller.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -15,6 +15,8 @@
before_filter :set_sharing_mode_variables, : [:show, :new, :create, :edit, :update]
before_filter :check_is_owner, : [:edit, :update, :suggestions, :process_suggestions]
+
+ before_filter :check_context, : :index
# declare sweepers and which actions should invoke them
cache_sweeper :blob_sweeper, : [ :create, :update, :destroy ]
@@ -75,6 +77,13 @@
pivot_options["order"] = [{"order" => "id ASC", "option" => "relevance", "label" => "Relevance"}] + pivot_options["order"]
end
+ locked_filters = { 'CATEGORY' => 'Blob' }
+
+ if @context
+ context_filter = visible_name(@context).upcase + "_ID"
+ locked_filters[context_filter] = @context.id.to_s
+ end
+
@pivot, problem = calculate_pivot(
:pivot_options => Conf.pivot_options,
@@ -83,7 +92,7 @@
:search_models => [Blob],
:search_limit => Conf.max_search_size,
- :locked_filters => { 'CATEGORY' => 'Blob' },
+ :locked_filters => locked_filters,
:active_filters => ["CATEGORY", "TYPE_ID", "TAG_ID", "USER_ID",
"LICENSE_ID", "GROUP_ID", "WSDL_ENDPOINT",
Modified: trunk/app/controllers/packs_controller.rb (3467 => 3468)
--- trunk/app/controllers/packs_controller.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/controllers/packs_controller.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -11,7 +11,9 @@
before_filter :find_pack_auth, :except => [:index, :new, :create, :search]
before_filter :set_sharing_mode_variables, : [:show, :new, :create, :edit, :update]
-
+
+ before_filter :check_context, : :index
+
# declare sweepers and which actions should invoke them
cache_sweeper :pack_sweeper, : [ :create, :update, :destroy ]
cache_sweeper :pack_entry_sweeper, : [ :create_item, :quick_add, :update_item, :destroy_item ]
@@ -37,6 +39,13 @@
pivot_options["order"] = [{"order" => "id ASC", "option" => "relevance", "label" => "Relevance"}] + pivot_options["order"]
end
+ locked_filters = { 'CATEGORY' => 'Pack' }
+
+ if @context
+ context_filter = visible_name(@context).upcase + "_ID"
+ locked_filters[context_filter] = @context.id.to_s
+ end
+
@pivot, problem = calculate_pivot(
:pivot_options => Conf.pivot_options,
@@ -45,7 +54,7 @@
:search_models => [Pack],
:search_limit => Conf.max_search_size,
- :locked_filters => { 'CATEGORY' => 'Pack' },
+ :locked_filters => locked_filters,
:active_filters => ["CATEGORY", "TYPE_ID", "TAG_ID", "USER_ID",
"LICENSE_ID", "GROUP_ID", "WSDL_ENDPOINT",
Modified: trunk/app/controllers/workflows_controller.rb (3467 => 3468)
--- trunk/app/controllers/workflows_controller.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/controllers/workflows_controller.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -21,6 +21,8 @@
before_filter :check_is_owner, : [:edit, :update]
+ before_filter :check_context, : :index
+
# declare sweepers and which actions should invoke them
cache_sweeper :workflow_sweeper, : [ :create, :create_version, :launch, :update, :update_version, :destroy_version, :destroy ]
cache_sweeper :download_viewing_sweeper, : [ :show, :download, :named_download, :galaxy_tool, :galaxy_tool_download, :launch ]
@@ -207,6 +209,13 @@
pivot_options["order"] = [{"order" => "id ASC", "option" => "relevance", "label" => "Relevance"}] + pivot_options["order"]
end
+ locked_filters = { 'CATEGORY' => 'Workflow' }
+
+ if @context
+ context_filter = visible_name(@context).upcase + "_ID"
+ locked_filters[context_filter] = @context.id.to_s
+ end
+
@pivot, problem = calculate_pivot(
:pivot_options => pivot_options,
@@ -215,7 +224,7 @@
:search_models => [Workflow],
:search_limit => Conf.max_search_size,
- :locked_filters => { 'CATEGORY' => 'Workflow' },
+ :locked_filters => locked_filters,
:active_filters => ["CATEGORY", "TYPE_ID", "TAG_ID", "USER_ID",
"LICENSE_ID", "GROUP_ID", "WSDL_ENDPOINT",
Modified: trunk/app/helpers/application_helper.rb (3467 => 3468)
--- trunk/app/helpers/application_helper.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/helpers/application_helper.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1168,11 +1168,15 @@
perm
end
- def currentusers_things_url(thing)
+ def currentusers_things_url(klass)
return nil unless current_user
- return url_for(:controller => 'users',
- :id => current_user.id,
- :action ="" thing)
+ if Conf.contributable_models.include?(klass)
+ return polymorphic_url([current_user, klass.pluralize.underscore.to_sym])
+ else
+ return url_for(:controller => 'users',
+ :id => current_user.id,
+ :action ="" controller_visible_name(klass))
+ end
end
def view_privileges_notice
@@ -1573,14 +1577,34 @@
logger.error("Missing layout for #{contributable.class.name} #{contributable.id}: "+
"#{contributable.contribution.policy.layout}")
end
- elsif @network
- layout = @network.layout
+ elsif (network = @network) || (@context.is_a?(Network) && (network = @context))
+ layout = network.layout
if layout.nil?
- logger.error("Missing layout for Group address@hidden: address@hidden")
+ logger.error("Missing layout for Group #{network.id}")
end
end
@layout = layout || {"layout" => Conf.page_template, "stylesheets" => [Conf.stylesheet]}
end
+
+ def context_prefix(context)
+ case context
+ when User
+ prefix = "#{context.name}'"
+ prefix << 's' if context.name[-1] != 's'
+ when Network
+ prefix = context.name
+ else
+ prefix = ''
+ end
+
+ prefix
+ end
+
+ # Creates a URL from a path and a hash of parameters
+ def url_with_params(url, params)
+ url + '?' + params.delete_if {|k,v| v.nil? || v.empty?}.to_query
+ end
+
end
Modified: trunk/app/models/network.rb (3467 => 3468)
--- trunk/app/models/network.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/models/network.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -59,7 +59,6 @@
validates_associated :owner
validates_presence_of :user_id, :title
-
# bugfix. after unique_name has been set, if you un-set it, Rails throws an error!
validates_uniqueness_of :unique_name, :if => Proc.new { |network| !(network.unique_name.nil? or network.unique_name.empty?) }
@@ -76,6 +75,10 @@
def owner_name
owner.name
end
+
+ def name
+ title
+ end
# announcements belonging to the group;
#
Modified: trunk/app/views/blobs/_breadcrumbs.rhtml (3467 => 3468)
--- trunk/app/views/blobs/_breadcrumbs.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/blobs/_breadcrumbs.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,5 +1,14 @@
-<li><%= link_to 'Files', blobs_path -%></li>
+<% if @context %>
+ <li><%= link_to visible_name(@context).pluralize, polymorphic_url(@context.class.name.underscore.pluralize) %></li>
+ <li><%= link_to @context.name, @context %></li>
+<% end %>
+<% if controller.action_name == 'index' %>
+ <li>Files</li>
+<% else %>
+ <li><%= link_to 'Files', blobs_path %></li>
+<% end %>
+
<% if ["show", "new", "edit", "all", "search", "suggestions"].include? controller.action_name.to_s -%>
<% case controller.action_name.to_s; when "show" -%>
Modified: trunk/app/views/blobs/index.rhtml (3467 => 3468)
--- trunk/app/views/blobs/index.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/blobs/index.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,4 +1,4 @@
-<h1>Files</h1>
+<h1><%= context_prefix(@context) -%> Files</h1>
<%= render :partial => "content/index" -%>
Modified: trunk/app/views/content/_index.rhtml (3467 => 3468)
--- trunk/app/views/content/_index.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/content/_index.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -3,7 +3,7 @@
<% if @pivot[:filters].length > 0 %>
<div class="category">Search filter terms</div>
<div class="search_filters">
- <form action="" url_for(request.query_parameters) -%>" method="GET">
+ <form action="" url_with_params(request.path, request.query_parameters) -%>" method="GET">
<div class="filter_search_box">
<input class="query" name="filter_query" value="<%= params[:filter_query] -%>" />
<% @pivot[:filter_query_url].each do |key, value| %>
@@ -11,7 +11,7 @@
<% end %>
<% if @pivot[:cancel_filter_query_url] %>
<%= link_to('<img src="" />',
- @pivot[:cancel_filter_query_url]) -%>
+ url_with_params(request.path, @pivot[:cancel_filter_query_url])) -%>
<% else %>
<input class="submit" type="image" src="" name="submit" />
<% end %>
@@ -32,8 +32,11 @@
<div class="options">
<% filter[:objects].each do |object| %>
<div title='<%= h(object[:plain_label]) -%>'<%= object[:selected] ? ' class="selected"' : '' -%>>
- <input class='checkbox' type='checkbox' <% if object[:selected] %> checked='checked' <% end %> />
- <%= link_to("<div class='count'>#{object[:count]}</div> <div class='label'><span class='truncate'>#{object[:label]}</span></div>", object[:label_uri]) -%>
+ <input class='checkbox' type='checkbox' <% if object[:selected] %> checked='checked' <% end %> />
+ <a href="" url_with_params(request.path, object[:label_uri]) -%>">
+ <div class='count'><%= object[:count] -%></div>
+ <div class='label'><span class='truncate'><%= object[:label] -%></span></div>
+ </a>
</div>
<% end %>
</div>
@@ -64,18 +67,18 @@
</div>
<div class="summary">
<div class="result-count">
- Showing <%= pluralize(@pivot[:results].total_entries, 'result') -%>.
+ Showing <%= pluralize(@pivot[:results].size, 'result') -%>.
<% if @pivot[:results].size > 1 %>Use the <%if @pivot[:filters].length > 0 %>filters on the left and the <% end %>
search box below to refine the results.<% end %>
</div>
<div>
- <form action="" url_for(request.query_parameters) -%>" method="GET">
+ <form action="" url_with_params(request.path, request.query_parameters) -%>" method="GET">
<div class="search_box">
<input class="query" name="query" value="<%= params[:query] -%>" />
<% if request.query_parameters["filter"] %>
<input name="filter" type="hidden" value="<%= request.query_parameters["filter"].gsub('"', '"') -%>" />
<% end %>
- <input class="submit" type="submit" value="Search"></input>
+ <input class="submit" type="submit" value="Search"/>
</div>
<% if @pivot[:query_problem] %>
<div class="search_query_problem">
@@ -84,7 +87,7 @@
<% end %>
<% if params[:query] && controller.class != SearchController %>
<div class="remove_search_query">
- <%= link_to("Remove search query", url_for(request.query_parameters.merge({ "query" => nil }))) -%>
+ <%= link_to("Remove search query", url_with_params(request.path, request.query_parameters.merge({ "query", nil }))) -%>
</div>
<% end %>
</form>
Modified: trunk/app/views/gadgets/_asset_manager.rhtml (3467 => 3468)
--- trunk/app/views/gadgets/_asset_manager.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/gadgets/_asset_manager.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -11,7 +11,7 @@
<%= link_to(pluralize(current_user.networks_owned.length + current_user.networks.length, "Group"), currentusers_things_url('groups')) %>
<% filter_contributables(current_user.contributions).each do |klass,contributables| %>
<span style="color:#999999;">|</span>
- <%= link_to(pluralize(contributables.length, controller_visible_name(klass.humanize.pluralize).singularize), currentusers_things_url(controller_visible_name(klass.humanize.pluralize).downcase)) %>
+ <%= link_to(pluralize(contributables.length, controller_visible_name(klass.humanize.pluralize).singularize), currentusers_things_url(klass)) %>
<% end %>
</small>
</p>
@@ -55,7 +55,7 @@
<% filter_contributables(current_user.contributions, true).each do |klass, array| %>
<div>
<div class="title">
- <%= link_to(visible_name(klass.humanize).pluralize, currentusers_things_url(controller_visible_name(klass.humanize.pluralize).downcase)) %>
+ <%= link_to(visible_name(klass.humanize).pluralize, currentusers_things_url(klass)) %>
</div>
<div class="content">
<ul class="gadget_list">
Modified: trunk/app/views/layouts/_myexperiment.rhtml (3467 => 3468)
--- trunk/app/views/layouts/_myexperiment.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/layouts/_myexperiment.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -37,23 +37,26 @@
<% else %>
<%= link_to image_tag(Conf.site_logo), "/" %>
<% end %>
- </div>
+ </div>
<div id="myexp_links">
- <div style="text-align: left; float: left; width: 34%; padding-top: 6px;" id="site_info_links" class="links">
+ <div id="site_info_links" class="links">
<% if @content_for_site_info_links %>
<%= yield :site_info_links %>
<% else %>
<%= render :partial => 'layouts/site_info_links' %>
<% end %>
</div>
- <div style="text-align: right; float: right; width: 64%;" id="user_links" class="links">
+ <div id="user_links" class="links">
<%= render :partial => 'layouts/user_links' %>
</div>
</div>
- <div class="clearer"> </div>
</div>
<div id="myexp_tabs">
- <%= render :partial => 'layouts/tab_bar' %>
+ <% if @content_for_tabs %>
+ <%= yield :tabs %>
+ <% else %>
+ <%= render :partial => 'layouts/tab_bar' %>
+ <% end %>
</div>
<div id="myexp_searchbar">
<%= render :partial => "layouts/search" %>
Modified: trunk/app/views/networks/_breadcrumbs.rhtml (3467 => 3468)
--- trunk/app/views/networks/_breadcrumbs.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/networks/_breadcrumbs.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,4 +1,8 @@
-<li><%= link_to 'Groups', networks_path -%></li>
+<% if controller.action_name == 'index' %>
+ <li>Groups</li>
+<% else %>
+ <li><%= link_to 'Groups', networks_path %></li>
+<% end %>
<% if ["show", "content", "new", "edit", "search", "all", "invite"].include? controller.action_name.to_s -%>
<% case controller.action_name.to_s; when "show" %>
Modified: trunk/app/views/packs/_breadcrumbs.rhtml (3467 => 3468)
--- trunk/app/views/packs/_breadcrumbs.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/packs/_breadcrumbs.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,5 +1,14 @@
-<li><%= link_to 'Packs', packs_path %></li>
+<% if @context %>
+ <li><%= link_to visible_name(@context).pluralize, polymorphic_url(@context.class.name.underscore.pluralize) %></li>
+ <li><%= link_to @context.name, @context %></li>
+<% end %>
+<% if controller.action_name == 'index' %>
+ <li>Packs</li>
+<% else %>
+ <li><%= link_to 'Packs', packs_path %></li>
+<% end %>
+
<% if ["show", "new", "edit", "all", "new_item", "edit_item", "search"].include? controller.action_name.to_s %>
<% case controller.action_name.to_s; when "show" %>
<li><%= h(@pack.title) %></li>
Modified: trunk/app/views/packs/index.rhtml (3467 => 3468)
--- trunk/app/views/packs/index.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/packs/index.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -20,5 +20,6 @@
<center><%= image_tag 'packs.png' -%></center>
</div>
</div>
+<h1><%= context_prefix(@context) -%> Packs</h1>
<%= render :partial => "content/index" -%>
Modified: trunk/app/views/skins/_biovel.rhtml (3467 => 3468)
--- trunk/app/views/skins/_biovel.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/skins/_biovel.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,6 +1,17 @@
<% @logo_link_url = "http://biovel.eu/" # The URL that the logo links to when clicked
- @logo_image_url = "/images/biovel.png" # The logo image %>
+ @logo_image_url = "/images/biovel.png" # The logo image
+ biovel_id = @layout['network_id']
+
+ biovel_tabs = [
+ {'controller' => 'networks', 'label' => 'BioVeL', 'link' => network_path(biovel_id)},
+ {'controller' => 'workflows', 'label' => 'Workflows', 'link' => network_workflows_path(biovel_id)},
+ {'controller' => 'blobs', 'label' => 'Files', 'link' => network_blobs_path(biovel_id)},
+ {'controller' => 'packs', 'label' => 'Packs', 'link' => network_packs_path(biovel_id)}
+ ]
+
+%>
+
<% content_for :site_info_links do %>
<% end %>
@@ -8,21 +19,31 @@
<% content_for :logo do %>
<div style="float: left; margin-bottom: 0.5em">
<%= link_to image_tag(@logo_image_url), @logo_link_url, :style => "float: left" -%>
- <div style="float: left; margin-top: 1em; margin-left: 1em">
+ <div style="float: left; margin-top: 2em">
<div style="font-weight: bold; vertical-align: middle">
<a href="" @logo_link_url -%>" class="biovel_logo_link">
- <span style="font-size: 280%"><span style="color:black;">B</span>io<span style="color:black">V</span>e<span style="color:black">L</span></span><br/>
- <span style="font-size: 100%">Biodiversity Virtual e-Laboratory</span>
+ <span style="font-size: 200%">Biodiversity Virtual e-Laboratory</span>
</a>
</div>
<div style="margin: 0.5em 0 0 1em; color: black;">
- on <%= link_to image_tag("/images/logo_tiny.png", :style=>"-moz-border-radius: 2px; border-radius: 2px; vertical-align: middle;border: 1px solid #ccc"), "/" -%>
+ on <%= link_to image_tag("/images/logo_tiny.png", :style=>"vertical-align: middle"), "/" -%>
</div>
</div>
</div>
<br class="clearer"/>
<% end %>
+<% content_for :tabs do %>
+ <ul class="tabnav">
+ <li class="return_tab"><%= link_to 'Home', '/home'-%></li>
+ <% biovel_tabs.each do |tab| %>
+ <li <%= (tab['controller'] && controller.controller_name.match(tab['controller'])) ? 'id="selected_tabnav"' : '' %>>
+ <%= link_to(tab['label'], tab['link']) -%>
+ </li>
+ <% end %>
+ </ul>
+<% end %>
+
<%= render :partial => "layouts/myexperiment" %>
<% if Rails.env == "production" %>
Modified: trunk/app/views/skins/branding/_biovel.html.erb (3467 => 3468)
--- trunk/app/views/skins/branding/_biovel.html.erb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/skins/branding/_biovel.html.erb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,5 +1,5 @@
<div style="text-align: center; margin-top: 0.5em;">
<span class="owner">Project</span>
- <%= link_to image_tag('/images/biovel.png', :style => 'width: 60px; height: 60px; margin-top: 0.2em;') + '<br/>BioVeL',
- network_path(643) -%>
+ <%= link_to image_tag('/images/biovel.png', :style => 'width: 80px; height: 80px; margin-top: 0.2em;'),
+ network_path(Conf.layouts['biovel']['network_id']) -%>
</div>
\ No newline at end of file
Modified: trunk/app/views/users/_breadcrumbs.rhtml (3467 => 3468)
--- trunk/app/views/users/_breadcrumbs.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/users/_breadcrumbs.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,4 +1,8 @@
-<li><%= link_to 'Users', users_path -%></li>
+<% if controller.action_name == 'index' %>
+ <li>Users</li>
+<% else %>
+ <li><%= link_to 'Users', users_path %></li>
+<% end %>
<% if ["edit"].include? controller.action_name.to_s -%>
<li><%= link_to h(@user.name), user_path(@user) -%></li>
Modified: trunk/app/views/users/show.rhtml (3467 => 3468)
--- trunk/app/views/users/show.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/users/show.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -232,7 +232,8 @@
<% filter_contributables(@user.contributions).each do |klass, contributables| %>
<p>
<b>
- <%= link_to(pluralize(Authorization.scoped(klass.constantize, :authorised_user => current_user).find(:all, :select => "0", :conditions => { :contributor_type => 'User', :contributor_id => @user.id } ).length, controller_visible_name(klass.humanize.pluralize)), url_for(:action ="" controller_visible_name(klass.humanize.pluralize).downcase)) %>
+ <%= link_to(pluralize(Authorization.scoped(klass.constantize, :authorised_user => current_user).find(:all, :select => "0", :conditions => { :contributor_type => 'User', :contributor_id => @user.id } ).length, controller_visible_name(klass.humanize.pluralize)),
+ currentusers_things_url(klass)) %>
</b>
</p>
<% end %>
Modified: trunk/app/views/workflows/_breadcrumbs.rhtml (3467 => 3468)
--- trunk/app/views/workflows/_breadcrumbs.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/workflows/_breadcrumbs.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,5 +1,14 @@
-<li><%= link_to 'Workflows', workflows_path %></li>
+<% if @context %>
+ <li><%= link_to visible_name(@context).pluralize, polymorphic_url(@context.class.name.underscore.pluralize) %></li>
+ <li><%= link_to @context.name, @context %></li>
+<% end %>
+<% if controller.action_name == 'index' %>
+ <li>Workflows</li>
+<% else %>
+ <li><%= link_to 'Workflows', workflows_path %></li>
+<% end %>
+
<% if ["show", "new", "edit", "search", "all", "new_version", "edit_version", "comments_timeline", "galaxy_tool"].include? controller.action_name.to_s %>
<% case controller.action_name.to_s; when "show" %>
<li><%= h(@workflow.title) %></li>
Modified: trunk/app/views/workflows/index.rhtml (3467 => 3468)
--- trunk/app/views/workflows/index.rhtml 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/app/views/workflows/index.rhtml 2013-03-05 15:47:45 UTC (rev 3468)
@@ -1,4 +1,4 @@
-<h1>Workflows</h1>
+<h1><%= context_prefix(@context) -%> Workflows</h1>
<%= render :partial => "content/index" -%>
Modified: trunk/config/routes.rb (3467 => 3468)
--- trunk/config/routes.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/config/routes.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -179,7 +179,7 @@
map.connect 'users/forgot_password', :controller => "users", :action ="" "forgot_password"
map.connect 'users/reset_password/:reset_code', :controller => "users", :action ="" "reset_password"
- [ 'news', 'friends', 'groups', 'workflows', 'files', 'packs', 'forums', 'credits', 'tags', 'favourites' ].each do |tab|
+ [ 'news', 'friends', 'groups', 'forums', 'credits', 'tags', 'favourites' ].each do |tab|
map.connect "users/:id/#{tab}", :controller => 'users', :action ="" tab
end
@@ -208,6 +208,11 @@
# user's reports of inappropriate content
user.resources :reports, :controller => :user_reports
+
+ # user's uploaded resources
+ user.resources :workflows, : :index
+ user.resources :blobs, : :index, :as => :files
+ user.resources :packs, : :index
end
map.resources :networks,
@@ -223,6 +228,11 @@
network.resources :group_announcements, :as => :announcements, :name_prefix => nil
network.resources :comments, :collection => { :timeline => :get }
network.resources :policies, :controller => 'group_policies'
+
+ # resources shared with network
+ network.resources :workflows, : :index
+ network.resources :blobs, : :index, :as => :files
+ network.resources :packs, : :index
end
# The priority is based upon order of creation: first created -> highest priority.
Modified: trunk/lib/pivoting.rb (3467 => 3468)
--- trunk/lib/pivoting.rb 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/lib/pivoting.rb 2013-03-05 15:47:45 UTC (rev 3468)
@@ -23,7 +23,11 @@
begin
expr = parse_filter_expression(opts[:params]["filter"], opts[:pivot_options], :active_filters => opts[:active_filters])
rescue Exception => ex
- problem = "Problem with query _expression_: #{ex}"
+ if Rails.env == "production"
+ problem = "Problem with query _expression_: #{ex}"
+ else
+ raise ex
+ end
end
pivot = contributions_list(opts[:params], opts[:user], opts[:pivot_options],
Modified: trunk/public/images/biovel.png
(Binary files differ)
Modified: trunk/public/stylesheets/biovel.css (3467 => 3468)
--- trunk/public/stylesheets/biovel.css 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/public/stylesheets/biovel.css 2013-03-05 15:47:45 UTC (rev 3468)
@@ -18,9 +18,8 @@
background-image: url('/images/sidebar_alpha.png');
}
-
.logo a {
- color: #99cc33;
+ color: #333;
}#
.logo a:hover {
@@ -35,18 +34,21 @@
/* To add a white margin around the content */
#doc2 {
- padding: 0 1em;
- border-color: #DFD96D;
- border-style: solid;
- border-width: 0 4px;
+ box-shadow: 0 0 16px 4px #7f793f;
}
#myexp_header {
- margin: 0em 0.5em;
+ margin: 0 0.5em;
}
-#hd
-{
- padding-top: 1em;
+#site_info_links {
+ display: none;
}
+.tabnav li.return_tab {
+ margin-right: 1em;
+}
+
+.tabnav li.return_tab a:hover {
+ background-color: #cd0b37;
+}
Modified: trunk/public/stylesheets/styles.css (3467 => 3468)
--- trunk/public/stylesheets/styles.css 2013-03-05 15:23:08 UTC (rev 3467)
+++ trunk/public/stylesheets/styles.css 2013-03-05 15:47:45 UTC (rev 3468)
@@ -128,12 +128,12 @@
#myexp_header {
padding-top: 1em;
- margin: 0 0.5em 0 0.5em;
+ margin: 0 0.5em 1em 0.5em;
+ overflow: auto;
}
.logo {
float: left;
- width: 300px;
}
.links {
@@ -144,15 +144,19 @@
#myexp_links
{
float: right;
- width: 600px;
font-size: 93%;
}
#site_info_links {
+ text-align: left;
+ float: left;
+ padding-top: 6px;
+ margin-right: 100px;
}
-/* margin: 0.5em 0; */
+
#user_links {
+ text-align: right;
float: right;
}
@@ -2336,6 +2340,7 @@
background-color: #F5F5F5;
padding: 0.5em;
margin-bottom: 0.5em;
+ overflow: auto;
}
.resource_list_item p {
@@ -2402,18 +2407,4 @@
font-weight: bold;
color: #333333;
font-size: 100%;
-}
-
-div.error {
- width: 500px;
- border: 2px solid #f44;
- padding-bottom: 1em;
- margin: 1em auto;
- text-align: center;
-}
-
-div.error h1 {
- color: white;
- background-color: #f44;
- margin-top: 0;
-}
+}
\ No newline at end of file