Added repo bundle to project#show
This commit is contained in:
parent
9c5a8d43f8
commit
d47273f2f2
3 changed files with 7 additions and 3 deletions
|
@ -12,8 +12,8 @@ module TreeHelper
|
|||
tree.html_safe
|
||||
end
|
||||
|
||||
def repo_url
|
||||
request.original_url
|
||||
def repo_url(project)
|
||||
controller_name == 'projects' ? project_tree_url(project, project.default_branch) : request.original_url
|
||||
end
|
||||
|
||||
# Return an image icon depending on the file type and mode
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
= content_for :meta_tags do
|
||||
= auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity")
|
||||
|
||||
- content_for :page_specific_javascripts do
|
||||
= webpack_bundle_tag 'common_vue'
|
||||
= webpack_bundle_tag 'repo'
|
||||
|
||||
= content_for flash_message_container do
|
||||
- if current_user && can?(current_user, :download_code, @project)
|
||||
= render 'shared/no_ssh'
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
%ul#tabs{ "v-if" => "isMini", ":style" => "{height: 41 + scrollWidth + 'px'}", "v-cloak" => "1" }
|
||||
%li{ is: "repo-tab", "v-for" => "tab in openedFiles", ":key" => "tab.id", ":tab" => "tab", ":class" => "{'active' : tab.active}" }
|
||||
#repo-file-buttons
|
||||
#ide{ data: { url: repo_url } }
|
||||
#ide{ data: { url: repo_url(@project) } }
|
||||
#binary-viewer{ "v-if" => "binary" }
|
||||
%img{ "v-if" => "binaryTypes.png", ":src" => "pngBlobWithDataURI", ":alt" => "activeFile.name", alt: '' }
|
||||
%div{ "v-if" => "binaryTypes.markdown", "v-html" => "activeFile.html" }
|
||||
|
|
Loading…
Reference in a new issue