Download "admin" folder from FTP
This commit is contained in:
112
admin/templates/authors/author-edit.php
Normal file
112
admin/templates/authors/author-edit.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||
<?
|
||||
\S::set_session( 'admin', true );
|
||||
global $db;
|
||||
ob_start();
|
||||
?>
|
||||
<div id="settings-tabs">
|
||||
<ul class="resp-tabs-list settings-tabs">
|
||||
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||
<li><i class="fa fa-file"></i>Zawartość</li>
|
||||
</ul>
|
||||
<div class="resp-tabs-container settings-tabs">
|
||||
<div>
|
||||
<?= \Html::input( [
|
||||
'label' => 'Autor',
|
||||
'name' => 'author',
|
||||
'id' => 'author',
|
||||
'value' => $this -> author['author'],
|
||||
'class' => 'require'
|
||||
] );?>
|
||||
<?= \Html::input_icon( [
|
||||
'label' => 'Zdjęcie',
|
||||
'name' => 'image',
|
||||
'id' => 'image',
|
||||
'value' => $this -> author['image'],
|
||||
'icon_content' => 'przeglądaj',
|
||||
'icon_js' => "window.open ( '/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=image&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
|
||||
] );?>
|
||||
</div>
|
||||
<div>
|
||||
<div id="languages-main">
|
||||
<ul class="resp-tabs-list languages-main">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<li><?= $lg['name'];?></a></li>
|
||||
<? endif;?>
|
||||
<? endforeach;
|
||||
endif;?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-main">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<div>
|
||||
<?= \Html::textarea( [
|
||||
'label' => 'Opis',
|
||||
'name' => 'description',
|
||||
'id' => 'description_' . $lg['id'],
|
||||
'value' => $this -> author['languages'][$lg['id']]['description']
|
||||
] );?>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#description_<?= $lg['id'];?>').ckeditor({
|
||||
toolbar: 'MyTool',
|
||||
height: '300'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'author-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja autora';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> author['id']
|
||||
]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/authors/save/', 'back_url' => '/admin/authors/view_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/authors/view_list/' ]
|
||||
];
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(function ()
|
||||
{
|
||||
disable_menu();
|
||||
|
||||
$( '#settings-tabs' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'settings-tabs',
|
||||
type: 'vertical'
|
||||
});
|
||||
|
||||
$('#languages-main').easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-main'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||
41
admin/templates/authors/view-list.php
Normal file
41
admin/templates/authors/view-list.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_authors' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'author', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'author' => 'Autor', 'db' => 'name', 'type' => 'text' ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
], [
|
||||
'name' => 'Autor',
|
||||
'db' => 'author',
|
||||
'sort' => true,
|
||||
'php' => 'echo "<a href=\"/admin/authors/edit/id=[id]\">[author]</a>";'
|
||||
], [
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/authors/edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
], [
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/authors/delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj autora',
|
||||
'url' => '/admin/authors/edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
Reference in New Issue
Block a user