Software Público Brasileiro
Portal do

Software Público Brasileiro

  • Cadastre-se
  • Entrar
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 61
  • Merge Requests 0
  • Wiki
  • noosfero
  • plugins
  • metadata
  • lib
  • metadata_plugin
  • controllers.rb
  • 18ac7d64   profile-activities: generate and filter private notifications ... Browse Code »
    Notifications of private profiles or provite contents were not being
    generated. This patch generates these notifications and filter
    activities being displayed to the user according to her/his permissions.
    
    Making this work through pure sql is just too complex. It was needed to
    filter results after pagination, for performance reasons, and perform
    some workarounds to not mess with the paginated results.
    
    PS: Also refactoring presenters infra
    Rodrigo Souto
    2016-09-06 14:29:41 -0300  
controllers.rb 408 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
class MetadataPlugin::Controllers

  def manage_products
    :@product
  end

  def content_viewer
    lambda do
      if profile and @page and profile.home_page_id == @page.id
        @profile
      elsif @page.respond_to? :encapsulated_instance
        @page.encapsulated_instance
      else
        @page
      end
    end
  end

  def profile
    :@profile
  end

  def home
    :@environment
  end

end
Voltar para o topo
Assuntos
Publique seu software
Prestadores de serviço
Espaços dos municípios
Software Público
Entenda o que é
Eventos
Prêmios
Publicações
Serviços
FAQ
Contato
Relatar erros
RSS
O que é?
Assine
Navegação
Acessibilidade
Mapa do site

Desenvolvido com os projetos de software livre Colab, Gitlab, Mailman e Noosfero