Can we change list plugin buttons location?

Jaanus

Super Moderator
The headings part in list view seems to be very hardcoded - I couldn't find out how could I move the list plugin buttons from the rightest column to another place, i.e. near group by, pdf, csv buttons or perhaps inside a possible additional <tr></tr> inside <thead>. If we still can do it somehow I would be very thankful for ideas. The view below looks very ugly, isn't it?
Hmm, and the ability to use text instead of (or near) icons would be very nice :)

upload_2016-6-27_12-23-47.png
 

Attachments

  • upload_2016-6-27_12-22-27.png
    upload_2016-6-27_12-22-27.png
    155.1 KB · Views: 291
Create a custom list template, move $this->loadTemplate('buttons'); (in default.php) and/or edit default_buttons.php
 
I did it, but not sure is it the best way. See the list plugin buttons above the list data:

upload_2016-6-28_10-7-51.png

What I did:

in default_headings.php I added
PHP:
foreach ($this->headings as $key => $heading) :
    $h = $this->headingClass[$key];
   
    if (strstr($heading, 'listplugin')): ?>
    <div style="text-align: right;">
    <?php echo $heading;?>
    </div>
<?php endif; ?>
<?php endforeach; ?>
and changed respectively the original code
PHP:
<tr class="fabrik___heading">
<?php 
echo $this->rowNumHeader;
foreach ($this->headings as $key => $heading) :
    $h = $this->headingClass[$key];
   
    $style = empty($h['style']) ? '' : 'style="' . $h['style'] . '"';?>
    <th class="heading <?php echo $h['class']?>" <?php echo $style?>>
            <?php    
            if (!strstr($heading, 'listplugin')):
                echo $heading; 
                endif; 
            ?>
    </th>
<?php endforeach; ?>
</tr>

Additionally, to make button labels always visible I made so far this change in models/plugin-list.php (function button_result())
PHP:
           $text = $label;
//       instead of
//      $text = $this->buttonAction == 'dropdown' ? $label : '<span class="hidden">' . $label . '</span>';
but this needs obviously another approach (i.e show label text option in list plugin settings)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top