diff --git a/app/helpers/plans_helper.rb b/app/helpers/plans_helper.rb index bff80a5..3b9b21b 100644 --- a/app/helpers/plans_helper.rb +++ b/app/helpers/plans_helper.rb @@ -101,4 +101,16 @@ return access end + # display the visibility of the plan + def display_visibility(val) + case val + when 0 + return 'My Org.' + when 1 + return 'Public' + else + return 'Private' # Both Test and Private + end + end + end diff --git a/app/views/plans/_plan_list_head.html.erb b/app/views/plans/_plan_list_head.html.erb deleted file mode 100644 index 6b05f86..0000000 --- a/app/views/plans/_plan_list_head.html.erb +++ /dev/null @@ -1,6 +0,0 @@ - - <% ['name', 'owner', 'shared', 'last_edited'].each do |column| %> - <%= plan_list_column_heading(column) %> - <% end %> - <%= _('Select an action')%> - diff --git a/app/views/plans/_plan_list_item.html.erb b/app/views/plans/_plan_list_item.html.erb deleted file mode 100644 index 05e6bcd..0000000 --- a/app/views/plans/_plan_list_item.html.erb +++ /dev/null @@ -1,29 +0,0 @@ - - <% ['name', 'owner', 'shared', 'last_edited'].each do |column| %> - <%= plan_list_column_body(column, plan) %> - <% end %> - - <% if plan.editable_by?(current_user.id) then %> - <%= link_to _('Edit'), plan_path(plan), :class => "dmp_table_link"%> - - <% if plan.administerable_by?(current_user.id) then %> - <%= link_to _('Share'), share_plan_path(plan), :class => "dmp_table_link"%> - <% end %> - - <%= link_to _('Export'), show_export_plan_path(plan), :class => "dmp_table_link"%> - - <%= link_to _('Duplicate'), duplicate_plan_path(plan), method: :post, remote: true, :class => "dmp_table_link"%> - - <% if plan.owned_by?(current_user.id) then %> - <%= link_to _('Delete'), plan_path(plan), :class => "dmp_table_link", - :method => :delete, :data => { - :confirm => _('Are you sure you wish to delete this plan? If the plan is being shared with other users, by deleting it from your list, the plan will be deleted from their plan list as well') - }%> - <% end %> - <% else %> - <%= link_to _('View'), plan_path(plan), :class => "dmp_table_link"%> - <%= link_to _('Export'), show_export_plan_path(plan), :class => "dmp_table_link"%> - <% end %> - - - diff --git a/app/views/plans/index.html.erb b/app/views/plans/index.html.erb index 47cdfd2..517b17f 100644 --- a/app/views/plans/index.html.erb +++ b/app/views/plans/index.html.erb @@ -14,12 +14,50 @@ <%= render(partial: "toolbar") %> - <%= render(partial: "plan_list_head") %> + + + + + + + - <% @plans.each do |plan| %> - <%= render(partial: "plan_list_item", locals: { plan: plan } ) %> - <% end %> + <% @plans.each do |plan| %> + + + + + + + + + + <% end %>
<%= _('Plan') %><%= _('Template') %><%= _('Edited') %><%= _('Role') %><%= _('Visibility') %><%= _('Test') %><%= _('Select an Action') %>
<%= plan.title %><%= plan.template.title %><%= l(plan.latest_update.to_date, formats: :short) %><%= display_role(plan.roles.find_by(user: current_user)) %><%= display_visibility(plan.visibility) %> + /> + + <% if plan.editable_by?(current_user.id) then %> + <%= link_to _('Edit'), plan_path(plan), :class => "dmp_table_link"%> + + <% if plan.administerable_by?(current_user.id) then %> + <%= link_to _('Share'), share_plan_path(plan), :class => "dmp_table_link"%> + <% end %> + + <%= link_to _('Export'), show_export_plan_path(plan), :class => "dmp_table_link"%> + + <%= link_to _('Duplicate'), duplicate_plan_path(plan), method: :post, remote: true, :class => "dmp_table_link"%> + + <% if plan.owned_by?(current_user.id) then %> + <%= link_to _('Delete'), plan_path(plan), :class => "dmp_table_link", + :method => :delete, :data => { + :confirm => _('Are you sure you wish to delete this plan? If the plan is being shared with other users, by deleting it from your list, the plan will be deleted from their plan list as well') + }%> + <% end %> + <% else %> + <%= link_to _('View'), plan_path(plan), :class => "dmp_table_link"%> + <%= link_to _('Export'), show_export_plan_path(plan), :class => "dmp_table_link"%> + <% end %> +
diff --git a/lib/assets/stylesheets/roadmap.scss b/lib/assets/stylesheets/roadmap.scss index b41c792..df82101 100644 --- a/lib/assets/stylesheets/roadmap.scss +++ b/lib/assets/stylesheets/roadmap.scss @@ -85,4 +85,18 @@ border-bottom: 0px; margin-bottom: 20px; table-layout: fixed; + + .col-tiny { + min-width: 50px; + } + .col-small { + min-width: 100px; + } + .col-medium { + min-width: 150px; + } + th.col-large { + min-width: 200px; + width: 30%; + } }