Welcome, Guest
Username: Password: Remember me

TOPIC:

J3+Styling - Backend - Attendees view 7 years 3 months ago #20480

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Descripion part above the filter

That will involve a bit more work to be done.

Was thinking: maybe it would be good to relocate the buttons for export/print to the toolbar so maybe I'l tell a bit about that at a later time. The eventid needed is stored in a input field so maybe we can catch that in a function, we can add custom task to the view.html.php so would say it should be possible.

Doing so you will have more room to display information about the event and other details what you want to be displayed.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

Please Log in or Create an account to join the conversation.

Last edit: by Bluefox.

J3+Styling - Backend - Attendees view 7 years 3 months ago #20483

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Print button to Toolbar

It's possible to move the print-link to the toolbar so let's try it.

File .../administrator/components/com_jem/views/attendees/view.html.php
Find: function "protected function addtoolbar"

Add
$eventid 	= $this->event->id;
$link_print = 'index.php?option=com_jem&view=attendees&layout=print&tmpl=component&id='.$eventid;
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', 'print', 'COM_JEM_PRINT', $link_print, 600, 300);	

Doing so we added the toolbar button but then we have to address the tmpl file.
File: .../administrator/components/com_jem/views/attendees/tmpl/default.php

Remove
<div class="button2-left"><div class="blank"><a title="<?php echo JText::_('COM_JEM_PRINT'); ?>" onclick="window.open('index.php?option=com_jem&amp;view=attendees&amp;layout=print&amp;tmpl=component&amp;id=<?php echo $this->event->id; ?>', 'popup', 'width=750,height=400,scrollbars=yes,toolbar=no,status=no,resizable=yes,menubar=no,location=no,directories=no,top=10,left=10')"><?php echo JText::_('COM_JEM_PRINT'); ?></a></div></div>

In the attached image you can see what the result will be.
(The export+mail buttons are there to but that will be for later)

//
For some kind of reason the JToolBarHelper::divider(); doesn't seem to be working but that's for later
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Bluefox.

J3+Styling - Backend - Attendees view 7 years 3 months ago #20484

do you mean protected function addToolbar()
?

Please Log in or Create an account to join the conversation.

J3+Styling - Backend - Attendees view 7 years 3 months ago #20485

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Description part above table

When the buttons for print+export have been relocated there will be some room to display things relevant for the current event.
At the moment it's displaying date + Event-Title but maybe a quick summary of Total attendees would be nice to have. Think you will be able to add/change this part yourself so won't describe it.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

Please Log in or Create an account to join the conversation.

J3+Styling - Backend - Attendees view 7 years 3 months ago #20486

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493

jojo12 wrote: do you mean protected function addToolbar()
?


yes i meant that one (thx for the note)
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

J3+Styling - Backend - Attendees view 7 years 3 months ago #20487

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Export to Toolbar

File: ..../administrator/components/com_jem/views/attendees/view.html.php
Find: function "protected function addToolbar()"

Add
JToolBarHelper::custom('attendees.export', 'download', 'download', JText::_('COM_JEM_EXPORT'), false);
"download" will create an icon-download class but if you want you can also change it to export so it will create an icon-export. In that case you need to modify the css a bit to display a CSV/XLS icon or something like that.


File: ..../administrator/components/com_jem/views/attendees/tmpl/default.php
Remove this code
<td width="20%">
				<div class="button2-left"><div class="blank"><a title="<?php echo JText::_('COM_JEM_CSV_EXPORT'); ?>" onclick="window.open('index.php?option=com_jem&amp;task=attendees.export&amp;tmpl=raw&amp;id=<?php echo $this->event->id; ?>')"><?php echo JText::_('COM_JEM_CSV_EXPORT'); ?></a></div></div>
			</td>
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

Please Log in or Create an account to join the conversation.

Time to create page: 0.451 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......