产品列表页英文

This commit is contained in:
Edward Yang 2022-08-26 17:25:28 +08:00
parent d591a6ce38
commit 711c62d9b7
7 changed files with 35 additions and 19 deletions

View File

@ -1,6 +1,6 @@
@extends('admin::layouts.master')
@section('title', '商品管理')
@section('title', __('admin/common.product'))
@push('header')
<script src="https://cdn.bootcdn.net/ajax/libs/underscore.js/1.13.3/underscore.min.js"></script>
@ -34,7 +34,7 @@
<div class="col-xxl-20 col-xl-3 col-lg-4 col-md-4 d-flex align-items-center mb-3">
<label class="filter-title">{{ __('product.category') }}</label>
<select v-model="filter.category_id" class="form-control">
<option value="0">全部</option>
<option value="0">{{ __('common.all') }}</option>
@foreach ($categories as $_category)
<option :value="{{ $_category->id }}">{{ $_category->name }}</option>
@endforeach
@ -62,16 +62,15 @@
<div class="d-flex justify-content-between my-4">
<a href="{{ admin_route('products.create') }}">
<button class="btn btn-primary">创建商品</button>
<button class="btn btn-primary">{{ __('admin/product.products_create') }}</button>
</a>
<div class="right">
<button class="btn btn-outline-secondary" :disabled="!selected.length" @click="batchDelete">批量删除</button>
<button class="btn btn-outline-secondary" :disabled="!selected.length" @click="batchDelete">{{ __('admin/product.batch_delete') }}</button>
<button class="btn btn-outline-secondary" :disabled="!selected.length"
@click="batchActive(true)">批量上架</button>
@click="batchActive(true)">{{ __('admin/product.batch_active') }}</button>
<button class="btn btn-outline-secondary" :disabled="!selected.length"
@click="batchActive(false)">批量下架</button>
{{-- <button class="btn btn-outline-secondary">批量改价</button> --}}
@click="batchActive(false)">{{ __('admin/product.batch_inactive') }}</button>
</div>
</div>
@ -80,13 +79,13 @@
<thead>
<tr>
<th><input type="checkbox" v-model="allSelected" /></th>
<th>ID</th>
<th>图片</th>
<th>商品名称</th>
<th>价格</th>
<th>{{ __('common.id') }}</th>
<th>{{ __('product.image') }}</th>
<th>{{ __('product.name') }}</th>
<th>{{ __('product.price') }}</th>
<th>
<div class="d-flex align-items-center">
创建时间
{{ __('common.created_at') }}
<div class="d-flex flex-column ml-1 order-by-wrap">
<i class="el-icon-caret-top" @click="orderBy = 'created_at:asc'"></i>
<i class="el-icon-caret-bottom" @click="orderBy = 'created_at:desc'"></i>
@ -96,7 +95,7 @@
<th class="d-flex align-items-center">
<div class="d-flex align-items-center">
排序
{{ __('common.sort_order') }}
<div class="d-flex flex-column ml-1 order-by-wrap">
<i class="el-icon-caret-top" @click="orderBy = 'position:asc'"></i>
<i class="el-icon-caret-bottom" @click="orderBy = 'position:desc'"></i>
@ -104,9 +103,9 @@
</div>
</th>
@if ($type != 'trashed')
<th>状态</th>
<th>{{ __('common.status') }}</th>
@endif
<th class="text-end">操作</th>
<th class="text-end">{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>

View File

@ -17,4 +17,8 @@ return [
'products_delete' => 'Delete',
'products_trashed' => 'Trashed',
'products_restore' => 'restore',
'batch_delete' => 'Batch Delete',
'batch_active' => 'Batch Active',
'batch_inactive' => 'Batch Inactive',
];

View File

@ -36,14 +36,17 @@ return [
'sign_out' => 'Sign Out',
'contact_us' => 'Contact us',
'input' => 'Type your search here',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'edit' => 'Edit',
'action' => 'Action',
'add' => 'Add',
'please_choose' => 'Please Choose',
'recommend_size' => 'Recommend Size',
'id' => 'ID',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'sort_order' => 'Sort By',
'order' => [
'unpaid' => 'Unpaid',
'paid' => 'Paid',

View File

@ -17,6 +17,7 @@ return [
'category' => 'Category',
'model' => 'Model',
'quantity' => 'Quantity',
'image' => 'Image',
'active' => 'Active',
'inactive' => 'Inactive',

View File

@ -17,4 +17,9 @@ return [
'products_delete' => '删除商品',
'products_trashed' => '回收站',
'products_restore' => '恢复回收站',
'batch_delete' => '批量删除',
'batch_active' => '批量上架',
'batch_inactive' => '批量下架',
];

View File

@ -35,14 +35,17 @@ return [
'sign_out' => '退出登录',
'contact_us' => '联系我们',
'input' => '在此处输入您的搜索',
'created_at' => '创建时间',
'updated_at' => '修改时间',
'edit' => '编辑',
'action' => '操作',
'add' => '添加',
'please_choose' => '请选择',
'recommend_size' => '建议尺寸',
'id' => 'ID',
'created_at' => '创建时间',
'updated_at' => '修改时间',
'sort_order' => '排序',
'order' => [
'unpaid' => '待支付',
'paid' => '已支付',

View File

@ -17,6 +17,7 @@ return [
'category' => '分类',
'model' => '型号',
'quantity' => '库存',
'image' => '图片',
'active' => '上架',
'inactive' => '下架',