spree / deface

Rails plugin that allows you to customize ERB views in a Rails application without editing the underlying view.
MIT License
517 stars 128 forks source link

Use Deface for refresh notes in Redmine #222

Open DolezalDavid opened 3 years ago

DolezalDavid commented 3 years ago

Hi all, I'm trying use Deface for refreshing notes in Redmine via timer.

How it work on issue list (index):

Deface::Override.new :virtual_path  => 'issues/index',
                     :original      => '402b3096154c5706049c1de2f9fedeaa63f6b618',
                     :name          => 'add-refresh-link-to-issues-list',
                     :insert_top    => 'div.contextual',
                     :partial       => 'redmine_refresh/refresher'

But I don't know how to do it for notes, because notes are not selfstanding.

Issue has everytime different number (so I think the hash of :origin will be differetn also). /issues/2314

and for me will be nice something like this:

Deface::Override.new :virtual_path  => 'issues/<number_of_issue?tab=notes',
                     :original      => '<hash>',
                     :name          => 'add-refresh-link-to-issues-list',
                     :insert_top    => 'div.contextual',
                     :partial       => 'redmine_refresh/refresher'

Any idea how to do this? :-)

Thanks for help

David