Exemplo n.º 1
0
 /**
  * Use explicitly on dashboard view only.
  *
  * @since   4.0
  * @access  public
  * @param   string
  * @return
  */
 public function getDashboardToolbar()
 {
     // Get total pending blog posts
     $model = EB::model('Blogs');
     $total = $model->getTotalPending();
     $totalTeamRequest = 0;
     // Get total team requests to join team.
     if (EB::isTeamAdmin()) {
         $teamModel = EB::model('TeamBlogs');
         $totalTeamRequest = $teamModel->getTotalRequest();
     }
     // Get the logout link
     $logoutActionLink = 'index.php?option=com_users&task=user.logout';
     // @task: Determine if the current user is a blogger or not.
     $isBlogger = EB::isSiteAdmin() || $this->acl->get('add_entry');
     // Get the logout return url
     $itemId = EB::router()->getItemid('latest');
     $logoutReturn = base64_encode(EB::_('index.php?option=com_easyblog&view=latest&Itemid=' . $itemId, false));
     // Get the current active layout
     $layout = $this->input->get('layout', '', 'cmd');
     // Get the current user
     $user = EB::user(JFactory::getUser()->id);
     // Get the template
     $theme = EB::template();
     $theme->set('current', $this->getLayout());
     $theme->set('isBlogger', $isBlogger);
     $theme->set('totalPending', $total);
     $theme->set('user', $user);
     $theme->set('logoutURL', $logoutReturn);
     $theme->set('logoutActionLink', $logoutActionLink);
     $theme->set('totalTeamRequest', $totalTeamRequest);
     $output = $theme->output('site/dashboard/toolbar/default');
     return $output;
 }
Exemplo n.º 2
0
						<li>
							<a href="<?php 
            echo EB::_('index.php?option=com_easyblog&view=subscription');
            ?>
">
								<i class="fa fa-envelope"></i> <?php 
            echo JText::_('COM_EASYBLOG_TOOLBAR_MANAGE_SUBSCRIPTIONS');
            ?>
							</a>
						</li>
						<?php 
        }
        ?>

						<?php 
        if ((EB::isTeamAdmin() || EB::isSiteAdmin()) && $this->config->get('toolbar_teamrequest')) {
            ?>
						<li>
							<a href="<?php 
            echo EBR::_('index.php?option=com_easyblog&view=dashboard&layout=requests');
            ?>
">
								<i class="fa fa-users"></i> <?php 
            echo JText::_('COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS');
            ?>
							</a>
						</li>
						<?php 
        }
        ?>
Exemplo n.º 3
0
 /**
  * Displays a list of team requests
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public function requests()
 {
     // Require the user to be logged in.
     EB::requireLogin();
     // Ensure that the user really has access to this listing
     if (!EB::isSiteAdmin() && !EB::isTeamAdmin()) {
         $this->info->set('COM_EASYBLOG_NOT_ALLOWED', 'error');
         return $this->app->redirect(EBR::_('index.php?option=com_easyblog&view=dashboard', false));
     }
     // Set the page title
     $title = EB::getPageTitle(JText::_('COM_EASYBLOG_DASHBOARD_REQUESTS_PAGE_TITLE'));
     parent::setPageTitle($title, false, $this->config->get('main_pagetitle_autoappend'));
     // Set the breadcrumbs
     $this->setViewBreadcrumb('dashboard');
     $this->setPathway(JText::_('COM_EASYBLOG_DASHBOARD_BREADCRUMB_REQUESTS'));
     $model = EB::model('TeamBlogs');
     $userId = EB::isSiteAdmin() ? '' : $this->my->id;
     $requests = $model->getRequests($userId);
     foreach ($requests as &$request) {
         $request->user = EB::user($request->user_id);
         $request->team = EB::table('Teamblog');
         $request->team->load($request->team_id);
         $request->date = EB::date($request->created);
     }
     $this->set('requests', $requests);
     parent::display('dashboard/requests/default');
 }
Exemplo n.º 4
0
        ?>
">
					<i class="fa fa-inbox"></i>
					<span class="eb-text"><?php 
        echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_PENDING');
        ?>
</span>
					<b class="hide" data-pending-counter>0</b>
				</a>
			</li>
			<?php 
    }
    ?>

			<?php 
    if (EB::isSiteAdmin() || EB::isTeamAdmin()) {
        ?>
			<li class="<?php 
        echo $current == 'requests' ? 'active' : '';
        ?>
" data-placement="bottom" data-eb-provide="tooltip" data-original-title="<?php 
        echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_TEAM_REQUESTS');
        ?>
">
				<a href="<?php 
        echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=requests');
        ?>
">
					<i class="fa fa-users"></i>
					<span class="eb-text"><?php 
        echo JText::_('COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS');
Exemplo n.º 5
0
        echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=pending');
        ?>
">
					<i class="fa fa-inbox"></i>
					<span class="eb-text"><?php 
        echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_PENDING');
        ?>
</span>
				</a>
			</li>
			<?php 
    }
    ?>

			<?php 
    if ((EB::isSiteAdmin() || EB::isTeamAdmin()) && $this->config->get('layout_dashboardteamrequest')) {
        ?>
			<li class="<?php 
        echo $current == 'requests' ? 'active' : '';
        ?>
" data-placement="bottom" data-eb-provide="tooltip" data-original-title="<?php 
        echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_TEAM_REQUESTS');
        ?>
">
				<a href="<?php 
        echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=requests');
        ?>
">
					<i class="fa fa-users"></i>
					<span class="eb-text"><?php 
        echo JText::_('COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS');