Note that there are some explanatory texts on larger screens.

plurals
  1. PORails Admin modify list/show view to add new/customized column
    primarykey
    data
    text
    <p>I have setup the rails_admin for the admin interface of my site.</p> <p>For one of the Model, I want to display an additional column.</p> <p>say i have name , phone , email, image url, rank etc attributes in my Model(say Student). Then I have to display columns : <strong>Name | Rank | Preview(additional column)</strong></p> <p>In the preview column i want to display some rendered html on the basis of attributes ( email,image,url etc.) for each 'student'.</p> <p>I have found the way to include a partial for edit/update/create to provide fields/forms as per our partial. But the same implementation of including partial is failing in list/show. </p> <p>So is there any way I can add the partial to show rendered content, in list/show view for a model...?</p> <p><strong>Edit: Code added</strong></p> <pre><code>config.model Utility do list do field :code field :priority field :name field :url field :phone field :logo field :content sort_by :priority items_per_page 100 end end </code></pre> <p>This shows up following columns in <strong>rails_admin</strong></p> <p><strong>Code | Priority | Name | Url | Phone | Logo | Content</strong></p> <p>what i want is <strong>Code | Priority | Preview</strong></p> <p>in which in Preview column i want to show a html rendering content as :</p> <p><em>blah.html (just for e.g. html for example , here i want to render in a way it is displayed in one of pages, so it is presentable for admin view too)</em></p> <pre><code>&lt;div class="blah"&gt; &lt;%=util.name%&gt; &lt;%=util.phone%&gt; &lt;%=util.logo%&gt; #usage with proper divs/tags/rendering &lt;/div &gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload