cirandas.net

ref: master

plugins/diagramo/lib/diagramo_plugin.rb


 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
28
class DiagramoPlugin < Noosfero::Plugin

  def self.plugin_name
    "Integração com o diagramo"
  end

  def self.plugin_description
    "Um novo conteúdo que integra o diagramo"
  end

  def content_types
    [DiagramoPlugin::Diagram]
  end

  def stylesheet?
    true
  end

  def article_toolbar_actions article
    user = context.send :user
    return unless user and user.is_admin? environment
    return unless article.folder?
    lambda do
      render 'content_viewer/diagramo_plugin/new_diagram_button', :article => article
    end
  end

end