mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
This commit is contained in:
@@ -190,6 +190,7 @@ $config['fhc_acl'] = array
|
|||||||
'public.tbl_tag' => 'basis/tag',
|
'public.tbl_tag' => 'basis/tag',
|
||||||
'public.tbl_variable' => 'basis/variable',
|
'public.tbl_variable' => 'basis/variable',
|
||||||
'public.tbl_vorlage' => 'system/vorlage',
|
'public.tbl_vorlage' => 'system/vorlage',
|
||||||
|
'public.tbl_vorlagedokument' => 'system/vorlagestudiengang',
|
||||||
'public.tbl_vorlagestudiengang' => 'system/vorlagestudiengang',
|
'public.tbl_vorlagestudiengang' => 'system/vorlagestudiengang',
|
||||||
'public.tbl_rt_person' => 'basis/person',
|
'public.tbl_rt_person' => 'basis/person',
|
||||||
'public.vw_studiensemester' => 'basis/studiensemester',
|
'public.vw_studiensemester' => 'basis/studiensemester',
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class Templates extends FHC_Controller
|
|||||||
$vorlagentext = $this->vorlagelib->getVorlagetextByVorlage($vorlage_kurzbz);
|
$vorlagentext = $this->vorlagelib->getVorlagetextByVorlage($vorlage_kurzbz);
|
||||||
if ($vorlagentext->error)
|
if ($vorlagentext->error)
|
||||||
show_error($vorlagentext->retval);
|
show_error($vorlagentext->retval);
|
||||||
//var_dump($vorlage);
|
//var_dump($vorlagentext);
|
||||||
|
|
||||||
$data = array
|
$data = array
|
||||||
(
|
(
|
||||||
@@ -128,6 +128,43 @@ class Templates extends FHC_Controller
|
|||||||
$this->load->view('system/templatetextEdit', $data);
|
$this->load->view('system/templatetextEdit', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function linkDocuments($vorlagestudiengang_id)
|
||||||
|
{
|
||||||
|
$this->load->model('system/vorlagedokument_model');
|
||||||
|
$return = $this->vorlagedokument_model->loadDokumenteFromVorlagestudiengang($vorlagestudiengang_id);
|
||||||
|
$data['documents'] = $return->retval;
|
||||||
|
|
||||||
|
$this->load->model('system/dokument_model');
|
||||||
|
$this->dokument_model->addOrder("bezeichnung");
|
||||||
|
$return = $this->dokument_model->load();
|
||||||
|
$data['allDocuments'] = $return->retval;
|
||||||
|
|
||||||
|
$data['vorlagestudiengang_id'] = $vorlagestudiengang_id;
|
||||||
|
|
||||||
|
$this->load->view('system/templateLinkDocuments', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function saveDocuments($vorlagestudiengang_id, $dokument_kurzbz, $sort)
|
||||||
|
{
|
||||||
|
$this->load->model('system/vorlagedokument_model');
|
||||||
|
$insert['vorlagestudiengang_id'] = $vorlagestudiengang_id;
|
||||||
|
$insert['dokument_kurzbz'] = $dokument_kurzbz;
|
||||||
|
$insert['sort'] = $sort;
|
||||||
|
$this->vorlagedokument_model->insert($insert);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteDocumentLink($vorlagestudiengang_id)
|
||||||
|
{
|
||||||
|
$this->load->model('system/vorlagedokument_model');
|
||||||
|
$this->vorlagedokument_model->delete($vorlagestudiengang_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function changeSort($vorlagestudiengang_id, $sort)
|
||||||
|
{
|
||||||
|
$this->load->model('system/vorlagedokument_model');
|
||||||
|
$this->vorlagedokument_model->update($vorlagestudiengang_id, array("sort"=>$sort));
|
||||||
|
}
|
||||||
|
|
||||||
public function saveText()
|
public function saveText()
|
||||||
{
|
{
|
||||||
$vorlagestudiengang_id = $this->input->post('vorlagestudiengang_id', TRUE);
|
$vorlagestudiengang_id = $this->input->post('vorlagestudiengang_id', TRUE);
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
class Dokument_model extends DB_Model
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->dbTable = 'public.tbl_dokument';
|
||||||
|
$this->pk = 'dokument_kurzbz';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
class Vorlagedokument_model extends DB_Model
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->dbTable = 'public.tbl_vorlagedokument';
|
||||||
|
$this->pk = 'vorlagedokument_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function loadDokumenteFromVorlagestudiengang($vorlagestudiengang_id)
|
||||||
|
{
|
||||||
|
// Checks if the operation is permitted by the API caller
|
||||||
|
if (! $this->fhc_db_acl->isBerechtigt($this->getBerechtigungKurzbz('public.tbl_vorlagedokument'), 's'))
|
||||||
|
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->getBerechtigungKurzbz('public.tbl_vorlagedokument'), FHC_MODEL_ERROR);
|
||||||
|
|
||||||
|
$result = null;
|
||||||
|
|
||||||
|
$qry = "SELECT vorlagedokument_id, sort, vorlagestudiengang_id, dokument_kurzbz, bezeichnung
|
||||||
|
FROM public.tbl_vorlagedokument
|
||||||
|
JOIN public.tbl_dokument USING(dokument_kurzbz)
|
||||||
|
WHERE vorlagestudiengang_id=?
|
||||||
|
ORDER BY sort ASC
|
||||||
|
";
|
||||||
|
|
||||||
|
$result = $this->db->query($qry, array($vorlagestudiengang_id));
|
||||||
|
|
||||||
|
|
||||||
|
if (is_object($result))
|
||||||
|
return $this->_success($result->result());
|
||||||
|
else
|
||||||
|
return $this->_error($this->db->error(), FHC_DB_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
$this->load->view('templates/header', array('title' => 'TemplateLinkDocuments', 'tablesort' => true, 'tableid' => 't1', 'sortList' => '2,1', 'headers' => '3:{sorter:false},4:{sorter:false}'));
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function addDocument(dokument_kurzbz)
|
||||||
|
{
|
||||||
|
var addDocumentDefault = document.getElementById("addDocumentDefault");
|
||||||
|
addDocumentDefault.selected = true;
|
||||||
|
|
||||||
|
|
||||||
|
$.post("../saveDocuments/"+<?=$vorlagestudiengang_id?>+"/"+dokument_kurzbz+"/0", function(answer)
|
||||||
|
{
|
||||||
|
window.location.href=window.location.href;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function delDocument(vorlagedokument_id)
|
||||||
|
{
|
||||||
|
$.post("../deleteDocumentLink/"+vorlagedokument_id, function(answer)
|
||||||
|
{
|
||||||
|
window.location.href=window.location.href;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function changeSort(vorlagedokument_id, sortnum)
|
||||||
|
{
|
||||||
|
$.post("../changeSort/"+vorlagedokument_id+"/"+sortnum, function(answer)
|
||||||
|
{
|
||||||
|
window.location.href=window.location.href;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<h2><?=$vorlagestudiengang_id?></h2>
|
||||||
|
<table id="t1" class="tablesorter">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Bezeichnung</th>
|
||||||
|
<th>Sortierung</th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($documents as $d): ?>
|
||||||
|
<tr>
|
||||||
|
<td><?=$d->vorlagedokument_id?></td>
|
||||||
|
<td><?=$d->bezeichnung?></td>
|
||||||
|
<td> <?=$d->sort?></td>
|
||||||
|
<td><a onclick="changeSort('<?=$d->vorlagedokument_id?>', <?=$d->sort?>+1)"><img src="<?php echo APP_ROOT?>/skin/images/up.png"/></a> <a onclick="changeSort('<?=$d->vorlagedokument_id?>', <?=$d->sort?>-1)"><img src="<?php echo APP_ROOT?>/skin/images/down.png"/></a></td>
|
||||||
|
<td><a onclick="delDocument('<?=$d->vorlagedokument_id?>')">löschen</a></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<select>
|
||||||
|
<option selected="true" id="addDocumentDefault" disabled>Dokument hinzufuegen</option>
|
||||||
|
<?php foreach($allDocuments as $d): ?>
|
||||||
|
<option onclick="addDocument('<?=$d->dokument_kurzbz?>');"><?=$d->bezeichnung?></option>
|
||||||
|
<?php endforeach ;?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$this->load->view('templates/header', array('title' => 'TemplatetextList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '7:{sorter:false}'));
|
$this->load->view('templates/header', array('title' => 'TemplatetextList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '7:{sorter:false},8:{sorter:false},9:{sorter:false}'));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -11,20 +11,24 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table id="t1" class="tablesorter">
|
<table id="t1" class="tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th class='table-sortable:default'>ID</th>
|
<tr>
|
||||||
<th class='table-sortable:default'>Vorlage</th>
|
<th>ID</th>
|
||||||
<th class='table-sortable:default'>Version</th>
|
<th>Vorlage</th>
|
||||||
<th class='table-sortable:default'>OrgEinheit</th>
|
<th>Version</th>
|
||||||
<th class='table-sortable:default'>OrgForm</th>
|
<th>OrgEinheit</th>
|
||||||
<th class='table-sortable:default'>Berechtigung</th>
|
<th>OrgForm</th>
|
||||||
<th>Anmerkung</th><th>Aktiv</th>
|
<th>Berechtigung</th>
|
||||||
<th></th>
|
<th>Anmerkung</th>
|
||||||
</tr>
|
<th>Aktiv</th>
|
||||||
</thead>
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($vorlagentext as $v): ?>
|
<?php foreach ($vorlagentext as $v): ?>
|
||||||
<tr><td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlagestudiengang_id; ?></a></td>
|
<tr>
|
||||||
|
<td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlagestudiengang_id; ?></a></td>
|
||||||
<td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlage_kurzbz; ?></a></td>
|
<td><a href="../edittext/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom"><?php echo $v->vorlage_kurzbz; ?></a></td>
|
||||||
<td><?php echo $v->version; ?></td>
|
<td><?php echo $v->version; ?></td>
|
||||||
<td><?php echo $v->oe_kurzbz; ?></td>
|
<td><?php echo $v->oe_kurzbz; ?></td>
|
||||||
@@ -32,7 +36,8 @@
|
|||||||
<td><?php echo $v->berechtigung; ?></td>
|
<td><?php echo $v->berechtigung; ?></td>
|
||||||
<td><?php echo $v->anmerkung_vorlagestudiengang; ?></td>
|
<td><?php echo $v->anmerkung_vorlagestudiengang; ?></td>
|
||||||
<td><?php echo $v->aktiv; ?></td>
|
<td><?php echo $v->aktiv; ?></td>
|
||||||
<td><a href="../editText/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom">Edit</a></td>
|
<td><a href="../editText/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom">Edit Text</a></td>
|
||||||
|
<td><a href="../linkDocuments/<?php echo $v->vorlagestudiengang_id; ?>" target="TemplatesBottom">Edit Documents</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -1313,7 +1313,7 @@ if($result = $db->db_query("SELECT * FROM public.tbl_vorlage WHERE vorlage_kurzb
|
|||||||
$testQuery = "SELECT setval('seq_vorlagestudiengang_vorlagestudiengang_id', max(vorlagestudiengang_id)) FROM tbl_vorlagestudiengang;";
|
$testQuery = "SELECT setval('seq_vorlagestudiengang_vorlagestudiengang_id', max(vorlagestudiengang_id)) FROM tbl_vorlagestudiengang;";
|
||||||
$testResult = $db->db_query($testQuery);
|
$testResult = $db->db_query($testQuery);
|
||||||
|
|
||||||
$text = file_get_contents('./system/xsl/Bewerberakt.xsl');
|
$text = file_get_contents('../system/xsl/Bewerberakt.xsl');
|
||||||
|
|
||||||
while($row = $db->db_fetch_object($result))
|
while($row = $db->db_fetch_object($result))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user