Unify use of can_current_user_push_code Presenter
This commit is contained in:
parent
3956bb552f
commit
44d33db12a
|
@ -1,3 +1,3 @@
|
|||
- if koding_enabled? && current_user && @repository.koding_yml && @project.user_can_push_to_branch?(current_user, @project.default_branch)
|
||||
- if koding_enabled? && current_user && @repository.koding_yml && @project.can_current_user_push_code?
|
||||
= link_to koding_project_url(@project), class: 'btn project-action-button inline', target: '_blank', rel: 'noopener noreferrer' do
|
||||
_('Run in IDE (Koding)')
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
%h4
|
||||
= _('The repository for this project is empty')
|
||||
|
||||
- if can?(current_user, :push_code, @project)
|
||||
- if @project.can_current_user_push_code?
|
||||
%p
|
||||
- link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions'
|
||||
= _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli }
|
||||
|
|
Loading…
Reference in New Issue