Skip to content

Commit 1882e61

Browse files
ipweblabVidas P
authored andcommitted
Small bug fix: Hide agent show button when we are in show page already
1 parent 751b7a8 commit 1882e61

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/assets/stylesheets/agent.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ body.agents .modal pre {
282282
}
283283
}
284284

285+
.container.agent-show {
286+
.agents-top-nav .btn.show-agent {
287+
display: none;
288+
}
289+
}
285290

286291
// Imports
287292

app/views/agents/_nav.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="row">
22
<div class="col-md-12">
3-
<div>
3+
<div class="agents-top-nav">
44
<% (agent&.workflows || [current_workflow].compact).each do |workflow| %>
55
<%= link_to icon_tag('fa-chevron-left') + ' '+ workflow_label(workflow), workflow, class: "btn btn-primary btn-sm #{current_workflow == workflow ? 'current-workflow' : '' }" %>
66
<% end %>
77
<%= link_to icon_tag('fa-chevron-left') + ' All Agents'.html_safe, agents_path, class: "btn btn-primary btn-sm" %>
88
<% if agent.present? %>
9-
<%= link_to icon_tag('fa-asterisk') + ' Show', agent_path(agent, params: { workflow_id: current_workflow&.id }), class: "btn btn-primary btn-sm" %>
9+
<%= link_to icon_tag('fa-asterisk') + ' Show', agent_path(agent, params: { workflow_id: current_workflow&.id }), class: "btn btn-primary btn-sm show-agent" %>
1010
<% end %>
1111
</div>
1212
</div>

0 commit comments

Comments
 (0)