Skip to content

Commit

Permalink
[webui] simplify request_show_path usage
Browse files Browse the repository at this point in the history
(and fix one wrong redirection)
  • Loading branch information
adrianschroeter committed May 23, 2016
1 parent 33d38e5 commit 9672ab3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -33,7 +33,7 @@
<% rqs_in = BsRequest.list_ids(roles: %w(target), states: %w(new review), project: incident.name) %>
<% if rqs_in.count > 0 %>
<% if rqs_in.count == 1 %>
<% path = request_show_path(id: rqs_in.first) %>
<% path = request_show_path(rqs_in.first) %>
<% else %>
<% path = project_requests_path(project: incident.name) %>
<% end %>
Expand All @@ -45,7 +45,7 @@
<% BsRequest.where(id: rqs_out).order('bs_requests.number').each do |rq_out| %>
<% text = "Release request in state '#{rq_out['state']}'" %>
<%= link_to(sprite_tag(map_request_state_to_flag(rq_out['state'].to_s), title: text),
request_show_path(number: rq_out["number"])) %>
request_show_path(rq_out["number"])) %>
<% end %>
<% else %>
<% if incident.is_locked? %>
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/views/webui/request/show.html.erb
Expand Up @@ -8,10 +8,10 @@

<div id="request_navigation_box" style="position: absolute; right: 0.3em;">
<% if @request_before -%>
<%= link_to '<<', request_show_path(number: @request_before) %>
<%= link_to '<<', request_show_path(@request_before) %>
<% end -%>
<% if @request_after -%>
<%= link_to '>>', request_show_path(number: @request_after) %>
<%= link_to '>>', request_show_path(@request_after) %>
<% end -%>
</div>

Expand Down

0 comments on commit 9672ab3

Please sign in to comment.