Example #1
0
 /**
  * @throws OrganisationUnitIDMissingException
  * @throws OrganisationUnitNotFoundException
  */
 public static function list_organisation_unit_related_samples()
 {
     if ($_GET['ou_id']) {
         try {
             $organisation_unit_id = $_GET['ou_id'];
             $argument_array = array();
             $argument_array[0] = "organisation_unit_id";
             $argument_array[1] = $organisation_unit_id;
             $list = new List_IO("SampleOrganisationUnitRelated", "ajax.php?nav=sample", "list_organisation_unit_related_samples", "count_organisation_unit_related_samples", $argument_array, "SampleAjaxMySamples", 12);
             $list->add_column("", "symbol", false, "16px");
             $list->add_column(Language::get_message("SampleGeneralListColumnSampleID", "general"), "id", true, "11%");
             $list->add_column(Language::get_message("SampleGeneralListColumnSampleName", "general"), "name", true, null);
             $list->add_column(Language::get_message("SampleGeneralListColumnDateTime", "general"), "datetime", true, null);
             $list->add_column(Language::get_message("SampleGeneralListColumnTypeTemplate", "general"), "template", true, null);
             $list->add_column(Language::get_message("SampleGeneralListColumnCurrentLocation", "general"), "location", true, null);
             $list->add_column(Language::get_message("SampleGeneralListColumnAvailable", "general"), "av", false, "16px");
             require_once "core/modules/organisation_unit/io/organisation_unit.io.php";
             $organisation_unit_io = new OrganisationUnitIO();
             $organisation_unit_io->detail();
             $template = new HTMLTemplate("sample/list.html");
             $template->set_var("list", $list->get_list());
             $template->output();
         } catch (OrganisationUnitNotFoundException $e) {
             throw $e;
         }
     } else {
         throw new OrganisationUnitIDMissingException();
     }
 }
Example #2
0
 /**
  * @throws OrganisationUnitIDMissingException
  */
 public static function list_organisation_unit_related_projects()
 {
     if ($_GET['ou_id']) {
         $organisation_unit_id = $_GET['ou_id'];
         $argument_array = array();
         $argument_array[0] = "organisation_unit_id";
         $argument_array[1] = $organisation_unit_id;
         $list = new List_IO("ProjectOrganisationUnitRelated", "ajax.php?nav=project", "list_organisation_unit_related_projects", "count_organisation_unit_related_projects", $argument_array, "ProjectAjaxOrganisationUnit", 12);
         $list->add_column("", "symbol", false, "16px");
         $list->add_column(Language::get_message("ProjectGeneralListColumnName", "general"), "name", true, null);
         $list->add_column(Language::get_message("ProjectGeneralListColumnOwner", "general"), "owner", true, null);
         $list->add_column(Language::get_message("ProjectGeneralListColumnDateTime", "general"), "datetime", true, null);
         $list->add_column(Language::get_message("ProjectGeneralListColumnTemplate", "general"), "template", true, null);
         $list->add_column(Language::get_message("ProjectGeneralListColumnStatus", "general"), "status", true, null);
         require_once "core/modules/organisation_unit/io/organisation_unit.io.php";
         $organisation_unit_io = new OrganisationUnitIO();
         $organisation_unit_io->detail();
         $template = new HTMLTemplate("project/list_organisation_unit.html");
         $template->set_var("list", $list->get_list());
         $template->output();
     } else {
         throw new OrganisationUnitIDMissingException();
     }
 }