Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test open admin #1549

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"laravel/slack-notification-channel": "^3.0",
"lcobucci/jwt": "^5.0",
"composer/composer": "^2.0",
"exceedone/laravel-admin": "^4.0.0",
"kylekatarnls/update-helper": "^1.2",
"laravel/socialite": "^5.2",
"psr/simple-cache": "^2.0",
Expand Down
29 changes: 29 additions & 0 deletions config/exment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,19 @@
*/
'sort_role_group_by_order' => env('EXMENT_SORT_ROLE_GROUP_BY_ORDER', false),

/*
|--------------------------------------------------------------------------
| class type of default show page
|--------------------------------------------------------------------------
|
| set class for container of default show page.
| 1. only option boxes(default).
| 2. only show form.
| 3. both option boxes and show form.
|
*/
'show_page_class_type' => env('EXMENT_SHOW_PAGE_CLASS_TYPE', 1),

/*
|--------------------------------------------------------------------------
| Maximum length of strings to display in the grid
Expand Down Expand Up @@ -1149,4 +1162,20 @@
| Even if 'userview_disabled' is false
*/
'userview_unavailable_table' => env('EXMENT_USERVIEW_UNAVAILABLE_TABLE', ''),

/*
|--------------------------------------------------------------------------
| Default english text for SCAN code button
|--------------------------------------------------------------------------
|
*/
'text_scan_button_en' => env('EXMENT_TEXT_SCAN_BUTTON_EN', '2D barcode/JANcode'),

/*
|--------------------------------------------------------------------------
| Default japanese text for SCAN code button
|--------------------------------------------------------------------------
|
*/
'text_scan_button_ja' => env('EXMENT_TEXT_SCAN_BUTTON_JA', '二次元/JANバーコード'),
];
41 changes: 41 additions & 0 deletions database/migrations/2024_06_27_123443_create_table_jan_code.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Exceedone\Exment\Database\ExtendedBlueprint;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$schema = DB::connection()->getSchemaBuilder();

$schema->blueprintResolver(function ($table, $callback) {
return new ExtendedBlueprint($table, $callback);
});

if (!\Schema::hasTable('jan_codes')) {
$schema->create('jan_codes', function (ExtendedBlueprint $table) {
$table->increments('id');
$table->integer('table_id')->unsigned();
$table->integer('target_id')->unsigned();
$table->string('jan_code', 40);
$table->timestamps();
$table->timeusers();
$table->foreign('table_id')->references('id')->on('custom_tables');
});
}
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jan_codes');
}
};
8 changes: 4 additions & 4 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ parameters:
- Illuminate\Contracts\Auth\Authenticatable
ignoreErrors:
-
message: "#^Call to an undefined method Encore\\\\Admin.#"
message: "#^Call to an undefined method OpenAdmin\\\\Admin.#"
path: vendor/exceedone/exment/src/*

-
message: "#^Method Encore\\\\Admin.#"
message: "#^Method OpenAdmin\\\\Admin.#"
path: vendor/exceedone/exment/src/*

-
message: "#^Access to an undefined property Encore\\\\Admin.#"
message: "#^Access to an undefined property OpenAdmin\\\\Admin.#"
path: vendor/exceedone/exment/src/*

-
message: "#^Result of method Encore\\\\Admin.#"
message: "#^Result of method OpenAdmin\\\\Admin.#"
path: vendor/exceedone/exment/src/*

-
Expand Down
6 changes: 6 additions & 0 deletions public/vendor/exment/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ var Exment;
}
linkElem.closest('a,.rowclick').trigger('click');
}).addClass('tableHoverLinkEvent');

$('.janCodeRow').on('click', function (ev) {
let janCodeId = $(ev.target).closest('tr').attr('jan-code-id');
let id = $(ev.target).closest('tr').attr('id');
window.location.href = admin_url("/assign-jan-code/?table_id=") + id + "&jan_code_id=" + janCodeId;
});
}
/**
* Set changedata event
Expand Down
256 changes: 0 additions & 256 deletions public/vendor/exment/js/qr.js

This file was deleted.

88 changes: 88 additions & 0 deletions public/vendor/exment/js/zxing.js

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion resources/lang/en/exment.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
'no_file_download' => 'There are no files to download',
'english' => 'English',
'japanese' => 'Japanese',
'back_button' => 'BACK',

'message' => [
'confirm_execute' => 'Are you sure to %s ?',
Expand Down Expand Up @@ -586,7 +587,7 @@
'editor' => 'Editor',
'html' => 'HTML',
'notify_navbar' => 'Notify list',
'qr_code' => '2D Barcode',
'barcode' => '2D/JAN Barcode',
],

'dashboard_menulist' => [
Expand Down Expand Up @@ -1053,6 +1054,7 @@
'custom_value' => 'Data List',
'error_select' => 'Please select only one record.',
'qrcode' => '2D Barcode Setting',
'jancode' => 'Jancode Setting',
],

'workflow' => [
Expand Down Expand Up @@ -1225,6 +1227,17 @@
'refer_column_description' => 'The information of the specified column of custom data will be displayed to the right of the 2D barcode.<br/>*You can select the ID column or the auto-number column (must be unique and required).',
'text_qr_description' => 'Fixed text displayed on the right side of the 2D barcode.',
],
'jan_code' => [
'setting' => 'Jancode Setting',
'advance_setting' => 'Jancode reading',
'form_after_edit' => 'Form edit data',
'form_after_create' => 'Form create data',
'table_not_found' => 'Table of this Jancode not found',
'action_after_edit' => 'Action after data edit',
'action_after_create' => 'Action after data registration',
'header' => 'Jan code table',
'description' => 'Choose table for this jancode',
],
'data_submit_redirect_options' => [
'inherit' => 'Match system settings',
'list' => 'List',
Expand Down Expand Up @@ -1262,6 +1275,8 @@
'copy_custom_table' => 'Copy normal settings, advanced settings and custom columns. <br />Other settings are out of scope. Please set manually.',
'qrcode_activate' => 'Enable the 2D barcode function for this table. Do you want to enable it?',
'qrcode_deactivate' => 'The 2D barcode function for this table will be disabled. Do you want to disable it?',
'jancode_activate' => 'Enable the Jancode function for this table. Do you want to enable it?',
'jancode_deactivate' => 'The Jancode function for this table will be disabled. Do you want to disable it?<br/><br/>Furthermore, the information of the linked JAN barcode will remain when it is valid, so when you scan a JAN barcode, the data in this table will be displayed.',
],

'custom_column_multi' => [
Expand Down Expand Up @@ -2239,6 +2254,10 @@
'description' => 'Set the two-dimensional barcode for this table.',
],

'jancode' => [
'description' => 'Set the jancode for this table.',
],

'custom_value' => [
'description' => 'Display the data list of this table.',
'template' => 'Export Template',
Expand Down
20 changes: 19 additions & 1 deletion resources/lang/ja/exment.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
'no_file_download' => 'ダウンロード対象のファイルがありません',
'english' => '英語',
'japanese' => '日本語',
'back_button' => '戻る',

'message' => [
'confirm_execute' => '%sを実行します。\r\nよろしいですか?',
Expand Down Expand Up @@ -586,7 +587,7 @@
'editor' => 'エディター',
'html' => 'HTML',
'notify_navbar' => '通知一覧',
'qr_code' => '二次元バーコード',
'barcode' => '二次元/JANバーコード',
],

'dashboard_menulist' => [
Expand Down Expand Up @@ -1053,6 +1054,7 @@
'custom_value' => 'データ一覧',
'error_select' => '行を1行のみ選択してください',
'qrcode' => '二次元バーコード設定',
'jancode' => 'JANバーコード設定',
],

'workflow' => [
Expand Down Expand Up @@ -1226,6 +1228,17 @@
'refer_column_description' => '二次元バーコードの右側にカスタムデータの指定列の情報を表示します。<br/>※ID列または自動採番列(ユニーク(一意)かつ必須であること)を選択できます。',
'text_qr_description' => '二次元バーコードの右側に表示される固定文言です。',
],
'jan_code' => [
'setting' => 'JANバーコード設定',
'advance_setting' => 'JANバーコード読込',
'form_after_edit' => '編集フォーム',
'form_after_create' => '登録フォーム',
'table_not_found' => 'この Jancode のテーブルが見つかりません',
'action_after_edit' => 'データ編集後のアクション',
'action_after_create' => 'データ登録後のアクション',
'header' => 'JANバーコード利用のテーブル一覧',
'description' => 'JANバーコード登録したいテーブルを選択してください。',
],
'data_submit_redirect_options' => [
"inherit" => "システム設定に合わせる",
'list' => '一覧',
Expand Down Expand Up @@ -1263,6 +1276,8 @@
'copy_custom_table' => '通常設定、拡張設定、カスタム列をコピーします。<br />その他の設定は対象外になります。手動で設定を行ってください。',
'qrcode_activate' => 'このテーブルの二次元バーコード機能を有効化にします。有効化しますか?',
'qrcode_deactivate' => 'このテーブルの二次元バーコード機能を無効化にします。無効化しますか?',
'jancode_activate' => 'このテーブルのJANバーコード機能を有効にします。有効にしますか?',
'jancode_deactivate' => 'このテーブルのJANバーコード機能は無効になります。無効にしますか?<br/>なお、有効時に紐づけられたJANバーコードの情報はのこるため、JANバーコード読込を行うと、このテブールのデータが表示されます。',
],

'custom_column_multi' => [
Expand Down Expand Up @@ -2239,6 +2254,9 @@
'qrcode' => [
'description' => 'このテーブルの二次元バーコード設定を行います。',
],
'jancode' => [
'description' => 'このテーブルのJANバーコード設定を行います。',
],

'custom_value' => [
'description' => 'このテーブルのデータ一覧を表示します。',
Expand Down
20 changes: 10 additions & 10 deletions resources/views/auth/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
@endif

<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="{{ admin_asset("/vendor/laravel-admin/AdminLTE/bootstrap/css/bootstrap.min.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/open-admin/AdminLTE/bootstrap/css/bootstrap.min.css") }}">
<!-- Font Awesome -->
<link rel="stylesheet" href="{{ admin_asset("/vendor/laravel-admin/font-awesome/css/all.min.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/laravel-admin/font-awesome/css/v4-shims.min.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/open-admin/font-awesome/css/all.min.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/open-admin/font-awesome/css/v4-shims.min.css") }}">
<!-- Theme style -->
<link rel="stylesheet" href="{{ admin_asset("/vendor/laravel-admin/AdminLTE/dist/css/AdminLTE.min.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/open-admin/AdminLTE/dist/css/AdminLTE.min.css") }}">
<!-- iCheck -->
<link rel="stylesheet" href="{{ admin_asset("/vendor/laravel-admin/AdminLTE/plugins/iCheck/square/blue.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/laravel-admin/toastr/build/toastr.min.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/open-admin/AdminLTE/plugins/iCheck/square/blue.css") }}">
<link rel="stylesheet" href="{{ admin_asset("/vendor/open-admin/toastr/build/toastr.min.css") }}">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
Expand Down Expand Up @@ -64,13 +64,13 @@
</div>
<!-- /.login-box -->
<!-- jQuery 2.1.4 -->
<script src="{{ admin_asset("/vendor/laravel-admin/AdminLTE/plugins/jQuery/jQuery-2.1.4.min.js")}} "></script>
<script src="{{ admin_asset("/vendor/open-admin/AdminLTE/plugins/jQuery/jQuery-2.1.4.min.js")}} "></script>
<!-- Bootstrap 3.3.5 -->
<script src="{{ admin_asset("/vendor/laravel-admin/AdminLTE/bootstrap/js/bootstrap.min.js")}}"></script>
<script src="{{ admin_asset("/vendor/open-admin/AdminLTE/bootstrap/js/bootstrap.min.js")}}"></script>
<!-- iCheck -->
<script src="{{ admin_asset("/vendor/laravel-admin/AdminLTE/plugins/iCheck/icheck.min.js")}}"></script>
<script src="{{ admin_asset("/vendor/open-admin/AdminLTE/plugins/iCheck/icheck.min.js")}}"></script>

<script src="{{ admin_asset("/vendor/laravel-admin/toastr/build/toastr.min.js")}}"></script>
<script src="{{ admin_asset("/vendor/open-admin/toastr/build/toastr.min.js")}}"></script>
<script src="{{ admin_asset("/vendor/exment/js/common_all.js")}}"></script>

<script>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/backup/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="box-header with-border">
<div class="pull-right">
<div class="btn-group pull-right" style="margin-right: 5px">
<button type="button" style="margin-right:5px;" class="btn btn-sm btn-twitter btn-backup">
<button type="button" style="margin-right:5px;" class="btn btn-sm btn-info btn-backup">
<i class="fa fa-download"></i> {{exmtrans("backup.backup")}}
</button>

<a href="javascript:void(0);" data-widgetmodal_url="{{admin_urls('backup', 'importModal')}}" type="button" class="btn btn-sm btn-twitter">
<a href="javascript:void(0);" data-widgetmodal_url="{{admin_urls('backup', 'importModal')}}" type="button" class="btn btn-sm btn-info">
<i class="fa fa-upload"></i> {{exmtrans("backup.restore")}}
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/custom-value/new-button.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="btn-group pull-right" style="margin-right: 5px">
<a href="{{admin_url('data/'.$table_name.'/create'). ( isset($params) ? '?' . http_build_query($params) : '' ) }}" class="btn btn-sm btn-success">
<i class="fa fa-plus"></i><span class="hidden-xs">&nbsp;&nbsp;{{trans('admin.new')}}</span>
<div class="btn-group d-flex justify-content-end" style="margin-right: 5px">
<a href="{{admin_url('data/'.$table_name.'/create'). ( isset($params) ? '?' . http_build_query($params) : '' ) }}" class="btn btn-sm btn-success d-flex align-items-center">
<i class="fa fa-plus"></i><span class="d-none d-lg-block">&nbsp;&nbsp;{{trans('admin.new')}}</span>
</a>
</div>
1 change: 1 addition & 0 deletions resources/views/dashboard/system/camera.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button href="#" class="btn btn-lg btn-light btn-default" role="scanButtonDashboard" data-qr_action="url">{{$label}}</button>
1 change: 0 additions & 1 deletion resources/views/dashboard/system/qrcode.blade.php

This file was deleted.

4 changes: 2 additions & 2 deletions resources/views/form/gridshow-panel.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="box box-{{ $style }}">
<div class="box-header with-border">
<div class="box-header with-border d-flex justify-content-between border-bottom border-light p-1 mb-3">
<h3 class="box-title">{{ $title }}</h3>

<div class="box-tools">
<div class="box-tools d-flex flex-row-reverse">
{!! $tools !!}
</div>
</div>
Expand Down
Loading
Loading