Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Jul 10, 2024
1 parent 7170a13 commit 036da0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions app/views/decidim/vocdoni/admin/elections/publish_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
<h4 class="h4 my-4"><%= t("publish_title", scope: "decidim.vocdoni.admin.elections.new") %></h4>
<%= t("publish_text_all_done_html", scope: "decidim.vocdoni.admin.elections.new") %>
</div>
<div class="card-section">
<div class="mt-l">
<%= link_to election_steps_path(election), class: "button button__sm button__secondary" do %>
<%= icon "check-double-line", role: "img", "aria-hidden": true %>
<%= t("next_button", scope: "decidim.vocdoni.admin.elections.new") %>
<% end %>
</div>
</div>
<% else %>
<div class="publish-text">
<%= t("publish_text_html", scope: "decidim.vocdoni.admin.elections.new") %>
Expand All @@ -32,12 +24,19 @@

<% if election.published? %>
<% if allowed_to?(:unpublish, :election, election: election) %>
<%= render "decidim/vocdoni/admin/shared/next_wizard_step", path: url_for(action: :unpublish, id: election, controller: "elections") %>
<%= link_to url_for(action: :unpublish, id: election, controller: "elections"), class: "button button__sm button__secondary", method: :put do %>
<%= icon "close-line", role: "img", "aria-hidden": true %>
<%= t("actions.unpublish", scope: "decidim.vocdoni") %>
<% end %>
<% end %>
<% else %>
<% if allowed_to?(:publish, :election, election: election) %>
<%= render "decidim/vocdoni/admin/shared/next_wizard_step", path: url_for(action: :publish, id: election, controller: "elections") %>
<%= link_to url_for(action: :publish, id: election, controller: "elections"), class: "button button__sm button__secondary", method: :put do %>
<%= icon "check-line", role: "img", "aria-hidden": true %>
<%= t("actions.publish", scope: "decidim.vocdoni") %>
<% end %>
<% end %>
<% end %>

<%= render "decidim/vocdoni/admin/shared/next_wizard_step", path: election_steps_path(election) %>
<%= append_javascript_pack_tag "decidim_vocdoni_admin" %>
2 changes: 1 addition & 1 deletion spec/system/decidim/admin/election_setup_wizard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
end

it "redirects to the steps dashboard" do
expect(page).to have_content("Steps dashboard")
expect(page).to have_content("Voting control dashboard")
end
end
end
Expand Down

0 comments on commit 036da0e

Please sign in to comment.