Example #1
0
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->state = $this->get('State');
     $this->pagination = $this->get('Pagination');
     // Get params
     /** @var  $params Joomla\Registry\Registry */
     $params = $this->state->get("params");
     $this->params = $params;
     if (!empty($this->items)) {
         jimport("crowdfunding.currency");
         $currencyId = $this->params->get("project_currency");
         $this->currency = CrowdFundingCurrency::getInstance(JFactory::getDbo(), $currencyId, $this->params);
     }
     // Prepare filters
     $this->listOrder = $this->escape($this->state->get('list.ordering'));
     $this->listDirn = $this->escape($this->state->get('list.direction'));
     $this->saveOrder = strcmp($this->listOrder, 'a.ordering') != 0 ? false : true;
     $this->userId = JFactory::getUser()->get("id");
     $this->redirectUrl = CrowdFundingHelperRoute::getTransactionsRoute();
     $this->prepareDocument();
     $this->version = new CrowdFundingVersion();
     parent::display($tpl);
 }
Example #2
0
foreach ($this->items as $item) {
    $classRow = !$item->reward_state ? "" : 'class="success"';
    $socialProfileLink = !$this->socialProfiles ? null : $this->socialProfiles->getLink($item->receiver_id);
    ?>
                        <tr <?php 
    echo $classRow;
    ?>
>
                            <td>
                                <?php 
    echo JHtml::_('crowdfunding.socialProfileLink', $socialProfileLink, $item->name);
    ?>
                            </td>
                            <td class="hidden-phone">
                                <a href="<?php 
    echo JRoute::_(CrowdFundingHelperRoute::getTransactionsRoute() . "&filter_search=id:" . $item->transaction_id);
    ?>
">
                                    <?php 
    echo $item->txn_id;
    ?>
                                </a>
                            </td>
                            <td class="cf-center">
                                <?php 
    $canEdit = $this->userId != $item->receiver_id ? false : true;
    echo JHtml::_('crowdfunding.reward', $item->reward_id, $item->reward_name, $item->transaction_id, $item->reward_state, $canEdit, $this->redirectUrl);
    ?>
                            </td>
                        </tr>
                        <?php