~netlandish/links-dev

links: Fixing issue with navFlag conflict. Oops v1 APPLIED

Peter Sanchez: 1
 Fixing issue with navFlag conflict. Oops

 2 files changed, 16 insertions(+), 15 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.code.netlandish.com/~netlandish/links-dev/patches/129/mbox | git am -3
Learn more about email & git

[PATCH links] Fixing issue with navFlag conflict. Oops Export this patch

---
 core/routes.go           | 27 ++++++++++++++-------------
 templates/link_list.html |  4 ++--
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/core/routes.go b/core/routes.go
index 54fa248..286d8e9 100644
--- a/core/routes.go
+++ b/core/routes.go
@@ -2018,19 +2018,20 @@ func (s *Service) GetBookmarks(c echo.Context) error {

	navFlag := "bookmarks"
	gmap := gobwebs.Map{
		"pd":            pd,
		"seoData":       seoData,
		"links":         orgLinks,
		"navFlag":       navFlag,
		"currURL":       seoData.URL,
		"tagCloud":      result.OrgLinks.TagCloud,
		"pTitle":        result.OrgLinks.Title,
		"pDescription":  result.OrgLinks.Description,
		"pURL":          result.OrgLinks.URL,
		"pCount":        result.OrgLinks.Count,
		"queries":       template.URL(queries.Encode()),
		"tagFilter":     strings.Replace(tag, ",", ", ", -1),
		"hideSaveCount": true,
		"pd":              pd,
		"seoData":         seoData,
		"links":           orgLinks,
		"navFlag":         navFlag,
		"currURL":         seoData.URL,
		"tagCloud":        result.OrgLinks.TagCloud,
		"pTitle":          result.OrgLinks.Title,
		"pDescription":    result.OrgLinks.Description,
		"pURL":            result.OrgLinks.URL,
		"pCount":          result.OrgLinks.Count,
		"queries":         template.URL(queries.Encode()),
		"tagFilter":       strings.Replace(tag, ",", ", ", -1),
		"hideSaveCount":   true,
		"bookmarkListing": true,
	}

	return s.Render(c, http.StatusOK, "link_list.html", gmap)
diff --git a/templates/link_list.html b/templates/link_list.html
index cf9ff5c..838a3eb 100644
--- a/templates/link_list.html
+++ b/templates/link_list.html
@@ -1,6 +1,6 @@
{{template "base" .}}
{{ define "title" }}{{ .title }}{{ end }}
{{ if ne .navFlag "bookmarks" }}
{{ if (not .bookmarkListing) }}
<form method="GET"
    action="{{ if .isUserDomain }}/{{ else }}{{if .isPopular}}{{reverse "core:popular_link_list"}}{{else if .isOrgLink}}{{.currURL}}{{else}}{{reverse "core:recent_link_list"}}{{end}}{{ end }}{{if .hasUnreadFilter}}?filter=unread{{else if .hasStarredFilter}}?filter=starred{{end}}"
    id="advanced-search-form"
@@ -75,7 +75,7 @@
    </p>
    {{ end }}
  {{end}}
  {{ if eq .navFlag "bookmarks" }}
  {{ if .bookmarkListing }}
  <div class="row">
    <h3>{{ .pTitle }}
    <div class="button outline primary tag tag-popular is-small">{{ .pCount }}</div>
-- 
2.47.2
Applied.

To git@git.code.netlandish.com:~netlandish/links
   6d9a153..6c7918e  master -> master