mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-04 02:45:53 +08:00
fixed layout
This commit is contained in:
parent
d16c0fe706
commit
c11932b45b
3 changed files with 10 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
class CanvasController < ApplicationController
|
||||
before_action :load_vars
|
||||
|
||||
# before_action :check_view_canvas, only: [:edit, :full_zoom, :medium_zoom, :small_zoom]
|
||||
# before_action :check_edit_canvas, only: [:edit, :update]
|
||||
before_action :check_view_canvas, only: [:edit, :full_zoom, :medium_zoom, :small_zoom]
|
||||
before_action :check_edit_canvas, only: [:edit, :update]
|
||||
|
||||
def edit
|
||||
render partial: 'canvas/edit',
|
||||
|
|
|
@ -3,6 +3,9 @@ class ExperimentsController < ApplicationController
|
|||
before_action :set_experiment, except: [:new, :create]
|
||||
before_action :set_project, only: [:new, :create]
|
||||
|
||||
# except parameter could be used but it is not working.
|
||||
layout :choose_layout
|
||||
|
||||
def new
|
||||
@experiment = Experiment.new
|
||||
end
|
||||
|
@ -68,4 +71,8 @@ class ExperimentsController < ApplicationController
|
|||
def experiment_params
|
||||
params.require(:experiment).permit(:name, :description, :archived)
|
||||
end
|
||||
|
||||
def choose_layout
|
||||
action_name.in?(['index', 'archive']) ? 'main' : 'fluid'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= content_for :sidebar do %>
|
||||
<div id="slide-panel" class="visible">
|
||||
|
||||
<div class="sidebar-header">
|
||||
|
|
Loading…
Add table
Reference in a new issue