Skip to content
Snippets Groups Projects
Commit 0180cf15 authored by hahn's avatar hahn
Browse files

- project overview page:

  - scrolling
  - no detail button
  - smaller folder image
- Scroll to top of page
- delete project: red button
- removed builld and cleanup from menu
- Action-Log with AJAX request and form class
parent ba54ba30
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
"menu-overview": "zur Übersicht",
"menu-projects": "Projekte",
"menu-settings": "Einstellungen",
"menu-logs": "Logs",
"menu-new-project": "Neues Projekt anlegen",
"menu-project-home": "Projekt Home",
"menu-project-actions": "Aktionen",
......@@ -31,6 +32,12 @@
"class-actionlog-title": "Action-Log",
"class-actionlog-filter": "Filter",
"class-actionlog-nolog": "Hinweis: Es wurden keine Logeinträge gefunden.",
"class-actionlog-time": "Zeitfenster",
"class-actionlog-time-today": "heute",
"class-actionlog-time-since-yesterday": "seit gestern",
"class-actionlog-time-for-1-week": "seit 1 Woche",
"class-actionlog-time-for-n-weeks": "seit %s Wochen",
"class-actionlog-count": "Anzahl",
"class-pl-error-no-project": "<strong>Hinweis</strong><br>Es wurde noch kein Projekt eingerichtet.",
......@@ -244,6 +251,7 @@
"setup-hint": "Einstellungen &auml;ndern/ anpassen",
"setup-metadata": "Allgemeine Metadaten",
"setup-hint-build": "Einstellungen zum Erstellen eines neuen Builds. Es werden Zugriffsdaten auf das Repository benötigt.<br>Der Fileprefix bestimmt einen Teil des Dateinamens und wird auch in Puppet konfiguriert. Er darf nach eingerichtetem Deployment nicht mehr geändert werden.",
"show all": "alle anzeigen",
"skip": "SKIP",
"starting": "Starte",
"success": "OK",
......
......@@ -2,6 +2,7 @@
"menu-overview": "back to overview",
"menu-projects": "Projects",
"menu-settings": "Settings",
"menu-logs": "Logs",
"menu-new-project": "Create new project",
"menu-project-home": "Project home",
"menu-project-actions": "Actions",
......@@ -30,6 +31,12 @@
"class-actionlog-title": "Action-Log",
"class-actionlog-filter": "Filter",
"class-actionlog-nolog": "Remark: There was no logentry found.",
"class-actionlog-time": "time",
"class-actionlog-time-today": "today",
"class-actionlog-time-since-yesterday": "since yesterday",
"class-actionlog-time-for-1-week": "for 1 week",
"class-actionlog-time-for-n-weeks": "for %s weeks",
"class-actionlog-count": "count",
"class-pl-error-no-project": "<strong>Remark</strong><br>No data. No project was created yet.",
......@@ -246,6 +253,7 @@
"setup-hint": "Change settings",
"setup-metadata": "General metadata",
"setup-hint-build": "Settings to create a new build. You will need credentials to access the repository.<br>The file prefix defines a part of the package name and must be configured in the puppet manifest. After the setup of the deployment or first build it cannot be changed anymore.",
"show all": "show all",
"skip": "SKIP",
"starting": "Starting",
"success": "OK",
......
......@@ -168,10 +168,12 @@ class Actionlog {
''=>array('label'=>t("all")),
);
$aTimes=array(
">'".date("Y-m-d", date("U"))."'"=>array('label'=>t("class-actionlog-time-today")),
">'".date("Y-m-d", date("U") - 60*60*24*1)."'"=>array('label'=>t("class-actionlog-time-since-yesterday")),
">'".date("Y-m-d", date("U") - 60*60*24*7)."'"=>array('label'=>t("class-actionlog-time-for-1-week")),
">'".date("Y-m-d", date("U") - 60*60*24*7*2)."'"=>array('label'=>sprintf(t("class-actionlog-time-for-n-weeks"), "2")),
">'".date("Y-m-d", date("U") - 60*60*24*7*4)."'"=>array('label'=>sprintf(t("class-actionlog-time-for-n-weeks"), "4")),
''=>array('label'=>t("all")),
">'".date("Y-m-d", date("U"))."'"=>array('label'=>'heute'),
">'".date("Y-m-d", date("U") - 60*60*24*1)."'"=>array('label'=>'seit gestern'),
">'".date("Y-m-d", date("U") - 60*60*24*7)."'"=>array('label'=>'seit 1 Woche'),
);
$aForms = array(
......@@ -179,21 +181,31 @@ class Actionlog {
'meta' => array(
'method' => 'GET',
'action' => '?',
'class' => 'form-inline',
),
'validate' => array(),
'form' => array(
),
'form' => array(),
));
// generate filter for log table
// $bIsFullsearch: true = show all inputs; false: no interactive search
if ($bIsFullsearch){
$aForms["filter"]["form"]['label'] = array(
'type' => 'markup',
'value' => '<h3>' . t("class-actionlog-title") . ' :: '.t("class-actionlog-filter").'</h3>',
);
// --- list of all projects in log
$sSql='SELECT DISTINCT(project) from `logs`';
$aForms["filter"]["form"]['selectproject'] = array(
'type' => 'select',
'name' => 'selectproject',
'label' => '<i class="icon-tag"></i> ' . t('project'),
'class' => 'span2',
'onchange'=>'updateActionlog();',
'inline' => true,
);
$aForms["filter"]["form"]['selectproject']['options']['']=array('label'=>t("all"));
foreach ($this->_makeQuery($sSql) as $row) {
......@@ -204,16 +216,20 @@ class Actionlog {
$aForms["filter"]["form"]['selectWheretime'] = array(
'type' => 'select',
'name' => 'selectWheretime',
'label' => '<i class="icon-calendar"></i> time',
'label' => '<i class="icon-calendar"></i> '.t("class-actionlog-time"),
'class' => 'span2',
'onchange'=>'updateActionlog();',
'options' => $aTimes
'options' => $aTimes,
'inline' => true,
);
$aForms["filter"]["form"]['selectlimit'] = array(
'type' => 'select',
'name' => 'selectlimit',
'label' => '<i class="icon-list"></i> limit',
'label' => '<i class="icon-list"></i> '.t("class-actionlog-count"),
'class' => 'span1',
'onchange'=>'updateActionlog();',
'options' => $aLimits
'options' => $aLimits,
'inline' => true,
);
$aForms["filter"]["form"]['line'] = array(
'type' => 'markup',
......@@ -236,31 +252,37 @@ class Actionlog {
'value' => $aFilter["limit"]
);
}
$aForms["filter"]["form"]['btnalllogs'] = array(
'type' => 'button',
'label' => '<i class="icon-list-alt"></i> ' . t('all'),
'value' => t('all'),
'href'=>'/deployment/all/setup/actionlog/',
'onclick'=>'location.href=\'/deployment/all/setup/actionlog/\'; return false;',
);
}
$aForms["filter"]["form"]['efilterlogs'] = array(
'type' => 'text',
'name' => 'efilterlogs',
'label' => '<i class="icon-filter"></i>' . t("overview-textsearch"),
'class' => 'span2',
'inline'=> true,
'onkeyup' => 'filterLogTable();',
'onkeypress' => 'filterLogTable();',
'onchange' => 'filterLogTable();',
'size' => 10,
);
if (!$bIsFullsearch){
$aForms["filter"]["form"]['btnalllogs'] = array(
'type' => 'button',
'value' => t('show all'),
'href'=>'/deployment/all/setup/actionlog/',
'onclick'=>'location.href=\'/deployment/all/setup/actionlog/\'; return false;',
);
}
// generate html output
$oForm = new formgen($aForms);
$sReturn = '<br>'.$oForm->renderHtml("filter").'
$sReturn = '<div id="divActionlogs">'.$oForm->renderHtml("filter").'
<div id="tableLogactions">
<table class="table">' . $sReturn . '</table>
</div>';
</div></div>';
if (!$bIsFullsearch){
$sReturn= '<strong>'
. '<button onclick="setLogVisibility(\'block\');" id="btnShowLogs" class="btnLogs"><b class="icon-chevron-right"></b> </button>'
......@@ -268,10 +290,10 @@ class Actionlog {
. ' ' . t("class-actionlog-title")
. '</strong>'
. '<div id="divActionlogs">'
. $sReturn
. '</div>
<script>
. $sReturn;
}
$sReturn.='<script>
var sMsgNolog="'.t("class-actionlog-nolog").'";
function getLogVisibility(){
var sReturn=localStorage.getItem("bActionlogsVisible");
sReturn=(sReturn=="block")?"block":"none";
......
......@@ -52,7 +52,7 @@ class formgen {
}
$sReturn.='<form ';
if (array_key_exists("meta", $this->aForm[$sFormId])) {
foreach (array("method", "action", "target", "accept-charset") as $sAttr) {
foreach (array("method", "action", "target", "accept-charset", "class") as $sAttr) {
if (array_key_exists($sAttr, $this->aForm[$sFormId]["meta"])) {
$sReturn.=$sAttr . '="' . $this->aForm[$sFormId]["meta"][$sAttr] . '" ';
}
......@@ -206,7 +206,6 @@ class formgen {
// HINWEIS optgroups werden nicht unterstuezt - nur einfache Listen
$this->_checkReqiredKeys($elementData, array("name"));
$sFormElement.='<select id="' . $sId . '" ';
;
$sFormElement.=$this->_addHtmlAtrributes(explode(",", "$sDefaultAttributes,name,onchange"), $elementData);
$sFormElement.=">\n";
foreach ($elementData["options"] as $idOption => $aOptionData) {
......@@ -220,7 +219,8 @@ class formgen {
if ($sLabelText) {
// $sLabelElement.='<span class="help-block">' . $sLabelText . '</span>' . "\n";
$sLabelElement = $this->_addLabel($sLabelText, $sId, "control-label");
$sLabelClass=(array_key_exists("inline", $elementData) && $elementData["inline"])?"":"control-label";
$sLabelElement = $this->_addLabel($sLabelText, $sId, $sLabelClass);
}
$sHtmlTable = '<td>' . $sLabelText . '</td><td>' . $sFormElement . '</td>';
......@@ -255,9 +255,14 @@ class formgen {
$sFormElement.=' />';
$sFormElement.="\n";
if (array_key_exists("inline", $elementData) && $elementData["inline"]){
$sLabelElement = $this->_addLabel($sLabelText, $sId, "");
$sHtmlDefault = $sLabelElement . "\n" . $sFormElement . "\n";
} else {
$sLabelElement = $this->_addLabel($sLabelText, $sId, "control-label");
$sHtmlDefault = $sLabelElement . '<div class="controls">' . "\n" . $sFormElement . '</div>' . "\n";
}
$sHtmlTable = '<td>' . $sLabelText . '</td><td>' . $sFormElement . '</td>';
break;
......@@ -288,9 +293,11 @@ class formgen {
$sHtmlDefault = $sHtmlTable;
} else {
if ($elementData["type"] != "button" && $elementData["type"] != "fieldset" && $elementData["type"] != "markup") {
if (!array_key_exists("inline", $elementData) || !$elementData["inline"]){
$sHtmlDefault = "<fieldset>" . $sHtmlDefault . "</fieldset>\n";
}
}
}
$sReturn.="<!-- " . $elementData["type"] . " -->\n";
$sReturn.=$sHtmlDefault . "\n";
......
......@@ -142,6 +142,7 @@ function getTopArea() {
$sReturn.='">' . str_replace('</a>', ' <b class="caret"></b></a>', aHome("")) . '
<ul class="dropdown-menu">
<li><a href="' . $sBaseUrl . 'all/setup/">' . t("menu-settings") . '</a></li>
<li><a href="' . $sBaseUrl . 'all/setup/actionlog/">' . t("menu-logs") . '</a></li>
<li><a href="' . $sBaseUrl . 'all/setup/new/">' . t("menu-new-project") . '</a></li>
</ul>
</li>
......
......@@ -77,7 +77,7 @@ function updateActionlog(){
}
if (!sHtml){
sHtml='ERROR: no data ';
sHtml=sMsgNolog; // variable is set in actionlog.class.php
} else {
sHead='';
for (j=0; j<aTableitems.length; j++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment