logic update | removed automatic redirection

This commit is contained in:
Giga Chubinidze 2022-12-06 22:06:34 +04:00
parent 082745a3dc
commit c9a6af8de4
2 changed files with 1 additions and 2 deletions

View file

@ -89,7 +89,6 @@ class ExperimentsController < ApplicationController
end end
def table def table
redirect_to module_archive_experiment_path(@experiment) if @experiment.archived_branch?
view_state = @experiment.current_view_state(current_user) view_state = @experiment.current_view_state(current_user)
view_mode = params[:view_mode] || 'active' view_mode = params[:view_mode] || 'active'
@current_sort = view_state.state.dig('my_modules', view_mode, 'sort') || 'atoz' @current_sort = view_state.state.dig('my_modules', view_mode, 'sort') || 'atoz'

View file

@ -50,7 +50,7 @@
<% end %> <% end %>
<% if (action_name == 'module_archive' || params[:view_mode] == 'archived') %> <% if (action_name == 'module_archive' || params[:view_mode] == 'archived') %>
<% unless @experiment.my_modules.active.count.zero? %> <% unless @experiment.archived_branch? %>
<div role="separator" class="divider"></div> <div role="separator" class="divider"></div>
<li> <li>
<%= link_to action_name == 'table' ? table_experiment_path(@experiment) : canvas_experiment_path(@experiment) do %> <%= link_to action_name == 'table' ? table_experiment_path(@experiment) : canvas_experiment_path(@experiment) do %>