- content_for :control_bar do
  #control-bar-container
    #control-bar
      %section
        %ul
          %li#control-bar-paper-journal-logo
            - if @paper.journal.logo.present?
              = image_tag @paper.journal.logo.url
            - else
              %div
                = @paper.journal.name
          -# %li#control-bar-paper-short-title{contenteditable: true, placeholder: 'Type your short title here'}
            = @paper.short_title
        %ul
          - if current_user.admin?
            %li= link_to 'Manuscript Manager', manage_paper_path(@paper)

%main
  %article{data: { 'paper-path' => paper_path(@paper, format: :json) } }
    #toolbar

    %div
      .title
        %h2#paper-title{contenteditable: true, placeholder: 'Type your manuscript title here'}
          = @paper.title

      #paper-abstract{contenteditable: true, placeholder: 'Type your abstract here'}
        = @paper.abstract.html_safe

      - task = Task.where(title: "Add Authors", phase: @paper.phases.where(name: 'Submission Data').first).first
      #paper-authors.editable{class: "#{'completed' if task.completed?}", data: { 'card-name' => "authors", 'paper-title' => truncated_title(@paper), 'paper-path' => paper_path(@paper), 'paper-id' => @paper.to_param, 'task-path' => task_path(task), authors: task.authors.to_json, 'refresh-on-close' => false }}

      #paper-body.editable{contenteditable: true, placeholder: 'Type the body of your manuscript here'}
        = @paper.body.html_safe

  %aside
    %div
      - author_tasks = Task.where(role: 'author', phase: @paper.phases.where(name: 'Submission Data').first)
      - assigned_tasks = @tasks - author_tasks
      - unless assigned_tasks.empty?
        %ul.assigned-tasks.cards
          %ul.cards
            - assigned_tasks.each do |task|
              %li= card task

      - task = author_tasks.detect { |t| t.title == 'Upload Manuscript' }
      = card task

      - task = author_tasks.detect { |t| t.title == 'Add Authors' }
      = card task

      - task = author_tasks.detect { |t| t.title == 'Upload Figures' }
      = card task

      - task = author_tasks.detect { |t| t.title == 'Enter Declarations' }
      = card task

      %hr
      = link_to 'Submit', new_paper_submission_path(@paper), class: 'primary-button wide-button'


%main
  %aside
    %div
      = link_to 'Submit', new_paper_submission_path(@paper), class: 'primary-button wide-button'

Remove paper edit template content.
Remove paper edit template content.
