fix(blog): improve blog tab visibility and add help text
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m26s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 5m22s
Build and Release / Lint (push) Successful in 5m32s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 2m50s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h4m49s
Build and Release / Build Binaries (amd64, darwin, macos) (push) Successful in 6m15s
Build and Release / Build Binaries (arm64, darwin, macos) (push) Successful in 8m6s
Build and Release / Build Binary (linux/arm64) (push) Successful in 8m7s
All checks were successful
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m26s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 5m22s
Build and Release / Lint (push) Successful in 5m32s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 2m50s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h4m49s
Build and Release / Build Binaries (amd64, darwin, macos) (push) Successful in 6m15s
Build and Release / Build Binaries (arm64, darwin, macos) (push) Successful in 8m6s
Build and Release / Build Binary (linux/arm64) (push) Successful in 8m7s
Changes blog tab visibility check from generic IsWriter to specific CanWrite permission for code unit. Adds help text to blog and subscription settings explaining behavior and access requirements.
This commit is contained in:
@@ -2005,6 +2005,7 @@
|
||||
"repo.settings.blog": "Blog",
|
||||
"repo.settings.blog.enable": "Enable Blog",
|
||||
"repo.settings.blog.enable_desc": "Allow blog posts to be created and published from this repository.",
|
||||
"repo.settings.blog.enable_help": "When enabled, repo members with write access can create, edit, and publish blog posts. Subscribers and watchers will be notified on publish.",
|
||||
"repo.settings.blog.saved": "Blog settings saved.",
|
||||
"repo.wiki": "Wiki",
|
||||
"repo.wiki.welcome": "Welcome to the Wiki.",
|
||||
@@ -4136,6 +4137,7 @@
|
||||
"repo.settings.subscriptions.products": "Products",
|
||||
"repo.settings.subscriptions.clients": "Clients",
|
||||
"repo.settings.subscriptions.enable": "Enable paid subscriptions",
|
||||
"repo.settings.subscriptions.enable_help": "When enabled, code access (source view, clone, archive) will require an active subscription. Issues and releases remain accessible per the repository's visibility settings.",
|
||||
"repo.settings.subscriptions.enable_desc": "When enabled, code access (source view, clone, archive) will require an active subscription. Issues and releases remain accessible per the repository's visibility settings.",
|
||||
"repo.settings.subscriptions.enabled": "Subscriptions are enabled for this repository.",
|
||||
"repo.settings.subscriptions.disabled": "Subscriptions are disabled.",
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
{{end}}
|
||||
|
||||
{{if and .Repository.BlogEnabled (ctx.RootData.SystemConfig.Theme.EnableBlogs.Value ctx)}}
|
||||
{{if or .IsWriter (gt .BlogPostCount 0)}}
|
||||
{{if or (.Permission.CanWrite ctx.Consts.RepoUnitTypeCode) (gt .BlogPostCount 0)}}
|
||||
<a class="{{if .PageIsRepoBlog}}active {{end}}item" href="{{.RepoLink}}/blog">
|
||||
{{svg "octicon-note"}} {{ctx.Locale.Tr "repo.blog"}}
|
||||
{{if gt .BlogPostCount 0}}<span class="ui small label">{{.BlogPostCount}}</span>{{end}}
|
||||
|
||||
@@ -361,6 +361,7 @@
|
||||
<input name="enable_blog" type="checkbox" {{if .Repository.BlogEnabled}}checked{{end}}>
|
||||
<label>{{ctx.Locale.Tr "repo.settings.blog.enable"}}</label>
|
||||
</div>
|
||||
<p class="help">{{ctx.Locale.Tr "repo.settings.blog.enable_help"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user