+
{{ column.label | localize }}
@@ -108,9 +108,10 @@
}
this.columns.push(_extend(data, {
- label: column.label || (this.configuration.labelPrefix + key),
+ label: data.label || (this.configuration.labelPrefix + key),
field: key,
- canSort: typeof column.sort === 'boolean' ? column.sort : this.configuration.sort
+ canSort: typeof data.sort === 'boolean' ? data.sort : this.configuration.sort,
+ flex: data.width ? { 'flex': '0 1 ' + data.width + 'px' } : {}
}));
});
},
@@ -226,7 +227,7 @@
{
display: inline-block;
align-items: center;
- flex: 1 0 5%;
+ flex: 1 1 5%;
position: relative;
text-align: left;
padding: 18px 20px 17px 20px;
diff --git a/zero.Web/App/pages/settings/countries.vue b/zero.Web/App/pages/settings/countries.vue
new file mode 100644
index 00000000..60d986b2
--- /dev/null
+++ b/zero.Web/App/pages/settings/countries.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/zero.Web/App/resources/countries.js b/zero.Web/App/resources/countries.js
new file mode 100644
index 00000000..c4c7bcd6
--- /dev/null
+++ b/zero.Web/App/resources/countries.js
@@ -0,0 +1,10 @@
+import Axios from 'axios';
+
+export default {
+
+ // get all countries
+ getAll()
+ {
+ return Axios.get('countries/getAll').then(res => Promise.resolve(res.data));
+ }
+};
\ No newline at end of file
diff --git a/zero.Web/Controllers/CountriesController.cs b/zero.Web/Controllers/CountriesController.cs
new file mode 100644
index 00000000..cc00c270
--- /dev/null
+++ b/zero.Web/Controllers/CountriesController.cs
@@ -0,0 +1,25 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+using zero.Core;
+using zero.Core.Api;
+
+namespace zero.Web.Controllers
+{
+ [AllowAnonymous]
+ public class CountriesController : BackofficeController
+ {
+ private ICountriesApi Api { get; set; }
+
+ public CountriesController(IZeroConfiguration config, ICountriesApi api) : base(config)
+ {
+ Api = api;
+ }
+
+
+ public async Task
GetAll()
+ {
+ return Json(await Api.GetAll("en-US"));
+ }
+ }
+}
diff --git a/zero.Web/Resources/Localization/zero.en-us.json b/zero.Web/Resources/Localization/zero.en-us.json
index df8e5688..6ce9dd0e 100644
--- a/zero.Web/Resources/Localization/zero.en-us.json
+++ b/zero.Web/Resources/Localization/zero.en-us.json
@@ -10,6 +10,7 @@
"close": "Close",
"confirm": "Confirm",
"createdDate": "Created at",
+ "active": "Published",
"pagination": {
"xofy": "Page {x} of {y}",
"next": "Next page",
@@ -135,5 +136,12 @@
"history_text": "View page editing history"
}
}
+ },
+
+ "country": {
+ "fields": {
+ "name": "Name",
+ "code": "ISO"
+ }
}
}
\ No newline at end of file
diff --git a/zero.Web/Startup.cs b/zero.Web/Startup.cs
index 8bcbe3ef..abb4ffc4 100644
--- a/zero.Web/Startup.cs
+++ b/zero.Web/Startup.cs
@@ -139,6 +139,7 @@ namespace zero.Web
services.AddTransient();
services.AddTransient();
services.AddTransient();
+ services.AddTransient();
}
///