Exemple #1
0
 static function renderImportFromDirectory()
 {
     $html = '<div id="entryform">';
     $html .= '<h1>' . translate('Import all .ics files of a directory') . '</h1>';
     $html .= '<p>' . translate('This process will import each file in a directory named "username.ics" and create a user and calendar for each file to import.') . '</p>';
     $data = (object) array('directory_path' => '/path/to/your/ics/files', 'calendar_path' => 'calendar');
     $ef = new EntryForm($_SERVER['REQUEST_URI'], $data, true, true);
     $html .= "<table width=\"100%\" class=\"data\">\n";
     $html .= $ef->StartForm(array("autocomplete" => "off"));
     $html .= $ef->DataEntryLine(translate("path to store your ics"), "%s", "text", "calendar_path", array("size" => 20, "title" => translate("Set the path to store your ics e.g. 'calendar' will be referenced as /caldav.php/username/calendar/"), "help" => translate("<b>WARNING: all events in this path will be deleted before inserting allof the ics file</b>")), '');
     $html .= $ef->DataEntryLine(translate("Directory on the server"), "%s", "text", "directory_path", array("size" => 20, "title" => translate("The path on the server where your .ics files are.")));
     $html .= "</table>\n";
     $html .= $ef->SubmitButton("import_from_directory", translate('Submit'));
     $html .= $ef->EndForm();
     $html .= "</div>";
     return $html;
 }
Exemple #2
0
        $href = "/user.php?user_no={$this->project_manager}";
        $link = "<a href=\"{$href}\">" . $this->project_manager_fullname . "</a>";
        $s .= "<tr><td colspan=\"2\"><b>Project Manager:</b> " . $link . "</td></tr>";
    }
    if ($this->qa_mentor_fullname != "") {
        $href = "/user.php?user_no={$this->qa_mentor}";
        $link = "<a href=\"{$href}\">" . $this->qa_mentor_fullname . "</a>";
        $s .= "<tr><td colspan=\"2\"><b>QA Mentor:</b> " . $link . "</td></tr>";
    }
    $s .= "<tr><td height=\"15\" colspan=\"2\">&nbsp;</td></tr>";
    $s .= "<tr><td colspan=\"2\">" . ContentForm($project, $qastep, $view_history) . "</td></tr>";
    $s .= "<tr><td height=\"15\" colspan=\"2\">&nbsp;</td></tr>";
    $s .= "</table>\n";
    if ($ef->editmode) {
        $s .= $ef->SubmitButton("submit", "Update");
        $s .= $ef->EndForm();
    }
}
// isset qastep
// -----------------------------------------------------------------------------
// ASSEMBLE CONTENT
if ($s == "") {
    $content = "<p>Nothing known about that QA step.</p>";
} else {
    $content = $s;
}
// -----------------------------------------------------------------------------
// DELIVER..
require_once "top-menu-bar.php";
require_once "page-header.php";
echo $content;
Exemple #3
0
 /**
  * Return project QA Plan. If editable return as form fields with
  * the form tags, encapsulated in a nice table with all of the fields we
  * need to edit a project's QA plan.
  * @param integer $edit Flag, if 1 then editable fields in a form
  */
 function RenderQAPlan($edit = 1)
 {
     global $qa_action;
     $s = "";
     $ef = new EntryForm($REQUEST_URI, $this, $edit);
     $ef->NoHelp();
     if ($ef->editmode) {
         $s .= $ef->StartForm();
         if ($this->request_id > 0) {
             $s .= $ef->HiddenField("request_id", $this->request_id);
             $s .= $ef->HiddenField("post_action", "config_update");
             $s .= $ef->HiddenField("qa_action", "qaplan");
             $s .= $ef->HiddenField("edit", "1");
         }
     }
     // Just the things we want created/updated in QAMS..
     $s .= "<table width=\"100%\" class=\"data\" cellspacing=\"0\" cellpadding=\"0\">\n";
     if (isset($this->qa_process)) {
         $s .= $ef->BreakLine("Quality Assurance Plan");
         $s .= "<tr><td height=\"15\" colspan=\"2\">&nbsp;</td></tr>\n";
         // Project info..
         $s .= "<tr><td colspan=\"2\"><b>Project:</b> " . $this->brief . "</td></tr>\n";
         if ($this->project_manager_fullname != "") {
             $pmlink = "<a href=\"/user.php?user_no={$this->project_manager}\">";
             $pmlink .= $this->project_manager_fullname;
             $pmlink .= "</a>";
             $s .= "<tr><td colspan=\"2\"><b>Project Manager:</b> " . $pmlink . "</td></tr>";
         }
         if ($this->qa_mentor_fullname != "") {
             $qalink = "<a href=\"/user.php?user_no={$this->qa_mentor}\">";
             $qalink .= $this->qa_mentor_fullname;
             $qalink .= "</a>";
             $s .= "<tr><td colspan=\"2\"><b>QA Mentor:</b> " . $qalink . "</td></tr>";
         }
         $s .= "<tr><td height=\"15\" colspan=\"2\">&nbsp;</td></tr>";
         $s .= "<tr><td colspan=\"2\">" . $this->qa_process->QAPlan() . "</td></tr>";
     }
     $s .= "<tr><td height=\"15\" colspan=\"2\">&nbsp;</td></tr>";
     $s .= "</table>\n";
     $qaplan_status = $this->qa_process->overall_approval_status(STEP_ID_QAPLAN);
     if ($ef->editmode && $qaplan_status != "y" && $qaplan_status != "p") {
         $s .= $ef->SubmitButton("submit", "Update");
         $s .= $ef->EndForm();
     }
     return $s;
 }
Exemple #4
0
    }
    $options = array_merge($roles, array("title" => "Select the role this person has in relation to this system"));
    $fld_format = '<span style="background-color: %s;">&nbsp; &nbsp; %s &nbsp; &nbsp;</span>';
    $i = 0;
    while ($row = $q->Fetch()) {
        $search_record->role[$row->user_no] = $row->role;
        $colour = '#e8ffe0';
        $type = "This is a client";
        $id = "client_{$i}";
        if ($row->internal_role == 't') {
            $id = "int_{$i}";
            $colour = '#ffe8e0';
            $type = "This is an internal person";
        } else {
            if ($row->contractor_role == 't') {
                $id = "ext_{$i}";
                $colour = '#e0e8ff';
                $type = "This is an external support person";
            }
        }
        $options['id'] = $id;
        $html = sprintf($fld_format, $role_colours["{$row->role}"], $ef->DataEntryField("", "select", "role[{$row->user_no}]", $options));
        printf($line_format, $i++ % 2, $type, $row->user_no, $row->fullname, $row->org_code, $row->org_name, $colour, $html);
    }
    echo "</table>\n";
    echo '<div id="footer">';
    echo $ef->SubmitButton("submit", "Update");
    echo '</div>';
    echo $ef->EndForm();
}
include "page-footer.php";