404 handled in app; fix later
This commit is contained in:
@@ -21,14 +21,14 @@ namespace zero.Core.Routing
|
||||
|
||||
if (route == null)
|
||||
{
|
||||
return HandleFail(httpContext, values);
|
||||
return null;
|
||||
}
|
||||
|
||||
RouteProviderEndpoint endpoint = Routes.MapEndpoint(route);
|
||||
|
||||
if (endpoint == null)
|
||||
{
|
||||
return HandleFail(httpContext, values);
|
||||
return null;
|
||||
}
|
||||
|
||||
values["zero.route"] = route;
|
||||
@@ -36,21 +36,5 @@ namespace zero.Core.Routing
|
||||
values["action"] = endpoint.Action;
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
RouteValueDictionary HandleFail(HttpContext httpContext, RouteValueDictionary values)
|
||||
{
|
||||
NotFoundRoute notFound = Routes.NotFound(httpContext);
|
||||
|
||||
if (notFound != null)
|
||||
{
|
||||
httpContext.Response.StatusCode = 404;
|
||||
values["zero.route"] = notFound;
|
||||
values["controller"] = notFound.Controller;
|
||||
values["action"] = notFound.Action;
|
||||
return values;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,23 @@
|
||||
<div v-if="visible" class="editor-infos">
|
||||
<div class="ui-box is-light editor-infos-aside">
|
||||
<slot name="before"></slot>
|
||||
<ui-property v-if="value.id && value.lastModifiedDate" field="lastModifiedDate" label="@ui.modifiedDate">
|
||||
<ui-date v-model="value.lastModifiedDate" />
|
||||
</ui-property>
|
||||
<ui-property v-if="value.id" label="@ui.createdDate" field="createdDate">
|
||||
<ui-date v-model="value.createdDate" />
|
||||
</ui-property>
|
||||
<template v-if="value && value.id">
|
||||
<ui-property v-if="value.lastModifiedDate" field="lastModifiedDate" label="@ui.modifiedDate">
|
||||
<ui-date v-model="value.lastModifiedDate" />
|
||||
</ui-property>
|
||||
<ui-property label="@ui.createdDate" field="createdDate">
|
||||
<ui-date v-model="value.createdDate" />
|
||||
</ui-property>
|
||||
<ui-property label="@ui.entityfields.alias" field="alias">
|
||||
{{value.alias}}
|
||||
</ui-property>
|
||||
<ui-property label="@ui.entityfields.sort" field="sort">
|
||||
{{value.sort}}
|
||||
</ui-property>
|
||||
<ui-property v-if="value.key" label="@ui.entityfields.key" field="key">
|
||||
{{value.key}}
|
||||
</ui-property>
|
||||
</template>
|
||||
<slot name="after"></slot>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,6 +109,12 @@
|
||||
"parsedinput": {
|
||||
"placeholder": "Enter a value",
|
||||
"placeholder_output": "ID"
|
||||
},
|
||||
"entityfields": {
|
||||
"key": "Key",
|
||||
"alias": "Alias",
|
||||
"sort": "Sort",
|
||||
"hash": "Hash"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user