Brand 多语言

This commit is contained in:
Edward Yang 2022-08-26 18:11:42 +08:00
parent 1fbb409602
commit 748bc43df9
4 changed files with 47 additions and 15 deletions

View File

@ -1,23 +1,23 @@
@extends('admin::layouts.master') @extends('admin::layouts.master')
@section('title', '品牌管理') @section('title', __('admin/common.brand'))
@section('content') @section('content')
<div id="customer-app" class="card h-min-600" v-cloak> <div id="customer-app" class="card h-min-600" v-cloak>
<div class="card-body"> <div class="card-body">
<div class="d-flex justify-content-between mb-4"> <div class="d-flex justify-content-between mb-4">
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">创建品牌</button> <button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">{{ __('admin/brand.brands_create') }}</button>
</div> </div>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>{{ __('common.id') }}</th>
<th>名称</th> <th>{{ __('brand.name') }}</th>
<th>图标</th> <th>{{ __('brand.icon') }}</th>
<th>排序</th> <th>{{ __('common.sort_order') }}</th>
<th>首字母</th> <th>{{ __('brand.first_letter') }}</th>
<th>状态</th> <th>{{ __('common.status') }}</th>
<th>操作</th> <th>{{ __('common.action') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -31,8 +31,8 @@
<span :class="brand.status ? 'text-success' : 'text-secondary'">@{{ brand.status ? '启用' : '禁用' }}</span> <span :class="brand.status ? 'text-success' : 'text-secondary'">@{{ brand.status ? '启用' : '禁用' }}</span>
</td> </td>
<td> <td>
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">编辑</button> <button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">{{ __('common.edit') }}</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteItem(brand.id, index)">删除</button> <button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteItem(brand.id, index)">{{ __('common.delete') }}</button>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -1,13 +1,13 @@
@extends('admin::layouts.master') @extends('admin::layouts.master')
@section('title', '分类管理') @section('title', __('admin/common.category'))
@section('body-class', 'page-categories') @section('body-class', 'page-categories')
@section('content') @section('content')
<div id="category-app" class="card"> <div id="category-app" class="card">
<div class="card-body"> <div class="card-body">
<a href="{{ admin_route('categories.create') }}" class="btn btn-primary">创建分类</a> <a href="{{ admin_route('categories.create') }}" class="btn btn-primary">{{ __('admin/category.categories_create') }}</a>
<div class="mt-4" style=""> <div class="mt-4" style="">
<el-tree :data="categories" node-key="id" ref="tree"> <el-tree :data="categories" node-key="id" ref="tree">
<div class="custom-tree-node d-flex align-items-center justify-content-between w-100" slot-scope="{ node, data }"> <div class="custom-tree-node d-flex align-items-center justify-content-between w-100" slot-scope="{ node, data }">
@ -15,8 +15,8 @@
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<span :class="['me-4', 'badge', 'bg-' + (data.active ? 'success' : 'secondary')]">@{{ data.active ? '启用' : '禁用' }}</span> <span :class="['me-4', 'badge', 'bg-' + (data.active ? 'success' : 'secondary')]">@{{ data.active ? '启用' : '禁用' }}</span>
<div> <div>
<a :href="data.url_edit" class="btn btn-outline-secondary btn-sm">编辑</a> <a :href="data.url_edit" class="btn btn-outline-secondary btn-sm">{{ __('common.edit') }}</a>
<a class="btn btn-outline-danger btn-sm" @click="removeCategory(node, data)">删除</a> <a class="btn btn-outline-danger btn-sm" @click="removeCategory(node, data)">{{ __('common.delete') }}</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,16 @@
<?php
/**
* brand.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-08-26 17:33:32
* @modified 2022-08-26 17:33:32
*/
return [
'name' => 'Name',
'icon' => 'Logo',
'first_letter' => 'First Letter',
];

View File

@ -0,0 +1,16 @@
<?php
/**
* brand.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-08-26 17:33:32
* @modified 2022-08-26 17:33:32
*/
return [
'name' => '品牌名称',
'icon' => '图标',
'first_letter' => '首字母',
];