mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-19 07:33:49 +08:00
Add description to product
This commit is contained in:
@ -29,6 +29,7 @@ type Product struct {
|
|||||||
|
|
||||||
Image string `xorm:"varchar(100)" json:"image"`
|
Image string `xorm:"varchar(100)" json:"image"`
|
||||||
Detail string `xorm:"varchar(255)" json:"detail"`
|
Detail string `xorm:"varchar(255)" json:"detail"`
|
||||||
|
Description string `xorm:"varchar(100)" json:"description"`
|
||||||
Tag string `xorm:"varchar(100)" json:"tag"`
|
Tag string `xorm:"varchar(100)" json:"tag"`
|
||||||
Currency string `xorm:"varchar(100)" json:"currency"`
|
Currency string `xorm:"varchar(100)" json:"currency"`
|
||||||
Price float64 `json:"price"`
|
Price float64 `json:"price"`
|
||||||
@ -213,6 +214,10 @@ func BuyProduct(id string, providerName string, user *User, host string) (string
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ExtendProductWithProviders(product *Product) {
|
func ExtendProductWithProviders(product *Product) {
|
||||||
|
if product == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
product.ProviderObjs = []*Provider{}
|
product.ProviderObjs = []*Provider{}
|
||||||
|
|
||||||
m := getProviderMap(product.Owner)
|
m := getProviderMap(product.Owner)
|
||||||
|
@ -153,6 +153,16 @@ class ProductEditPage extends React.Component {
|
|||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<Row style={{marginTop: "20px"}} >
|
||||||
|
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||||
|
{Setting.getLabel(i18next.t("product:Description"), i18next.t("product:Description - Tooltip"))} :
|
||||||
|
</Col>
|
||||||
|
<Col span={22} >
|
||||||
|
<Input value={this.state.product.description} onChange={e => {
|
||||||
|
this.updateProductField("description", e.target.value);
|
||||||
|
}} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<Row style={{marginTop: "20px"}} >
|
<Row style={{marginTop: "20px"}} >
|
||||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||||
{Setting.getLabel(i18next.t("product:Currency"), i18next.t("product:Currency - Tooltip"))} :
|
{Setting.getLabel(i18next.t("product:Currency"), i18next.t("product:Currency - Tooltip"))} :
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "CNY",
|
"CNY": "CNY",
|
||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
|
"Description": "Description",
|
||||||
|
"Description - Tooltip": "Description - Tooltip",
|
||||||
"Detail": "Detail",
|
"Detail": "Detail",
|
||||||
"Detail - Tooltip": "Detail - Tooltip",
|
"Detail - Tooltip": "Detail - Tooltip",
|
||||||
"Edit Product": "Edit Product",
|
"Edit Product": "Edit Product",
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "CNY",
|
"CNY": "CNY",
|
||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
|
"Description": "Description",
|
||||||
|
"Description - Tooltip": "Description - Tooltip",
|
||||||
"Detail": "Detail",
|
"Detail": "Detail",
|
||||||
"Detail - Tooltip": "Detail - Tooltip",
|
"Detail - Tooltip": "Detail - Tooltip",
|
||||||
"Edit Product": "Edit Product",
|
"Edit Product": "Edit Product",
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "CNY",
|
"CNY": "CNY",
|
||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
|
"Description": "Description",
|
||||||
|
"Description - Tooltip": "Description - Tooltip",
|
||||||
"Detail": "Detail",
|
"Detail": "Detail",
|
||||||
"Detail - Tooltip": "Detail - Tooltip",
|
"Detail - Tooltip": "Detail - Tooltip",
|
||||||
"Edit Product": "Edit Product",
|
"Edit Product": "Edit Product",
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "CNY",
|
"CNY": "CNY",
|
||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
|
"Description": "Description",
|
||||||
|
"Description - Tooltip": "Description - Tooltip",
|
||||||
"Detail": "Detail",
|
"Detail": "Detail",
|
||||||
"Detail - Tooltip": "Detail - Tooltip",
|
"Detail - Tooltip": "Detail - Tooltip",
|
||||||
"Edit Product": "Edit Product",
|
"Edit Product": "Edit Product",
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "CNY",
|
"CNY": "CNY",
|
||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
|
"Description": "Description",
|
||||||
|
"Description - Tooltip": "Description - Tooltip",
|
||||||
"Detail": "Detail",
|
"Detail": "Detail",
|
||||||
"Detail - Tooltip": "Detail - Tooltip",
|
"Detail - Tooltip": "Detail - Tooltip",
|
||||||
"Edit Product": "Edit Product",
|
"Edit Product": "Edit Product",
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "CNY",
|
"CNY": "CNY",
|
||||||
"Currency": "Currency",
|
"Currency": "Currency",
|
||||||
"Currency - Tooltip": "Currency - Tooltip",
|
"Currency - Tooltip": "Currency - Tooltip",
|
||||||
|
"Description": "Description",
|
||||||
|
"Description - Tooltip": "Description - Tooltip",
|
||||||
"Detail": "Сведения",
|
"Detail": "Сведения",
|
||||||
"Detail - Tooltip": "Detail - Tooltip",
|
"Detail - Tooltip": "Detail - Tooltip",
|
||||||
"Edit Product": "Редактирование продукта",
|
"Edit Product": "Редактирование продукта",
|
||||||
|
@ -434,6 +434,8 @@
|
|||||||
"CNY": "人民币",
|
"CNY": "人民币",
|
||||||
"Currency": "币种",
|
"Currency": "币种",
|
||||||
"Currency - Tooltip": "币种 - 工具提示",
|
"Currency - Tooltip": "币种 - 工具提示",
|
||||||
|
"Description": "描述",
|
||||||
|
"Description - Tooltip": "描述 - 工具提示",
|
||||||
"Detail": "详情",
|
"Detail": "详情",
|
||||||
"Detail - Tooltip": "详情 - 工具提示",
|
"Detail - Tooltip": "详情 - 工具提示",
|
||||||
"Edit Product": "编辑商品",
|
"Edit Product": "编辑商品",
|
||||||
|
Reference in New Issue
Block a user