zammad/zammad

View on GitHub
app/assets/javascripts/app/controllers/_application_controller/sub_content.coffee

Summary

Maintainability
Test Coverage
class App.ControllerSubContent extends App.Controller
  constructor: ->
    if @constructor.requiredPermission
      @permissionCheckRedirect(@constructor.requiredPermission)

    super

  show: =>
    if @genericController && @genericController.show
      @genericController.show()
    return if !@header
    @title @header, true

  hide: =>
    if @genericController && @genericController.hide
      @genericController.hide()