Skip to content

Commit

Permalink
Merge pull request #9908 from schu96/9337/fix/mybooks-follow-button
Browse files Browse the repository at this point in the history
Show toolbar and follow button for list visitor
  • Loading branch information
jimchamp authored Nov 14, 2024
2 parents 425184f + 78c16bf commit 474bdca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
4 changes: 2 additions & 2 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1724,8 +1724,8 @@ msgstr ""

#: EditionNavBar.html SearchNavigation.html account/sidebar.html
#: lib/nav_head.html lists/home.html lists/widget.html recentchanges/index.html
#: type/edition/view.html type/list/embed.html type/list/view_body.html
#: type/user/view.html type/work/view.html
#: type/edition/view.html type/list/embed.html type/user/view.html
#: type/work/view.html
msgid "Lists"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/account/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1 class="details-title">$header_title</h1>
$ share_links = ctx.get('share_links')
$:macros.ShareModal(share_links, page_url, share_content, "share-modal-wrapper", show_embed=False)
</div>
$if page:
$if page and mb.is_my_page:
$:macros.databarView(page)
</header>

Expand Down
14 changes: 5 additions & 9 deletions openlibrary/templates/type/list/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
$if check_owner and username:
$ is_owner = username == lst['key'].split('/')[2]

$if check_owner and is_owner:
$ template = MyBooksTemplate(username, 'list').render(
$ header_title=lst.get('name', 'List'),
$ template=render_template("type/list/view_body", lst, is_owner=True),
$ page=lst,
$ template = MyBooksTemplate(lst['key'].split('/')[2], 'list').render(
$ header_title= "",
$ template=render_template("type/list/view_body", lst, is_owner),
$ page=lst
$ )
$:template

$else:
$:render_template("type/list/view_body", lst, is_owner)
$:template
7 changes: 0 additions & 7 deletions openlibrary/templates/type/list/view_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
$if not is_owner:
<div id="contentHead" style="margin-bottom:0;">
$ owner = list.get_owner()
$:macros.databarView(list, edit=not owner)
<div class="superNav">
$if owner:
<a href="$owner.key">$owner.displayname</a>
/
<a href="$owner.key/lists">$_('Lists')</a>
</div>
<h1>$list.name</h1>
<p class="collapse sansserif">
$ component_times['render_seed_count'] = time()
Expand Down

0 comments on commit 474bdca

Please sign in to comment.