templates
This commit is contained in:
26
_ajax/get_training_template.php
Normal file
26
_ajax/get_training_template.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
//tag listánál ez adja vissza a keresés eredményét
|
||||||
|
ini_set('include_path', '../_class/');
|
||||||
|
include('class_sql.php');
|
||||||
|
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
|
||||||
|
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||||
|
|
||||||
|
if (empty($_GET['template_id'])) {
|
||||||
|
echo json_encode(null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
|
||||||
|
$template_query = "SELECT * FROM training_template WHERE tt_id = " . $_GET['template_id'];
|
||||||
|
|
||||||
|
$template_assoc_array = $sql->assoc_array($template_query);
|
||||||
|
|
||||||
|
if (isset($template_assoc_array[0])) {
|
||||||
|
echo json_encode($template_assoc_array[0]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo json_encode(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -102,6 +102,14 @@ class page {
|
|||||||
$tpl = "edit";
|
$tpl = "edit";
|
||||||
include('include_trainings.php');
|
include('include_trainings.php');
|
||||||
break;
|
break;
|
||||||
|
case 'training_templates':
|
||||||
|
# EDZÉS SABLONOK
|
||||||
|
include('include_training_templates.php');
|
||||||
|
break;
|
||||||
|
case 'delete_training_template':
|
||||||
|
# EDZÉS SABLON TÖRLÉS
|
||||||
|
include('include_delete_training_template.php');
|
||||||
|
break;
|
||||||
case 'shirts':
|
case 'shirts':
|
||||||
# PÓLÓK
|
# PÓLÓK
|
||||||
include('include_shirts.php');
|
include('include_shirts.php');
|
||||||
|
|||||||
118
_class/class_training_template.php
Normal file
118
_class/class_training_template.php
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class training_template {
|
||||||
|
private $tt_id;
|
||||||
|
private $tt_name;
|
||||||
|
private $tt_time;
|
||||||
|
private $tt_duration;
|
||||||
|
private $tt_training_type; //object
|
||||||
|
private $tt_deleted;
|
||||||
|
|
||||||
|
|
||||||
|
public function set_tt_id($_item) {
|
||||||
|
$this->tt_id = $_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tt_name($_item) {
|
||||||
|
$this->tt_name = $_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tt_time($_item) {
|
||||||
|
$this->tt_time = $_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tt_duration($_item) {
|
||||||
|
$this->tt_duration = $_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tt_training_type($_item) {
|
||||||
|
$this->tt_training_type = $_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tt_deleted($_item) {
|
||||||
|
$this->tt_deleted = $_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_tt_id() {
|
||||||
|
return $this->tt_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_tt_name() {
|
||||||
|
return $this->tt_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_tt_time() {
|
||||||
|
return $this->tt_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_tt_duration() {
|
||||||
|
return $this->tt_duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_tt_training_type() {
|
||||||
|
return $this->tt_training_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_tt_deleted() {
|
||||||
|
return $this->tt_deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tt_data_by_id($_id) {
|
||||||
|
global $sql;
|
||||||
|
$tt_data_assoc_array = $sql->assoc_array("select * from training_template where tt_id = " . $_id);
|
||||||
|
$tt_data_array = $tt_data_assoc_array[0];
|
||||||
|
foreach ($tt_data_array as $field => $value) {
|
||||||
|
$function_name = "set_" . $field;
|
||||||
|
$this->$function_name($value); //alapadatok beállítása
|
||||||
|
|
||||||
|
if ($field == 'tt_training_type' && $value != null) {
|
||||||
|
$new_trt = new training_type();
|
||||||
|
$new_trt->set_trt_data_by_id($value);
|
||||||
|
$this->set_tt_training_type($new_trt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create_tt($_name, $_time, $_type, $_duration) {
|
||||||
|
global $sql;
|
||||||
|
|
||||||
|
if ($_time == '') {
|
||||||
|
$_time = 'null';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_duration == '') {
|
||||||
|
$_duration = 'null';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sql->insert_into('training_template', array(
|
||||||
|
'tt_name' => $_name,
|
||||||
|
'tt_time' => $_time,
|
||||||
|
'tt_training_type' => $_type,
|
||||||
|
'tt_duration' => $_duration,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function update_tt($_name, $_time, $_type, $_duration, $_id) {
|
||||||
|
global $sql;
|
||||||
|
|
||||||
|
if ($_time == '') {
|
||||||
|
$_time = 'null';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_duration == '') {
|
||||||
|
$_duration = 'null';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql->update_table('training_template', array(
|
||||||
|
'tt_name' => $_name,
|
||||||
|
'tt_time' => $_time,
|
||||||
|
'tt_training_type' => $_type,
|
||||||
|
'tt_duration' => $_duration,
|
||||||
|
), array('tt_id' => $_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
class training_type {
|
class training_type {
|
||||||
private $trt_id;
|
private $trt_id;
|
||||||
private $trt_name;
|
private $trt_name;
|
||||||
|
private $trt_deleted;
|
||||||
|
|
||||||
public function set_trt_id($_id) {
|
public function set_trt_id($_id) {
|
||||||
$this->trt_id = $_id;
|
$this->trt_id = $_id;
|
||||||
@@ -15,6 +16,10 @@ class training_type {
|
|||||||
$this->trt_name = $_name;
|
$this->trt_name = $_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function set_trt_deleted($_deleted) {
|
||||||
|
$this->trt_deleted = $_deleted;
|
||||||
|
}
|
||||||
|
|
||||||
public function get_trt_id() {
|
public function get_trt_id() {
|
||||||
return $this->trt_id;
|
return $this->trt_id;
|
||||||
}
|
}
|
||||||
@@ -23,10 +28,25 @@ class training_type {
|
|||||||
return $this->trt_name;
|
return $this->trt_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_trt_deleted() {
|
||||||
|
return $this->trt_deleted;
|
||||||
|
}
|
||||||
|
|
||||||
public function create_training_type($_trt_value_array) {
|
public function create_training_type($_trt_value_array) {
|
||||||
global $sql;
|
global $sql;
|
||||||
return $sql->insert_into('training_type', $_trt_value_array);
|
return $sql->insert_into('training_type', $_trt_value_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function set_trt_data_by_id($_id) {
|
||||||
|
global $sql;
|
||||||
|
$trt_data_assoc_array = $sql->assoc_array("select * from training_type where trt_id = " . $_id);
|
||||||
|
$trt_data_array = $trt_data_assoc_array[0];
|
||||||
|
foreach ($trt_data_array as $field => $value) {
|
||||||
|
$function_name = "set_" . $field;
|
||||||
|
$this->$function_name($value); //alapadatok beállítása
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
_image/template.png
Normal file
BIN
_image/template.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -47,6 +47,10 @@ switch ($this->get_id()) {
|
|||||||
$training_type_query = "SELECT * FROM training_type ORDER BY trt_name ASC;";
|
$training_type_query = "SELECT * FROM training_type ORDER BY trt_name ASC;";
|
||||||
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||||
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||||
|
//TRAINING TEMPLATE ARRAY
|
||||||
|
$training_template_query = "SELECT * FROM training_template WHERE tt_deleted = 0 ORDER BY tt_name ASC;";
|
||||||
|
$training_templates = $sql->assoc_array($training_template_query);
|
||||||
|
$smarty->assign("training_templates", $training_templates);
|
||||||
//COACH ARRAY
|
//COACH ARRAY
|
||||||
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0 AND ua_name != 'Tóth Richárd';";
|
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0 AND ua_name != 'Tóth Richárd';";
|
||||||
$coach_data_assoc_array = $sql->assoc_array($coach_data_query);
|
$coach_data_assoc_array = $sql->assoc_array($coach_data_query);
|
||||||
@@ -235,6 +239,15 @@ switch ($this->get_id()) {
|
|||||||
# táborvezető létrehozása
|
# táborvezető létrehozása
|
||||||
$smarty->display('user_group_create.tpl');
|
$smarty->display('user_group_create.tpl');
|
||||||
break;
|
break;
|
||||||
|
case 'training_template':
|
||||||
|
# edzés sablon létrehozása
|
||||||
|
//TRAINING TYPE ARRAY
|
||||||
|
$training_type_query = "SELECT * FROM training_type ORDER BY trt_name ASC;";
|
||||||
|
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||||
|
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||||
|
|
||||||
|
$smarty->display('training_template_create.tpl');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
|
|||||||
11
_include/include_delete_training_template.php
Normal file
11
_include/include_delete_training_template.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if ($this->is_id()) {
|
||||||
|
$sql->update_table('training_template', array('tt_deleted' => 1), array('tt_id' => $this->get_id()));
|
||||||
|
|
||||||
|
log::register('delete_training_template', $this->get_id());
|
||||||
|
header("Location: /admin/training_templates");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
45
_include/include_training_templates.php
Normal file
45
_include/include_training_templates.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
# HA NINCS ID, AKKOR SABLONLISTA
|
||||||
|
|
||||||
|
if ($this->is_id()) {
|
||||||
|
|
||||||
|
# SABLON SZERKESZTÉSE
|
||||||
|
|
||||||
|
//training adatok
|
||||||
|
$training_template_data_query = "SELECT * FROM training_template WHERE tt_id = " . $this->get_id();
|
||||||
|
$tt_data_assoc_array = $sql->assoc_array($training_template_data_query);
|
||||||
|
$smarty->assign('template_data', $tt_data_assoc_array[0]);
|
||||||
|
|
||||||
|
//TRAINING TYPE ARRAY
|
||||||
|
$training_type_query = "SELECT * FROM training_type WHERE trt_deleted = 0 ORDER BY trt_name ASC;";
|
||||||
|
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||||
|
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||||
|
|
||||||
|
$smarty->display('training_template_edit.tpl');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
# SABLON LISTA
|
||||||
|
|
||||||
|
$tt_query = "SELECT * FROM training_template WHERE tt_deleted = 0 ORDER BY tt_name ASC";
|
||||||
|
$tt_assoc_array = $sql->assoc_array($tt_query);
|
||||||
|
|
||||||
|
$tts = array();
|
||||||
|
|
||||||
|
foreach ($tt_assoc_array as $tt) {
|
||||||
|
$new_tt = new training_template();
|
||||||
|
$new_tt->set_tt_data_by_id($tt['tt_id']);
|
||||||
|
$tts[] = $new_tt;
|
||||||
|
}
|
||||||
|
|
||||||
|
$smarty->assign('tts',$tts);
|
||||||
|
$smarty->display('training_template_list.tpl');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -162,6 +162,7 @@ if (isset($_POST['action'])) {
|
|||||||
# training create
|
# training create
|
||||||
# a training_list-re ugrik vissza, mert lehet h többet is létrehoz
|
# a training_list-re ugrik vissza, mert lehet h többet is létrehoz
|
||||||
unset($_POST['action']);
|
unset($_POST['action']);
|
||||||
|
unset($_POST['training_templates']);
|
||||||
|
|
||||||
$every_week = isset($_POST['every_week']);
|
$every_week = isset($_POST['every_week']);
|
||||||
$jumpTo = $_POST['jumpTo'];
|
$jumpTo = $_POST['jumpTo'];
|
||||||
@@ -573,6 +574,18 @@ if (isset($_POST['action'])) {
|
|||||||
header('Location: /admin/milestones/success');
|
header('Location: /admin/milestones/success');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'training_template_create':
|
||||||
|
# új edzés salon
|
||||||
|
$new_tt_id = training_template::create_tt($_POST['tt_name'], $_POST['tt_time'], $_POST['tt_training_type'], $_POST['tt_duration']);
|
||||||
|
log::register('new_training_template', $new_tt_id);
|
||||||
|
header('Location: /admin/training_templates/'.$new_tt_id);
|
||||||
|
break;
|
||||||
|
case 'training_template_update':
|
||||||
|
# edzés salon update
|
||||||
|
training_template::update_tt($_POST['tt_name'], $_POST['tt_time'], $_POST['tt_training_type'], $_POST['tt_duration'], $_POST['tt_id']);
|
||||||
|
log::register('update_training_template', $_POST['tt_id']);
|
||||||
|
header('Location: /admin/training_templates/'.$_POST['tt_id']);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title1" for="mod_sum">Összeg:</label>
|
<label class="desc" id="title1" for="mod_sum">Összeg:</label>
|
||||||
<div><input type="text" name="mod_sum" id="mod_sum" value="8000" required></div>
|
<div><input type="text" name="mod_sum" id="mod_sum" required></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,21 @@
|
|||||||
<input type="hidden" name="action" id="action" value="training_data_create">
|
<input type="hidden" name="action" id="action" value="training_data_create">
|
||||||
<input type="hidden" name="jumpTo" id="jumpTo" value="0">
|
<input type="hidden" name="jumpTo" id="jumpTo" value="0">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" for="training_templates">Sablon:</label>
|
||||||
|
<div>
|
||||||
|
<select name="training_templates" id="training_templates">
|
||||||
|
<option value="null"> - </option>
|
||||||
|
{foreach $training_templates as $template}
|
||||||
|
<option value="{$template.tt_id}">
|
||||||
|
{$template.tt_name}
|
||||||
|
</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title1" for="tr_date">Dátum:</label>
|
<label class="desc" id="title1" for="tr_date">Dátum:</label>
|
||||||
@@ -78,4 +93,45 @@
|
|||||||
$('.save').trigger('click');
|
$('.save').trigger('click');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#training_templates').on('change', function(e) {
|
||||||
|
let selectedTemplate = $('#training_templates option:selected').val();
|
||||||
|
console.log(selectedTemplate);
|
||||||
|
$.ajax({
|
||||||
|
url: '/_ajax/get_training_template.php',
|
||||||
|
//method: 'GET',
|
||||||
|
data: {
|
||||||
|
'template_id' : selectedTemplate
|
||||||
|
},
|
||||||
|
success: function(data, status, jqXHR) {
|
||||||
|
var pdata = JSON.parse(data);
|
||||||
|
|
||||||
|
if (null == pdata) {
|
||||||
|
|
||||||
|
$('#tr_date').val('');
|
||||||
|
$('#tr_training_type_trt_id').val('null');
|
||||||
|
$('#tr_duration').val('');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(pdata);
|
||||||
|
|
||||||
|
var d = new Date();
|
||||||
|
|
||||||
|
var month = d.getMonth()+1;
|
||||||
|
var day = d.getDate();
|
||||||
|
|
||||||
|
var output = d.getFullYear() + '-' +
|
||||||
|
((''+month).length<2 ? '0' : '') + month + '-' +
|
||||||
|
((''+day).length<2 ? '0' : '') + day;
|
||||||
|
|
||||||
|
|
||||||
|
if (null != pdata['tt_time']) $('#tr_date').val(output + ' ' + pdata['tt_time']);
|
||||||
|
if (null != pdata['tt_training_type']) $('#tr_training_type_trt_id').val(pdata['tt_training_type']);
|
||||||
|
if (null != pdata['tt_duration']) $('#tr_duration').val(pdata['tt_duration']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a href="/admin/create/training" class="addbutton add-big">Új edzés hozzáadása</a>
|
<a href="/admin/create/training" class="addbutton add-big">Új edzés hozzáadása</a>
|
||||||
<a href="/admin/training_types" class="addbutton add-big">Edzés típusok szerkesztése</a>
|
<a href="/admin/training_types" class="addbutton add-big">Edzés típusok szerkesztése</a>
|
||||||
|
<a href="/admin/training_templates" class="addbutton add-big">Edzés sablonok szerkesztése</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
|
|||||||
42
template/templates/training_template_create.tpl
Normal file
42
template/templates/training_template_create.tpl
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<div class="form_wrapper">
|
||||||
|
<form method="post">
|
||||||
|
<input type="hidden" name="action" value="training_template_create">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title1" for="tt_name">Új edzés sablon neve:</label>
|
||||||
|
<div><input type="text" name="tt_name" id="tt_name" required></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title1" for="tt_time">Edzés ideje:</label>
|
||||||
|
<div><input type="text" name="tt_time" id="tt_time" placeholder="ÓÓ:PP"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title2" for="tt_training_type">Típus:</label>
|
||||||
|
<div>
|
||||||
|
<select name="tt_training_type" id="tt_training_type">
|
||||||
|
<option value="null"> - </option>
|
||||||
|
{foreach $training_type_assoc_array as $training_type_array}
|
||||||
|
<option value="{$training_type_array.trt_id}">
|
||||||
|
{$training_type_array.trt_name}
|
||||||
|
</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title1" for="tt_duration">Időtartam (perc):</label>
|
||||||
|
<div><input type="text" name="tt_duration" id="tt_duration"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<input class="button black" type="submit" value="Létrehozás">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
46
template/templates/training_template_edit.tpl
Normal file
46
template/templates/training_template_edit.tpl
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="form_wrapper">
|
||||||
|
<form method="post">
|
||||||
|
<div class="buttons">
|
||||||
|
<a href="/admin/delete_training_template/{$template_data.tt_id}" class="addbutton delete-big">Törlés</a>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="action" value="training_template_update">
|
||||||
|
<input type="hidden" name="tt_id" value="{$template_data.tt_id}">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title1" for="tt_name">Új edzés sablon neve:</label>
|
||||||
|
<div><input type="text" name="tt_name" id="tt_name" value="{$template_data.tt_name}" required></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title1" for="tt_time">Edzés ideje:</label>
|
||||||
|
<div><input type="text" name="tt_time" id="tt_time" placeholder="ÓÓ:PP" value="{$template_data.tt_time}"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title2" for="tt_training_type">Típus:</label>
|
||||||
|
<div>
|
||||||
|
<select name="tt_training_type" id="tt_training_type">
|
||||||
|
<option value="null"> - </option>
|
||||||
|
{foreach $training_type_assoc_array as $training_type_array}
|
||||||
|
<option value="{$training_type_array.trt_id}"{if $training_type_array.trt_id == $template_data.tt_training_type} selected{/if}>
|
||||||
|
{$training_type_array.trt_name}
|
||||||
|
</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" id="title1" for="tt_duration">Időtartam (perc):</label>
|
||||||
|
<div><input type="text" name="tt_duration" id="tt_duration" value="{$template_data.tt_duration}"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<input class="button black" type="submit" value="Mentés">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
18
template/templates/training_template_list.tpl
Normal file
18
template/templates/training_template_list.tpl
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<div class="buttons">
|
||||||
|
|
||||||
|
<a href="/admin/create/training_template" class="addbutton add-big">Új edzés sablon</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="list">
|
||||||
|
{foreach $tts as $template}
|
||||||
|
<a href="/admin/training_templates/{$template->get_tt_id()}">
|
||||||
|
<div class="list_item">
|
||||||
|
<img src="/_image/template.png">
|
||||||
|
{$template->get_tt_name()}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user