Fix prior permalink lookup (a8)

- Fix permalink edit links (a7)
This commit is contained in:
2022-05-21 11:00:03 -04:00
parent 0a21240984
commit ac3a4fd3f4
5 changed files with 31 additions and 25 deletions

View File

@@ -302,7 +302,7 @@ let private deriveAction ctx : HttpHandler seq =
match Data.Post.findCurrentPermalink [ permalink; altLink ] webLog.id conn |> await with
| Some link -> yield redirectTo true $"/{Permalink.toString link}"
| None -> ()
// Prior permalink
// Prior page
match Data.Page.findCurrentPermalink [ permalink; altLink ] webLog.id conn |> await with
| Some link -> yield redirectTo true $"/{Permalink.toString link}"
| None -> ()

View File

@@ -3,5 +3,5 @@
"hostname": "data02.bitbadger.solutions",
"database": "myWebLog_dev"
},
"Generator": "myWebLog 2.0-alpha06"
"Generator": "myWebLog 2.0-alpha08"
}

View File

@@ -16,7 +16,7 @@
value="{{ model.permalink }}">
<label for="permalink">Permalink</label>
{%- if model.page_id != "new" %}
<span class="form-text"><a href="/page/{{ model.page_id }}/permalinks">Manage Permalinks</a></span>
<span class="form-text"><a href="/admin/page/{{ model.page_id }}/permalinks">Manage Permalinks</a></span>
{% endif -%}
</div>
</div>

View File

@@ -16,7 +16,7 @@
value="{{ model.permalink }}">
<label for="permalink">Permalink</label>
{%- if model.page_id != "new" %}
<span class="form-text"><a href="/post/{{ model.post_id }}/permalinks">Manage Permalinks</a></span>
<span class="form-text"><a href="/admin/post/{{ model.post_id }}/permalinks">Manage Permalinks</a></span>
{% endif -%}
</div>
<div class="mb-2">