Project

General

Profile

Bug #15464

Pagelets should be keyed by the partial they appear on

Added by Shimon Shtein about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Plugin integration
Target version:
Difficulty:
Triaged:
Bugzilla link:
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

Related to Foreman - Feature #12716: As a foreman developer I'd like to have way of extending the data returned from smart proxy api.Closed2015-12-07

Associated revisions

Revision 49cfbd45 (diff)
Added by Ondřej Pražák about 4 years ago

Fixes #15464 - support partials in pagelet keys

Pagelets will be keyed as "#{controller}/#{partial_name}". This
removes a necessity to register a pagelet multiple times if a
partial is reused for different actions.

History

#1 Updated by Dominic Cleal about 4 years ago

  • Category set to Plugin integration

#2 Updated by Dominic Cleal about 4 years ago

  • Related to Feature #12716: As a foreman developer I'd like to have way of extending the data returned from smart proxy api. added

#3 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ondřej Pražák
  • Pull request https://github.com/theforeman/foreman/pull/3608 added

#4 Updated by Ondřej Pražák about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal about 4 years ago

  • Legacy Backlogs Release (now unused) set to 160

Also available in: Atom PDF