rails_admin_content_builder icon indicating copy to clipboard operation
rails_admin_content_builder copied to clipboard

Link form the model

Open luizpicolo opened this issue 8 years ago • 2 comments

The link to the news should be modified as the user's needs. Today the link is fixed by the name of 'noticias', but it could be anything, 'Blog', "Texts". We should have a way so that the route could follow the name defined in the model. Example:

If model is Blog

element += '<a href="/blog/' + ui.item.content_builder_category.slug + '/' + ui.item.slug + '" class="cb-relational__link" target="blank"></a>';

if model is Text

element += '<a href="/texts/' + ui.item.content_builder_category.slug + '/' + ui.item.slug + '" class="cb-relational__link" target="blank"></a>';

of course, all dynamically without changing the name manually https://github.com/luizpicolo/rails_admin_content_builder/blob/master/app/assets/javascripts/rails_admin/content_builder.js.erb#L468

luizpicolo avatar Sep 28 '16 11:09 luizpicolo

I'll try, if you don't mind

DearGrenadier avatar Oct 09 '16 20:10 DearGrenadier

Hey my friend @dimanazarchuk, go ahead 👍

luizpicolo avatar Oct 10 '16 00:10 luizpicolo