public function browseAction()
 {
     if ($this->getRequest()->isPost()) {
         $acceptCorrectionIds = $this->getParam('accept');
         $acceptCorrectionNpIds = $this->getParam('accept-np');
         $acceptCorrectionNpIds = array();
         //temp @todo
         foreach ($acceptCorrectionNpIds as $correctionId) {
             $correction = $this->getCorrection($correctionId);
             $frontPageId = $correction->fp_id;
             $frontPage = $this->_helper->db->getTable('NewspapersFrontPage')->find($frontPageId);
             //$newspaper = $this->_helper->db->getTable('NewspapersNewspaper')->find($correctionId);
             $this->_helper->db->getTable('NewspapersFrontPage')->findOthersInNewspaper($frontPage);
             //die();
             // $this->acceptNpCorrection($correction);
         }
         foreach ($acceptCorrectionIds as $correctionId) {
             $correction = $this->getCorrection($correctionId);
             $this->acceptCorrection($correction);
         }
         parent::browseAction();
     } else {
         parent::browseAction();
     }
 }
Пример #2
0
 /**
  * The browse collections action.
  * 
  */
 public function browseAction()
 {
     if (!$this->_getParam('sort_field')) {
         $this->_setParam('sort_field', 'added');
         $this->_setParam('sort_dir', 'd');
     }
     parent::browseAction();
 }
Пример #3
0
 /**
  * Retrieve and render a set of records for the controller's model.
  *
  * @uses Omeka_Controller_Action_Helper_Db::getDefaultModelName()
  * @uses Omeka_Db_Table::findBy()
  */
 public function browseAction()
 {
     if (!$this->hasParam('sort_field')) {
         $this->setParam('sort_field', 'modified');
     }
     if (!$this->hasParam('sort_dir')) {
         $this->setParam('sort_dir', 'd');
     }
     parent::browseAction();
 }
 public function browseAction()
 {
     if (!$this->_getParam('sort_field')) {
         $this->_setParam('sort_field', 'added');
         $this->_setParam('sort_dir', 'd');
     }
     //Must be logged in to view items specific to certain users
     if ($this->_getParam('user') && !$this->_helper->acl->isAllowed('browse', 'Users')) {
         $this->_helper->flashMessenger('May not browse by specific users.');
         $this->_setParam('user', null);
     }
     parent::browseAction();
 }
 /**
  * Browse exhibits action.
  */
 public function browseAction()
 {
     $request = $this->getRequest();
     $sortParam = $request->getParam('sort');
     $sortOptionValue = get_option('exhibit_builder_sort_browse');
     if (!isset($sortParam)) {
         switch ($sortOptionValue) {
             case 'alpha':
                 $request->setParam('sort', 'alpha');
                 break;
             case 'recent':
                 $request->setParam('sort', 'recent');
                 break;
         }
     }
     parent::browseAction();
 }
Пример #6
0
 /**
  * Displays the browse page for all reports.
  */
 public function browseAction()
 {
     $db = $this->_helper->db;
     if (!$this->_getParam('sort_field')) {
         $this->_setParam('sort_field', 'added');
         $this->_setParam('sort_dir', 'd');
     }
     parent::browseAction();
     $reportItemCounts = array();
     $reportUserNames = array();
     foreach ($this->view->reports_reports as $report) {
         $user = $db->getTable('User')->find($report->creator);
         $query = unserialize($report->query);
         $params = reports_convert_search_filters($query);
         $itemCount = $db->getTable('Item')->count($params);
         $reportItemCounts[(string) $report->id] = $itemCount;
     }
     $this->view->reportItemCounts = $reportItemCounts;
     $this->view->formats = reports_get_output_formats();
 }
Пример #7
0
 public function indexAction()
 {
     parent::browseAction();
 }
Пример #8
0
 public function browseAction()
 {
     if (isset($_GET['search'])) {
         $this->setParam($_GET['search-type'], $_GET['search']);
     }
     parent::browseAction();
 }
 public function browseAction()
 {
     parent::browseAction();
     $this->view->total = $this->_helper->db->getTable()->totalEmbeds();
 }
Пример #10
0
 /**
  * Browse the items.  Encompasses search, pagination, and filtering of
  * request parameters.  Should perhaps be split into a separate
  * mechanism.
  * 
  * @return void
  */
 public function browseAction()
 {
     //Must be logged in to view items specific to certain users
     if ($this->_getParam('user') && !$this->_helper->acl->isAllowed('browse', 'Users')) {
         $this->_setParam('user', null);
         // Zend re-reads from GET/POST on every getParams() so we need to
         // also remove these.
         unset($_GET['user'], $_POST['user']);
     }
     parent::browseAction();
 }
Пример #11
0
 public function browseAction()
 {
     if (!$this->_getParam('sort_field')) {
         $this->_setParam('sort_field', 'added');
         $this->_setParam('sort_dir', 'd');
     }
     $ariane['liste des expositions'] = null;
     $this->view->ariane = $ariane;
     parent::browseAction();
 }