Skip to content

Commit

Permalink
Example application:
Browse files Browse the repository at this point in the history
------------
* Many UI/UX improvements and bug fixes
  • Loading branch information
mirekmarek committed May 28, 2024
1 parent d227520 commit 46d4cde
Show file tree
Hide file tree
Showing 37 changed files with 222 additions and 276 deletions.
19 changes: 8 additions & 11 deletions application/Modules/Admin/Auth/Login/views/is-blocked.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ use Jet\UI_icon;
<?php require '_language_select.phtml'; ?>
</h5>
<div class="card-body">

<table>
<tr>
<td style="padding: 5px;">
<?= UI::icon( 'times-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
</td>
<td>
<?= Tr::_( '<b>Your account is blocked!</b><br/>Please contact your system administrator.' ); ?>
</td>
</tr>
</table>
<div style="display: flex; align-items: center;gap: 10px;">
<div>
<?= UI::icon( 'times-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
</div>
<div>
<?= Tr::_( '<b>Your account is blocked!</b><br/>Please contact your system administrator.' ); ?>
</div>
</div>

<div style="padding-top: 10px">
<a href="?logout" class="btn btn-light"><?= Tr::_( 'Logout' ); ?></a>
Expand Down
19 changes: 8 additions & 11 deletions application/Modules/Admin/Auth/Login/views/is-not-activated.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ use Jet\UI_icon;
<?= Tr::_( 'Account is not activated' ) ?>
<?php require '_language_select.phtml'; ?>
</h5>

<div class="card-body">
<table>
<tr>
<td style="padding: 5px;">
<?= UI::icon( 'times-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
</td>
<td>
<?= Tr::_( '<b>Your account is not activated!</b><br/>Please contact your system administrator.' ); ?>
</td>
</tr>
</table>
<div style="display: flex; align-items: center;gap: 10px;">
<div>
<?= UI::icon( 'times-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
</div>
<div>
<?= Tr::_( '<b>Your account is not activated!</b><br/>Please contact your system administrator.' ); ?>
</div>
</div>

<div style="padding-top: 10px">
<a href="?logout" class="btn btn-light"><?= Tr::_( 'Logout' ); ?></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use Jet\UI_icon;
*/
$form = $this->getRaw( 'form' );

$form->renderer()->setDefaultLabelWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 2] );
$form->renderer()->setDefaultFieldWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 10] );
$form->renderer()->setDefaultLabelWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 4] );
$form->renderer()->setDefaultFieldWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 8] );
?>

<div class="card">
Expand All @@ -24,18 +24,16 @@ $form->renderer()->setDefaultFieldWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 10] )
</h5>
<?= $form->start() ?>
<div class="card-body">
<table>
<tr>
<td style="padding: 5px;">
<?= UI::icon( 'exclamation-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
</td>
<td>
<?= Tr::_( '<b>Your password expired.</b><br/>Please change your password.' ); ?>
</td>
</tr>
</table>
<div style="display: flex; align-items: center;gap: 10px;">
<div>
<?= UI::icon( 'exclamation-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
</div>
<div>
<?= Tr::_( '<b>Your password expired.</b><br/>Please change your password.' ); ?>
</div>
</div>

<div style="padding-top: 30px">
<div style="padding-top: 30px;padding-left: 20%;padding-right: 20%">
<?= $form->field( 'password' ) ?>
<?= $form->field( 'password_check' ) ?>
</div>
Expand Down
43 changes: 18 additions & 25 deletions application/Modules/Admin/EventViewer/Admin/views/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,34 @@ $listing = $this->getRaw('listing');
$grid = $listing->getGrid();
$filter_form = $listing->getFilterForm();

$filter_form->renderer()->setDefaultLabelWidth([]);
$filter_form->renderer()->setDefaultFieldWidth([]);

$grid->getColumn( Listing_Column_ID::KEY )->addCustomCssStyle( 'width:120px;' );

?>

<?=$filter_form->start()?>
<div class="row toolbar">

<div class="col-md-3 col-sm-12">
<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>

<?php require 'list/export.phtml'; ?>
</div>
<div class="col-md-9 col-sm-12">
<table>
<tr>
<?=$listing->filter(Listing_Filter_DateTime::KEY)->renderForm()?>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_EventClass::KEY)->renderForm()?>
<td></td>
<?=$listing->filter(Listing_Filter_Event::KEY)->renderForm()?>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_User::KEY)->renderForm()?>
<td colspan="3"></td>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_ContextObject::KEY)->renderForm()?>
<td colspan="3"></td>

<td><?=UI::button(Tr::_('Filter'))->setClass( UI_button::CLASS_PRIMARY )->setType( UI_button::TYPE_SUBMIT )?></td>
</tr>
</table>

<div class="col-md-9 col-sm-12" style="display: grid;grid-template-columns: 130px 300px 10px 130px 300px;align-items: center;gap: 10px;">
<div style="grid-column: span 5;">
<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>
</div>

<?=$listing->filter(Listing_Filter_DateTime::KEY)->renderForm()?>
<?=$listing->filter(Listing_Filter_EventClass::KEY)->renderForm()?>
<div></div>
<?=$listing->filter(Listing_Filter_Event::KEY)->renderForm()?>
<?=$listing->filter(Listing_Filter_User::KEY)->renderForm()?>
<div></div>
<?=$listing->filter(Listing_Filter_ContextObject::KEY)->renderForm()?>
<div style="grid-column: span 5;text-align: right">
<?=UI::button(Tr::_('Filter'))->setClass( UI_button::CLASS_PRIMARY )->setType( UI_button::TYPE_SUBMIT )?>
</div>

</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'context_object_id' )->label() ?></td>
<td><?= $filter_form->field( 'context_object_id' )->input()?></td>
<?= $filter_form->field( 'context_object_id' )->label() ?>
<div><?= $filter_form->field( 'context_object_id' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'date_time_from' )->label() ?></td>
<td><?= $filter_form->field( 'date_time_from' )->input()?></td>
<td></td>
<td nowrap=""><?= $filter_form->field( 'date_time_till' )->label() ?></td>
<td><?= $filter_form->field( 'date_time_till' )->input()?></td>
<?= $filter_form->field( 'date_time_from' )->label() ?>
<div><?= $filter_form->field( 'date_time_from' )->input()?></div>
<div></div>
<?= $filter_form->field( 'date_time_till' )->label() ?>
<div><?= $filter_form->field( 'date_time_till' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'event' )->label() ?></td>
<td><?= $filter_form->field( 'event' )->input()?></td>
<?= $filter_form->field( 'event' )->label() ?>
<div><?= $filter_form->field( 'event' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'event_class' )->label() ?></td>
<td><?= $filter_form->field( 'event_class' )->input()?></td>
<?= $filter_form->field( 'event_class' )->label() ?>
<div><?= $filter_form->field( 'event_class' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'user_id' )->label() ?></td>
<td><?= $filter_form->field( 'user_id' )->input()?></td>
<?= $filter_form->field( 'user_id' )->label() ?>
<div><?= $filter_form->field( 'user_id' )->input()?></div>
41 changes: 17 additions & 24 deletions application/Modules/Admin/EventViewer/REST/views/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,33 @@ $listing = $this->getRaw('listing');
$grid = $listing->getGrid();
$filter_form = $listing->getFilterForm();

$filter_form->renderer()->setDefaultLabelWidth([]);
$filter_form->renderer()->setDefaultFieldWidth([]);

$grid->getColumn( Listing_Column_ID::KEY )->addCustomCssStyle( 'width:120px;' );

?>

<?=$filter_form->start()?>
<div class="row toolbar">

<div class="col-md-3 col-sm-12">
<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>

<?php require 'list/export.phtml'; ?>
</div>
<div class="col-md-9 col-sm-12">
<table>
<tr>
<?=$listing->filter(Listing_Filter_DateTime::KEY)->renderForm()?>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_EventClass::KEY)->renderForm()?>
<td></td>
<?=$listing->filter(Listing_Filter_Event::KEY)->renderForm()?>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_User::KEY)->renderForm()?>
<td colspan="3"></td>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_ContextObject::KEY)->renderForm()?>
<td colspan="3"></td>

<td><?=UI::button(Tr::_('Filter'))->setClass( UI_button::CLASS_PRIMARY )->setType( UI_button::TYPE_SUBMIT )?></td>
</tr>
</table>
<div class="col-md-9 col-sm-12" style="display: grid;grid-template-columns: 130px 300px 10px 130px 300px;align-items: center;gap: 10px;">
<div style="grid-column: span 5;">
<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>
</div>

<?=$listing->filter(Listing_Filter_DateTime::KEY)->renderForm()?>
<?=$listing->filter(Listing_Filter_EventClass::KEY)->renderForm()?>
<div></div>
<?=$listing->filter(Listing_Filter_Event::KEY)->renderForm()?>
<?=$listing->filter(Listing_Filter_User::KEY)->renderForm()?>
<div></div>
<?=$listing->filter(Listing_Filter_ContextObject::KEY)->renderForm()?>
<div style="grid-column: span 5;text-align: right">
<?=UI::button(Tr::_('Filter'))->setClass( UI_button::CLASS_PRIMARY )->setType( UI_button::TYPE_SUBMIT )?>
</div>

</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'context_object_id' )->label() ?></td>
<td><?= $filter_form->field( 'context_object_id' )->input()?></td>
<?= $filter_form->field( 'context_object_id' )->label() ?>
<div><?= $filter_form->field( 'context_object_id' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'date_time_from' )->label() ?></td>
<td><?= $filter_form->field( 'date_time_from' )->input()?></td>
<td></td>
<td nowrap=""><?= $filter_form->field( 'date_time_till' )->label() ?></td>
<td><?= $filter_form->field( 'date_time_till' )->input()?></td>
<?= $filter_form->field( 'date_time_from' )->label() ?>
<div><?= $filter_form->field( 'date_time_from' )->input()?></div>
<div></div>
<?= $filter_form->field( 'date_time_till' )->label() ?>
<div><?= $filter_form->field( 'date_time_till' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'event' )->label() ?></td>
<td><?= $filter_form->field( 'event' )->input()?></td>
<?= $filter_form->field( 'event' )->label() ?>
<div><?= $filter_form->field( 'event' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'event_class' )->label() ?></td>
<td><?= $filter_form->field( 'event_class' )->input()?></td>
<?= $filter_form->field( 'event_class' )->label() ?>
<div><?= $filter_form->field( 'event_class' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'user_id' )->label() ?></td>
<td><?= $filter_form->field( 'user_id' )->input()?></td>
<?= $filter_form->field( 'user_id' )->label() ?>
<div><?= $filter_form->field( 'user_id' )->input()?></div>
41 changes: 17 additions & 24 deletions application/Modules/Admin/EventViewer/Web/views/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,33 @@ $listing = $this->getRaw('listing');
$grid = $listing->getGrid();
$filter_form = $listing->getFilterForm();

$filter_form->renderer()->setDefaultLabelWidth([]);
$filter_form->renderer()->setDefaultFieldWidth([]);

$grid->getColumn( Listing_Column_ID::KEY )->addCustomCssStyle( 'width:120px;' );

?>

<?=$filter_form->start()?>
<div class="row toolbar">

<div class="col-md-3 col-sm-12">
<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>

<?php require 'list/export.phtml'; ?>
</div>
<div class="col-md-9 col-sm-12">
<table>
<tr>
<?=$listing->filter(Listing_Filter_DateTime::KEY)->renderForm()?>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_EventClass::KEY)->renderForm()?>
<td></td>
<?=$listing->filter(Listing_Filter_Event::KEY)->renderForm()?>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_User::KEY)->renderForm()?>
<td colspan="3"></td>
</tr>
<tr>
<?=$listing->filter(Listing_Filter_ContextObject::KEY)->renderForm()?>
<td colspan="3"></td>

<td><?=UI::button(Tr::_('Filter'))->setClass( UI_button::CLASS_PRIMARY )->setType( UI_button::TYPE_SUBMIT )?></td>
</tr>
</table>
<div class="col-md-9 col-sm-12" style="display: grid;grid-template-columns: 130px 300px 10px 130px 300px;align-items: center;gap: 10px;">
<div style="grid-column: span 5;">
<?=$listing->filter(Listing_Filter_Search::KEY)->renderForm()?>
</div>

<?=$listing->filter(Listing_Filter_DateTime::KEY)->renderForm()?>
<?=$listing->filter(Listing_Filter_EventClass::KEY)->renderForm()?>
<div></div>
<?=$listing->filter(Listing_Filter_Event::KEY)->renderForm()?>
<?=$listing->filter(Listing_Filter_User::KEY)->renderForm()?>
<div></div>
<?=$listing->filter(Listing_Filter_ContextObject::KEY)->renderForm()?>
<div style="grid-column: span 5;text-align: right">
<?=UI::button(Tr::_('Filter'))->setClass( UI_button::CLASS_PRIMARY )->setType( UI_button::TYPE_SUBMIT )?>
</div>

</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'context_object_id' )->label() ?></td>
<td><?= $filter_form->field( 'context_object_id' )->input()?></td>
<?= $filter_form->field( 'context_object_id' )->label() ?>
<div><?= $filter_form->field( 'context_object_id' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'date_time_from' )->label() ?></td>
<td><?= $filter_form->field( 'date_time_from' )->input()?></td>
<td></td>
<td nowrap=""><?= $filter_form->field( 'date_time_till' )->label() ?></td>
<td><?= $filter_form->field( 'date_time_till' )->input()?></td>
<?= $filter_form->field( 'date_time_from' )->label() ?>
<div><?= $filter_form->field( 'date_time_from' )->input()?></div>
<div></div>
<?= $filter_form->field( 'date_time_till' )->label() ?>
<div><?= $filter_form->field( 'date_time_till' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'event' )->label() ?></td>
<td><?= $filter_form->field( 'event' )->input()?></td>
<?= $filter_form->field( 'event' )->label() ?>
<div><?= $filter_form->field( 'event' )->input()?></div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ use Jet\MVC_View;
$listing = $this->getRaw( 'listing' );
$filter_form = $listing->getFilterForm();
?>
<td nowrap=""><?= $filter_form->field( 'event_class' )->label() ?></td>
<td><?= $filter_form->field( 'event_class' )->input()?></td>
<?= $filter_form->field( 'event_class' )->label() ?>
<div><?= $filter_form->field( 'event_class' )->input()?></div>
Loading

0 comments on commit 46d4cde

Please sign in to comment.