Add progress tab as initial page on Dashboard.
This commit is contained in:
@@ -9,10 +9,10 @@ class DashboardController < Dashboard::BaseController
|
||||
authorize! :publish, proposal
|
||||
|
||||
proposal.publish
|
||||
redirect_to proposal_dashboard_path(proposal), notice: t('proposals.notice.published')
|
||||
redirect_to progress_proposal_dashboard_path(proposal), notice: t("proposals.notice.published")
|
||||
end
|
||||
|
||||
def progress
|
||||
|
||||
def progress
|
||||
authorize! :dashboard, proposal
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ class DashboardController < Dashboard::BaseController
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
def active_resources
|
||||
@active_resources ||= Dashboard::Action.active.resources.order(required_supports: :asc, day_offset: :asc)
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<% if can?(:dashboard, @proposal) %>
|
||||
<%= link_to t("proposals.created.dashboard"),
|
||||
proposal_dashboard_path(@proposal),
|
||||
progress_proposal_dashboard_path(@proposal),
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</p>
|
||||
<div class="small-12 medium-6 large-4 column small-centered">
|
||||
<%= link_to t("proposals.share.dashboard"),
|
||||
proposal_dashboard_path(@proposal), class: "button expanded" %>
|
||||
progress_proposal_dashboard_path(@proposal), class: "button expanded" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("proposals.show.author") %></h2>
|
||||
<div class="show-actions-menu">
|
||||
<%= link_to proposal_dashboard_path(@proposal),
|
||||
<%= link_to progress_proposal_dashboard_path(@proposal),
|
||||
class: 'button hollow expanded',
|
||||
id: "proposal-dashboard-#{@proposal.id}" do %>
|
||||
<span class="icon-edit"></span>
|
||||
@@ -218,4 +218,4 @@
|
||||
|
||||
<%= render "proposals/notifications" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<% elsif can?(:dashboard, proposal) %>
|
||||
<td>
|
||||
<%= link_to t("proposals.show.dashboard_proposal_link"),
|
||||
proposal_dashboard_path(proposal), class: "button hollow expanded" %>
|
||||
progress_proposal_dashboard_path(proposal), class: "button hollow expanded" %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td class="text-center">
|
||||
|
||||
@@ -442,7 +442,10 @@ feature 'Proposals' do
|
||||
expect(page.html).not_to include "<script>alert('hey')</script>"
|
||||
|
||||
click_link 'Dashboard'
|
||||
click_link 'Edit proposal'
|
||||
within "#side_menu" do
|
||||
click_link "My proposal"
|
||||
end
|
||||
click_link "Edit proposal"
|
||||
|
||||
expect(page).to have_current_path(edit_proposal_path(Proposal.last))
|
||||
expect(page).not_to have_link('click me')
|
||||
@@ -515,10 +518,12 @@ feature 'Proposals' do
|
||||
|
||||
visit user_path(proposal.author)
|
||||
within("#proposal_#{proposal.id}") do
|
||||
click_link 'Dashboard'
|
||||
click_link "Dashboard"
|
||||
end
|
||||
|
||||
click_link 'Retire proposal'
|
||||
within "#side_menu" do
|
||||
click_link "My proposal"
|
||||
end
|
||||
click_link "Retire proposal"
|
||||
|
||||
expect(page).to have_current_path(retire_form_proposal_path(proposal))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user