Class: Decidim::ReportButtonCell
- Inherits:
-
ButtonCell
- Object
- ViewModel
- ButtonCell
- Decidim::ReportButtonCell
- Includes:
- ActionView::Helpers::FormOptionsHelper
- Defined in:
- app/cells/decidim/report_button_cell.rb
Constant Summary
Constants inherited from ButtonCell
ButtonCell::DEFAULT_ATTRIBUTES
Instance Method Summary collapse
Methods inherited from ButtonCell
Methods included from ResourceHelper
#linked_classes_filter_values_for, #linked_classes_for, #resource_locator
Instance Method Details
#flag_modal ⇒ Object
7 8 9 10 11 |
# File 'app/cells/decidim/report_button_cell.rb', line 7 def flag_modal return render :already_reported_modal if model.reported_by?(current_user) render end |
#frontend_administrable? ⇒ Boolean
13 14 15 16 17 |
# File 'app/cells/decidim/report_button_cell.rb', line 13 def frontend_administrable? user_entity? && model.can_be_administered_by?(current_user) && (model.respond_to?(:official?) && !model.official?) end |