mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 19:15:23 +01:00 
			
		
		
		
	Backport #28145 by @yp05327 Before:  After:  Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
		
							parent
							
								
									7128929a0d
								
							
						
					
					
						commit
						9bfee5014b
					
				| @ -560,6 +560,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc { | |||||||
| 	ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(unit_model.TypeCode) | 	ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(unit_model.TypeCode) | ||||||
| 	ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues) | 	ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues) | ||||||
| 	ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests) | 	ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests) | ||||||
|  | 	ctx.Data["CanWriteActions"] = ctx.Repo.CanWrite(unit_model.TypeActions) | ||||||
| 
 | 
 | ||||||
| 	canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository) | 	canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | |||||||
| @ -3526,6 +3526,9 @@ runs.status = Status | |||||||
| runs.actors_no_select = All actors | runs.actors_no_select = All actors | ||||||
| runs.status_no_select = All status | runs.status_no_select = All status | ||||||
| runs.no_results = No results matched. | runs.no_results = No results matched. | ||||||
|  | runs.no_workflows = There are no workflows yet. | ||||||
|  | runs.no_workflows.quick_start = Don't know how to start with Gitea Action? See <a target="_blank" rel="noopener noreferrer" href="%s">the quick start guide</a>. | ||||||
|  | runs.no_workflows.documentation = For more information on the Gitea Action, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. | ||||||
| runs.no_runs = The workflow has no runs yet. | runs.no_runs = The workflow has no runs yet. | ||||||
| runs.empty_commit_message = (empty commit message) | runs.empty_commit_message = (empty commit message) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ | |||||||
| 	<div class="ui container"> | 	<div class="ui container"> | ||||||
| 		{{template "base/alert" .}} | 		{{template "base/alert" .}} | ||||||
| 
 | 
 | ||||||
|  | 		{{if .workflows}} | ||||||
| 		<div class="ui stackable grid"> | 		<div class="ui stackable grid"> | ||||||
| 			<div class="four wide column"> | 			<div class="four wide column"> | ||||||
| 				<div class="ui fluid vertical menu"> | 				<div class="ui fluid vertical menu"> | ||||||
| @ -78,6 +79,9 @@ | |||||||
| 				{{template "repo/actions/runs_list" .}} | 				{{template "repo/actions/runs_list" .}} | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
|  | 		{{else}} | ||||||
|  | 			{{template "repo/actions/no_workflows" .}} | ||||||
|  | 		{{end}} | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| {{template "base/footer" .}} | {{template "base/footer" .}} | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								templates/repo/actions/no_workflows.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								templates/repo/actions/no_workflows.tmpl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | <div class="empty-placeholder"> | ||||||
|  | 	{{svg "octicon-no-entry" 48}} | ||||||
|  | 	<h2>{{ctx.Locale.Tr "actions.runs.no_workflows"}}</h2> | ||||||
|  | 	{{if and .CanWriteCode .CanWriteActions}} | ||||||
|  | 		<p>{{ctx.Locale.Tr "actions.runs.no_workflows.quick_start" "https://docs.gitea.com/usage/actions/quickstart/" | Safe}}</p> | ||||||
|  | 	{{end}} | ||||||
|  | 	<p>{{ctx.Locale.Tr "actions.runs.no_workflows.documentation" "https://docs.gitea.com/usage/actions/overview/" | Safe}}</p> | ||||||
|  | </div> | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user