diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql
index b6f5096..bff3aa5 100644
--- a/dbd/sql/mysql/data/system_sai_api.sql
+++ b/dbd/sql/mysql/data/system_sai_api.sql
@@ -139,6 +139,7 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1004, 42, 2, 1000, 'add', 'todo', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1005, 42, 2, 1000, 'assign', 'todo', 'INT');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1006, 42, 2, 1000, 'deassign', 'todo', 'INT');
+INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1007, 42, 3, 1000, 'deassign', 'user', 'INT');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1010, 42, 2, 1000, 'edit', 'todo', 'INT');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1011, 42, 2, 1000, 'edit', 'message', 'STRING');
diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql
index f3b21b1..e56ac8e 100644
--- a/dbd/sql/mysql/data/system_text.sql
+++ b/dbd/sql/mysql/data/system_text.sql
@@ -877,6 +877,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_http_referer', 'deDE', 'HTTP Referer', 2, 2, '2015-04-18 13:54:18', '2015-04-18 13:54:18');
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_http_referer', 'enUS', 'HTTP Referer', 2, 2, '2015-04-18 13:54:18', '2015-04-18 13:54:18');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_http_referer', 'sai_log');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_http_referer', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_http_referer', 'table');
DELETE FROM `system_text` WHERE id = 'table_http_user_agent';
@@ -884,6 +885,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_http_user_agent', 'deDE', 'HTTP User Agent', 2, 2, '2015-04-18 13:54:48', '2015-04-18 13:54:48');
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_http_user_agent', 'enUS', 'HTTP User Agent', 2, 2, '2015-04-18 13:54:48', '2015-04-18 13:54:48');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_http_user_agent', 'sai_log');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_http_user_agent', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_http_user_agent', 'table');
DELETE FROM `system_text` WHERE id = 'table_id';
@@ -891,6 +893,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_id', 'deDE', 'ID', 2, 2, '2015-04-23 01:54:42', '2015-04-23 01:54:42');
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_id', 'enUS', 'ID', 2, 2, '2015-04-18 13:49:38', '2015-04-18 13:49:38');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_log');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_text');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'table');
@@ -942,6 +945,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_property', 'deDE', 'Eigenschaft', 2, 2, '2015-04-18 13:56:35', '2015-04-18 13:56:35');
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_property', 'enUS', 'Property', 2, 2, '2015-04-18 13:56:35', '2015-04-18 13:56:35');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_property', 'sai_log');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_property', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_property', 'table');
DELETE FROM `system_text` WHERE id = 'table_querytime';
@@ -997,6 +1001,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_time', 'enUS', 'Time', 2, 2, '2015-04-18 13:52:11', '2015-04-18 13:52:11');
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_time', 'frFR', 'Temps', 3, 3, '2015-04-20 18:58:10', '2015-04-20 18:58:10');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_time', 'sai_log');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_time', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_time', 'table');
DELETE FROM `system_text` WHERE id = 'table_time_create';
@@ -1045,6 +1050,7 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_value', 'deDE', 'Wert(value)', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25');
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_value', 'enUS', 'Value', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_value', 'sai_log');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_value', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_value', 'table');
DELETE FROM `system_text` WHERE id = 'table_assignee';
@@ -1053,6 +1059,20 @@
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_assignee', 'enUS', 'Assignee', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_assignee', 'sai_todo');
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_assignee', 'table');
+
+ DELETE FROM `system_text` WHERE id = 'table_assignees';
+ DELETE FROM `system_text_tag` WHERE id = 'table_assignees';
+ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_assignees', 'deDE', 'Beauftragte', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25');
+ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_assignees', 'enUS', 'Assignees', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_assignees', 'sai_todo');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_assignees', 'table');
+
+ DELETE FROM `system_text` WHERE id = 'table_action';
+ DELETE FROM `system_text_tag` WHERE id = 'table_action';
+ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_action', 'deDE', 'Aktion', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25');
+ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_action', 'enUS', 'Action', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'sai_todo');
+ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'table');
-- Time
diff --git a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js
index 98e7dcd..f87c22c 100644
--- a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js
+++ b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js
@@ -52,6 +52,7 @@ function init_saimod_sys_todo_todoopen(){
register_open();
register_assign();
register_deassign();
+ register_deassign_user();
}
function init_saimod_sys_todo_todoclose(){
$('#btn_edit').click(function(){
@@ -67,6 +68,7 @@ function init_saimod_sys_todo_todoclose(){
register_close();
register_assign();
register_deassign();
+ register_deassign_user();
}
function init_saimod_sys_todo_new(){
@@ -139,4 +141,17 @@ function register_deassign(){
}
});
});
+}
+
+function register_deassign_user(){
+ $('.btn_deassign_user').click(function(){
+ $.ajax({ type : 'GET',
+ url : './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=deassign&todo='+$(this).attr('todo')+'&user='+$(this).attr('user'),
+ success : function(data) {
+ if(data.status){
+ window.location.reload();
+ }
+ }
+ });
+ });
}
\ No newline at end of file
diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_ASSIGNEES.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_ASSIGNEES.php
new file mode 100644
index 0000000..6237d36
--- /dev/null
+++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_ASSIGNEES.php
@@ -0,0 +1,18 @@
+id;
$vars = \SYSTEM\DBD\SYS_SAIMOD_TODO_TODO::Q1(array($todo,$userid));
- $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO));
$vars['trace'] = implode('', array_slice(explode('#', $vars['trace']), 1, -1));
$vars['display_assign'] = $vars['assignee_id'] != $userid ? '' : 'display: none;';
$vars['display_deassign'] = $vars['assignee_id'] == $userid ? '' : 'display: none;';
+ $vars['assignees'] = '';
+ $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_ASSIGNEES::QQ(array($todo,$userid));
+ while($row = $res->next()){
+ $vars['assignees'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl'), $row);
+ }
+ $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO));
return $vars[\SYSTEM\DBD\system_todo::FIELD_TYPE] == \SYSTEM\DBD\system_todo::FIELD_TYPE_USER ?
\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl'), $vars) :
\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl'), $vars);}
diff --git a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl
index 72b938f..0d63c5a 100644
--- a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl
+++ b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl
@@ -1,14 +1,23 @@
ToDo ${ID}
- | Property | Value |
- | ID | ${ID} |
- | ip | ${ip} |
- | querytime | ${querytime} |
- | time | ${time} |
- | http_referer | ${http_referer} |
- | http_user_agent | ${http_user_agent} |
- | user | ${username} |
- | message | |
+ | ${table_property} | ${table_value} |
+ | ${table_id} | ${ID} |
+ | ${table_ip} | ${ip} |
+ | ${table_querytime} | ${querytime} |
+ | ${table_time} | ${time} |
+ | ${table_http_referer} | ${http_referer} |
+ | ${table_http_user_agent} | ${http_user_agent} |
+ | ${table_author} | ${username} |
+ | ${table_message} | |
+
+ | ${table_assignees} |
+
+
+ | ${table_user} | ${table_action} |
+ ${assignees}
+
+ |
+
diff --git a/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl
new file mode 100644
index 0000000..e1daf70
--- /dev/null
+++ b/sai/modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl
@@ -0,0 +1,4 @@
+
+ | ${assignee} |
+ |
+
\ No newline at end of file