contact info for persons

This commit is contained in:
Ulf Gebhardt 2019-09-06 17:43:25 +02:00
parent 793a78a329
commit 982ad0fe57
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
10 changed files with 28 additions and 7 deletions

View File

@ -13,6 +13,10 @@
<th scope="row">${table_projects}</th>
<td>${projects}</td>
</tr>
<tr>
<th scope="row">${table_contact}</th>
<td>${contact}</td>
</tr>
</table>
</div>
</div>

View File

@ -138,6 +138,7 @@ function init_saimod_person_new(){
img = $('#input-person-image').val();
name = $('#input-person-name').val();
info = $('#input-person-info').val();
contact = $('#input-person-contact').val();
visibility = $('#input-person-visibility').val();
$.ajax({
async: true,
@ -151,6 +152,7 @@ function init_saimod_person_new(){
img: img,
name: name,
info: info,
contact: contact,
visibility: visibility,
}
},
@ -434,6 +436,7 @@ function init_saimod_person_details(){
img = $('#input-person-image').val();
name = $('#input-person-name').val();
info = $('#input-person-info').val();
contact = $('#input-person-contact').val();
visibility = $('#input-person-visibility').val();
$.ajax({
async: true,
@ -448,6 +451,7 @@ function init_saimod_person_details(){
img: img,
name: name,
info: info,
contact: contact,
visibility: visibility,
}
},

View File

@ -89,6 +89,7 @@ class saimod_person extends \SYSTEM\SAI\sai_module{
\SQL\INSERT_PERSON::QI(array( $data['img'],
$data['name'],
$data['info'],
$data['contact'],
$data['visibility']))
);
}
@ -153,9 +154,10 @@ class saimod_person extends \SYSTEM\SAI\sai_module{
public static function sai_mod__SAI_saimod_person_action_person_update($data){
return \SYSTEM\LOG\JsonResult::status(
\SQL\UPDATE_PERSON::QI(array( $data['img'],
\SQL\UPDATE_PERSON::QI(array( $data['img'],
$data['name'],
$data['info'],
$data['contact'],
$data['visibility'],
$data['person']))
);

View File

@ -28,8 +28,8 @@ class INSERT_PERSON extends \SYSTEM\DB\QP {
* @return string Returns MYSQL Query String
*/
public static function mysql(){return
'INSERT INTO `persons` (`img`, `name`, `info`, `order`, `visible`)'.
' VALUES(?, ?, ?, (IFNULL((SELECT MAX(`order`)+1 FROM `persons` as `p`),1)), ?);';
'INSERT INTO `persons` (`img`, `name`, `info`, `contact`, `order`, `visible`)'.
' VALUES(?, ?, ?, ?, (IFNULL((SELECT MAX(`order`)+1 FROM `persons` as `p`),1)), ?);';
}
}

View File

@ -29,7 +29,7 @@ class UPDATE_PERSON extends \SYSTEM\DB\QP {
*/
public static function mysql(){return
'UPDATE `persons`'.
' SET `img` = ?, `name` = ?, `info` = ?, visible = ?'.
' SET `img` = ?, `name` = ?, `info` = ?, `contact` = ?, visible = ?'.
' WHERE `id` = ?;';
}

View File

@ -3,12 +3,12 @@
<table class="table table-striped table-condensed tablesorter sai_margin_off" id="table_persons">
<thead>
<tr>
<th colspan="7">
<th colspan="8">
Rows: ${count} Page: ${page}
</th>
</tr>
<tr>
<th colspan="6">
<th colspan="7">
<input class="input-medium search-query action-control" id="input_search" type="text" placeholder="Search" size="40" style="width: 100%;" value="${search}"/>
</th>
<th>
@ -19,6 +19,7 @@
<th>Image</th>
<th>Name</th>
<th>Info</th>
<th>Contact</th>
<th>Abilities</th>
<th>Order</th>
<th>Visible</th>

View File

@ -20,6 +20,10 @@
<th>Info</th>
<td><textarea id="input-person-info" class="form-control" style="width: 100%; min-height: 100px;">${info}</textarea></td>
</tr>
<tr>
<th>Info</th>
<td><textarea id="input-person-contact" class="form-control" style="width: 100%; min-height: 100px;">${contact}</textarea></td>
</tr>
<tr>
<th>Visibility</th>
<td>

View File

@ -20,6 +20,10 @@
<th>Info</th>
<td><textarea id="input-person-info" class="form-control" style="width: 100%; min-height: 100px;"></textarea></td>
</tr>
<tr>
<th>Contact</th>
<td><textarea id="input-person-contact" class="form-control" style="width: 100%; min-height: 100px;"></textarea></td>
</tr>
<tr>
<th>Visibility</th>
<td>

View File

@ -2,6 +2,7 @@
<td><a href="#!person(details);person.${id}"><img src="./files/persons/${img}" style="width: 50px; height: 50px;"/></a></td>
<td><a href="#!person(details);person.${id}">${name}</a></td>
<td>${info}</td>
<td>${contact}</td>
<td>${abilities}</td>
<td style="font-size: 30px">
<a href="#" class="person-order-up" person="${id}" order="${order}"><i class="fa fa-caret-up"></i></a>

View File

@ -3,6 +3,7 @@ CREATE TABLE `persons` (
`name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`img` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`info` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`contact` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`order` INT(10) UNSIGNED NOT NULL,
`visible` INT(10) UNSIGNED NULL DEFAULT 1,
PRIMARY KEY (`id`),
@ -11,4 +12,4 @@ CREATE TABLE `persons` (
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1
;
;