diff --git a/app/views/admin/hackathons/show.html.erb b/app/views/admin/hackathons/show.html.erb index 37e989b2..a09a8d16 100644 --- a/app/views/admin/hackathons/show.html.erb +++ b/app/views/admin/hackathons/show.html.erb @@ -93,13 +93,9 @@
- <% if @hackathon.pending? %> - <%= button_to "Approve", admin_hackathon_approval_path(@hackathon), class: "button--success" %> - <%= button_to "Reject", admin_hackathon_rejection_path(@hackathon), class: "button--danger" %> - <% end %> - <% unless @hackathon.pending? %> - <%= button_to "Hold for review", admin_hackathon_hold_path(@hackathon), class: "button--neutral" %> - <% end %> + <%= button_to "Approve", admin_hackathon_approval_path(@hackathon), disabled: @hackathon.approved?, class: "button--success" %> + <%= button_to "Reject", admin_hackathon_rejection_path(@hackathon), disabled: @hackathon.rejected?, class: "button--danger" %> + <%= button_to "Hold for review", admin_hackathon_hold_path(@hackathon), disabled: @hackathon.pending?, class: "button--neutral" %>
<%= render "events/timeline", {eventable: @hackathon} %>