Hi,
I'm trying to do the same thing except that i need a new button in the Account module (trying to be as most possible upgrade safe).
Here is what did :
- Copy include/mvc/views/views/view.list.php in custom/modules/Accounts/view/view.list.php
- Copy include/listview/listviewsmarty.php in custom/modules/Accounts/listviewsmarty.php
- Copy include/listview/listviewdisplay.php in custom/modules/Accounts/listviewdisplay.php
- Copy include/listview/listviewpagination.tpl in custom/modules/Accounts/tpls/listviewpagination.tpl
Modifications to files copied in the custom directoy :
- view.list.php : Changed the require_once for listviewsmarty. php to the new path.
- listviewsmarty.php : Changed the require_once for listviewdisplay. php to the new path.
added PHP Code:
$this->ss->assign('printLink', $this->buildPrintLink());
just after the buildComposeEmailLingk() call
- listviewDisplay : Added the buildPrintLink() function in order to display my button
PHP Code:
function buildPrintLink() {
global $app_strings;
$string = '<input class="button" type="button" value="Imprimer" onclick="<script>alert(\'Test Impression\');</script>">';
return $string;
}
- listviewpagination.tpl : added {$printLink} just after {$composeEmailLink} (line 52)
Unfortunately it doesn't work. I'm sure i missed something but i can't see what for now. Maybe i don't place files in the good directory (i have doubts for the .tpl but when i modify the original one in the same way, it still doesn't work).
If someone have an idea .... Thanks by advance.
Bookmarks