app/views/episodes/_file_buttons.html.haml
.btn-group.pull-right
-if can? :activate, episode
- if episode.active
- color = "green"
- link_target = '#'
- else
- link_target = activate_episode_path(episode)
= link_to(link_target, :title=>'Activate this hackweek?', :class=> "btn btn-default btn-xs") do
%i.fas.fa-check.fa-lg{style: "color: #{color}"}
- if can? :edit, episode
= link_to(edit_episode_path(episode), :title=>'Edit this hackweek?', :class=> "btn btn-default btn-xs") do
%i.fas.fa-wrench.fa-lg
-if can? :destroy, episode
= link_to(episode_path(episode), :title=>'Delete this hackweek?', :class=> "btn btn-default btn-xs", :method => :delete, data: { confirm: "Are you sure you want to delete this episode? This can't be undone!" }) do
%i.fas.fa-trash.fa-lg