Beispiel #1
0
			</div>
		</div>
		<div class="clear"></div>

		<div class="grouping">
			<label for="hub_id"><?php 
echo Lang::txt('PLG_SUPPORT_TIME_HUB');
?>
:
				<select name="hub_id" id="hub_id">
					<option value=""><?php 
echo Lang::txt('PLG_SUPPORT_TIME_NO_HUB_SELECTED');
?>
</option>
					<?php 
foreach (Hub::all()->order('name', 'asc') as $hub) {
    ?>
						<option value="<?php 
    echo $hub->id;
    ?>
">
							<?php 
    echo $hub->name;
    ?>
						</option>
					<?php 
}
?>
				</select>
			</label>
Beispiel #2
0
 /**
  * Lists all applicable hubs
  *
  * @apiMethod GET
  * @apiUri    /time/indexHubs
  * @apiParameter {
  * 		"name":        "active",
  * 		"description": "Hub active status",
  * 		"type":        "integer",
  * 		"required":    false,
  * 		"default":     null
  * }
  * @apiParameter {
  * 		"name":        "limit",
  * 		"description": "Maximim number of hubs to return",
  * 		"type":        "integer",
  * 		"required":    false,
  * 		"default":     1000
  * }
  * @apiParameter {
  * 		"name":        "start",
  * 		"description": "Hub index to start at (for pagination)",
  * 		"type":        "integer",
  * 		"required":    false,
  * 		"default":     0
  * }
  * @apiParameter {
  * 		"name":        "orderby",
  * 		"description": "Field by which to order results",
  * 		"type":        "string",
  * 		"required":    false,
  * 		"default":     "id"
  * }
  * @apiParameter {
  * 		"name":        "orderdir",
  * 		"description": "Direction by which to order results",
  * 		"type":        "string",
  * 		"required":    false,
  * 		"default":     "asc"
  * }
  * @return  void
  */
 public function indexHubsTask()
 {
     // Require authentication and authorization
     $this->requiresAuthentication();
     $this->authorizeOrFail();
     $hub = Hub::all();
     if ($active = Request::getInt('active', 1)) {
         $hub->whereEquals('active', $active);
     }
     if ($limit = Request::getInt('limit', 1000)) {
         $hub->limit($limit);
     }
     if ($start = Request::getInt('start', 0)) {
         $hub->start($start);
     }
     if (($orderby = Request::getCmd('orderby', 'id')) && ($orderdir = Request::getCmd('orderdir', 'asc'))) {
         $hub->order($orderby, $orderdir);
     }
     // Create object with tasks property
     $response = new stdClass();
     $response->hubs = $hub->rows()->toObject();
     // Return object
     $this->send($response);
 }
Beispiel #3
0
								<?php 
echo Lang::txt('COM_TIME_OVERVIEW_HUB');
?>
:
								<span class="hub-error error-message"><?php 
echo Lang::txt('COM_TIME_OVERVIEW_PLEASE_SELECT_HUB');
?>
</span>
							</label>
							<select name="hub_id" id="hub_id" tabindex="1">
								<option value=""><?php 
echo Lang::txt('COM_TIME_NO_HUB');
?>
</option>
								<?php 
foreach (Hub::all()->ordered() as $hub) {
    ?>
									<option value="<?php 
    echo $hub->id;
    ?>
">
										<?php 
    echo $hub->name;
    ?>
									</option>
								<?php 
}
?>
							</select>
						</div>
						<div class="grouping" id="task-group">
Beispiel #4
0
 /**
  * Default view function
  *
  * @return void
  */
 public function displayTask()
 {
     // Display
     $this->view->rows = Hub::all()->paginated()->ordered();
     $this->view->display();
 }