Merge pull request #104 from soulcramer/hide_edition_tab

💄 Hide Edition tab to Logged out users
This commit is contained in:
Eduard Urbach 2018-03-15 23:18:54 +01:00 committed by GitHub
commit b3460db5c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -48,5 +48,6 @@ component CompanyAnime(label string, animes []*arn.Anime, user *arn.User)
component CompanyTabs(company *arn.Company, user *arn.User) component CompanyTabs(company *arn.Company, user *arn.User)
.tabs .tabs
Tab("Company", "building", company.Link()) Tab("Company", "building", company.Link())
if user != nil
Tab("Edit", "pencil", company.Link() + "/edit") Tab("Edit", "pencil", company.Link() + "/edit")
Tab("History", "history", company.Link() + "/history") Tab("History", "history", company.Link() + "/history")

View File

@ -52,6 +52,7 @@ component QuoteTabs(quote *arn.Quote, user *arn.User)
.tabs .tabs
TabLike(strconv.Itoa(len(quote.Likes)), "heart", "quote", quote, user) TabLike(strconv.Itoa(len(quote.Likes)), "heart", "quote", quote, user)
Tab("Quote", "quote-left", quote.Link()) Tab("Quote", "quote-left", quote.Link())
if user != nil
Tab("Edit", "pencil", quote.Link() + "/edit") Tab("Edit", "pencil", quote.Link() + "/edit")
Tab("History", "history", quote.Link() + "/history") Tab("History", "history", quote.Link() + "/history")

View File

@ -66,5 +66,6 @@ component SoundTrackTabs(track *arn.SoundTrack, user *arn.User)
.tabs .tabs
TabLike(strconv.Itoa(len(track.Likes)), "heart", "track", track, user) TabLike(strconv.Itoa(len(track.Likes)), "heart", "track", track, user)
Tab("Soundtrack", "music", track.Link()) Tab("Soundtrack", "music", track.Link())
if user != nil
Tab("Edit", "pencil", track.Link() + "/edit") Tab("Edit", "pencil", track.Link() + "/edit")
Tab("History", "history", track.Link() + "/history") Tab("History", "history", track.Link() + "/history")