Class: Decidim::TosPageCell

Inherits:
ViewModel
  • Object
show all
Includes:
Cell::ViewModel::Partial, SanitizeHelper
Defined in:
decidim-core/app/cells/decidim/tos_page_cell.rb

Overview

This cell renders specific partials for the ‘terms_and_conditions` StaticPage the `model` is the partial to render

  • :announcement, the TOS updated announcement when redirected to the TOS page.

  • :sticky_form, the Accept updated TOS form in the TOS page.

  • :refuse_btn_modal, the Modal with info when refusing the updated TOS.

Instance Method Summary collapse

Instance Method Details

#showObject



15
16
17
18
19
20
21
# File 'decidim-core/app/cells/decidim/tos_page_cell.rb', line 15

def show
  return if model.nil?
  return unless current_user
  return if current_user.tos_accepted?

  render model
end