Esempio n. 1
0
 /**
  * Display queue.
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function display_queue($queue_type)
 {
     $this->set_type($this->types->type_from_url($queue_type));
     if (!$this->type->acl_get('view')) {
         return $this->helper->needs_auth();
     }
     $tag = $this->request->variable('tag', 0);
     // Subscriptions
     if (!$tag) {
         $this->subscriptions->handle_subscriptions(TITANIA_QUEUE, $this->type->id, $this->helper->get_current_url(), 'SUBSCRIBE_QUEUE');
     } else {
         $this->subscriptions->handle_subscriptions(TITANIA_QUEUE_TAG, $tag, $this->helper->get_current_url(), 'SUBSCRIBE_CATEGORY');
     }
     \queue_overlord::display_queue($this->type->id, $tag);
     \queue_overlord::display_categories($this->type->id, $tag);
     $this->display->assign_global_vars();
     $this->generate_navigation('queue');
     // Add to Breadcrumbs
     $this->display->generate_breadcrumbs(array($this->type->lang => $this->get_queue_url($this->type->id)));
     return $this->helper->render('manage/queue.html', 'VALIDATION_QUEUE');
 }
Esempio n. 2
0
 /**
  * Load queue item.
  *
  * @param int $id		Queue item id.
  * @throws \Exception	Throws exception if no item found.
  * @return null
  */
 protected function load_item($id)
 {
     $this->id = (int) $id;
     $this->queue = \queue_overlord::get_queue_object($this->id, true);
     if (!$this->queue) {
         throw new \Exception($this->user->lang['NO_QUEUE_ITEM']);
     }
     $this->contrib = \contribs_overlord::get_contrib_object($this->queue->contrib_id, true);
     $this->revision = $this->queue->get_revision();
     $this->is_author = $this->contrib->is_author || $this->contrib->is_active_coauthor || $this->contrib->is_coauthor;
 }
Esempio n. 3
0
                }
                $queue->move($new_tag);
            } else {
                // Generate the list of tags we can move it to
                $extra = '<select name="id">';
                foreach ($tags as $tag_id => $row) {
                    $extra .= '<option value="' . $tag_id . '">' . (isset(phpbb::$user->lang[$row['tag_field_name']]) ? phpbb::$user->lang[$row['tag_field_name']] : $row['tag_field_name']) . '</option>';
                }
                $extra .= '</select>';
                phpbb::$template->assign_var('CONFIRM_EXTRA', $extra);
                titania::confirm_box(false, 'MOVE_QUEUE');
            }
            redirect(titania_url::append_url($base_url, array('q' => $queue->queue_id)));
            break;
    }
    // Display the main queue item
    $data = queue_overlord::display_queue_item($queue_id);
    // Handle replying/editing/etc
    $posting_helper = new titania_posting();
    $posting_helper->act('manage/queue_post.html');
    // Display the posts in the queue (after the posting helper acts)
    posts_overlord::display_topic_complete($data['topic']);
    titania::page_header(queue_overlord::$queue[$queue_id]['topic_subject']);
} else {
    // Subscriptions
    titania_subscriptions::handle_subscriptions(TITANIA_QUEUE, $queue_type, titania_url::$current_page_url);
    queue_overlord::display_queue($queue_type, $tag);
    queue_overlord::display_categories($queue_type, $tag);
    titania::page_header('VALIDATION_QUEUE');
}
titania::page_footer(true, 'manage/queue.html');