From 0ef69ab52754f5c55217180e634f9660964f3772 Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 15 Mar 2018 22:44:09 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Hide=20Edition=20tab=20to=20Logg?= =?UTF-8?q?ed=20out=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/company/company.pixy | 3 ++- pages/quote/quote.pixy | 3 ++- pages/soundtrack/soundtrack.pixy | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/company/company.pixy b/pages/company/company.pixy index 8b10d67a..62164e77 100644 --- a/pages/company/company.pixy +++ b/pages/company/company.pixy @@ -48,5 +48,6 @@ component CompanyAnime(label string, animes []*arn.Anime, user *arn.User) component CompanyTabs(company *arn.Company, user *arn.User) .tabs Tab("Company", "building", company.Link()) - Tab("Edit", "pencil", company.Link() + "/edit") + if user != nil + Tab("Edit", "pencil", company.Link() + "/edit") Tab("History", "history", company.Link() + "/history") \ No newline at end of file diff --git a/pages/quote/quote.pixy b/pages/quote/quote.pixy index 17c70e50..6872362f 100644 --- a/pages/quote/quote.pixy +++ b/pages/quote/quote.pixy @@ -52,7 +52,8 @@ component QuoteTabs(quote *arn.Quote, user *arn.User) .tabs TabLike(strconv.Itoa(len(quote.Likes)), "heart", "quote", quote, user) Tab("Quote", "quote-left", quote.Link()) - Tab("Edit", "pencil", quote.Link() + "/edit") + if user != nil + Tab("Edit", "pencil", quote.Link() + "/edit") Tab("History", "history", quote.Link() + "/history") component QuoteAnime(anime *arn.Anime, user *arn.User) diff --git a/pages/soundtrack/soundtrack.pixy b/pages/soundtrack/soundtrack.pixy index 6db924ed..39f3acfa 100644 --- a/pages/soundtrack/soundtrack.pixy +++ b/pages/soundtrack/soundtrack.pixy @@ -66,5 +66,6 @@ component SoundTrackTabs(track *arn.SoundTrack, user *arn.User) .tabs TabLike(strconv.Itoa(len(track.Likes)), "heart", "track", track, user) Tab("Soundtrack", "music", track.Link()) - Tab("Edit", "pencil", track.Link() + "/edit") + if user != nil + Tab("Edit", "pencil", track.Link() + "/edit") Tab("History", "history", track.Link() + "/history")