Project

General

Profile

Actions

Bug #15464

closed

Pagelets should be keyed by the partial they appear on

Added by Shimon Shtein over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Plugin integration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Now the key is "#{controller}/#{action}" which forces people that want to use this extension point to know the actions the partial is used in.

For example:
assume a pagelet placeholder in hosts/_form.html.erb:

render_pagelets_for(:main_tab_fields, :host => @host, :form => f)

In order to add content to this pagelet, you have to register your pagelet for multiple actions:

    %w(hosts/new hosts/edit hosts/process_hostgroup).each do |action|
      mgr = Pagelets::Manager.new action
      mgr.add_pagelet :main_tab_fields,
      :partial => 'hosts/puppet/main_tab_fields',
      :priority => 100
    end

Related issues 1 (0 open1 closed)

Related to Foreman - Feature #12716: As a foreman developer I'd like to have way of extending the data returned from smart proxy api.ClosedOndřej Pražák12/07/2015Actions
Actions

Also available in: Atom PDF