mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Ticket system stapelverarbeitung multi processing
This commit is contained in:
parent
7ca19d7bac
commit
6e7e27d289
@ -42,8 +42,29 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
[TAB1]
|
||||
<fieldset>
|
||||
<table>
|
||||
<legend>Stapelverarbeitung</legend>
|
||||
<tr><td>{|Status|}:</td><td><select name="status">[STATUS]</select></td></tr>
|
||||
<tr><td>{|Verantwortlich|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="20"></td></tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" value="1" id="autoalle" /> alle markieren </td><td><input type="submit" class="btnBlue" name="ausfuehren" value="{|Zuordnen|}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$('#autoalle').on('change',function(){
|
||||
var wert = $(this).prop('checked');
|
||||
$('#ticket_list').find('input[type="checkbox"]').prop('checked',wert);
|
||||
$('#ticket_list').find('input[type="checkbox"]').first().trigger('change');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
@ -43,9 +43,6 @@ class Ticket {
|
||||
switch ($name) {
|
||||
case "ticket_list":
|
||||
|
||||
$this->app->YUI->TagEditor('taglist', array('width'=>370));
|
||||
$this->app->Tpl->Add('SCRIPTJAVASCRIPT','<link rel="stylesheet" type="text/css" href="./css/jquery.tag-editor.css">');
|
||||
|
||||
$allowed['ticket_list'] = array('list');
|
||||
$heading = array('','','Ticket #', 'Letzte Aktion', 'Adresse', 'Betreff', 'Tags', 'Verant.', 'Nachr.', 'Status', 'Alter', 'Projekt', 'Menü');
|
||||
$width = array('1%','1%','5%', '5%', '5%', '30%', '1%', '5%', '1%', '1%', '1%', '1%', '1%');
|
||||
@ -169,11 +166,44 @@ class Ticket {
|
||||
}
|
||||
|
||||
function ticket_list() {
|
||||
|
||||
// Process multi action
|
||||
$auswahl = $this->app->Secure->GetPOST('auswahl');
|
||||
$selectedIds = [];
|
||||
if(!empty($auswahl)) {
|
||||
foreach($auswahl as $selectedId) {
|
||||
$selectedId = (int)$selectedId;
|
||||
if($selectedId > 0) {
|
||||
$selectedIds[] = $selectedId;
|
||||
}
|
||||
}
|
||||
|
||||
$status = $this->app->Secure->GetPOST('status');
|
||||
$warteschlange = $this->app->Secure->GetPOST('warteschlange');
|
||||
|
||||
$sql = "UPDATE ticket SET status = '".$status."'";
|
||||
if ($warteschlange != '') {
|
||||
$sql .= ", warteschlange = '".explode(" ",$warteschlange)[0]."'";
|
||||
}
|
||||
|
||||
$sql .= " WHERE id IN (".implode(",",$selectedIds).")";
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
}
|
||||
|
||||
// List
|
||||
$this->app->YUI->TagEditor('taglist', array('width'=>370));
|
||||
$this->app->Tpl->Add('SCRIPTJAVASCRIPT','<link rel="stylesheet" type="text/css" href="./css/jquery.tag-editor.css">');
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=ticket&action=list", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=ticket&action=create", "Neu anlegen");
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||
|
||||
$this->app->Tpl->Set('STATUS', $this->app->erp->GetStatusTicketSelect('neu'));
|
||||
$this->app->YUI->AutoComplete("warteschlange","warteschlangename");
|
||||
|
||||
$this->app->YUI->TableSearch('TAB1', 'ticket_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "ticket_list.tpl");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user