show.html.haml 1.15 KB
Newer Older
1
- page_title "Find File", @ref
2
= render "projects/commits/head"
3
4

.file-finder-holder.tree-holder.clearfix
5
  .nav-block
6
7
8
9
10
11
12
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'find_file', path: @path
    %ul.breadcrumb.repo-breadcrumb
      %li
        = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
          = @project.path
      %li.file-finder
13
        %input#file_find.form-control.file-finder-input{ type: "text", placeholder: 'Find by path', autocomplete: 'off' }
14

15
  .tree-content-holder
16
    .table-holder
17
      %table.table.files-slider{ class: "table_#{@hex_path} tree-table table-striped" }
18
19
20
        %tbody
      = spinner nil, true

21
22
23
24
:javascript
  var projectFindFile = new ProjectFindFile($(".file-finder-holder"), {
    url: "#{escape_javascript(namespace_project_files_path(@project.namespace, @project, @ref, @options.merge(format: :json)))}",
    treeUrl: "#{escape_javascript(namespace_project_tree_path(@project.namespace, @project, @ref))}",
25
    blobUrlTemplate: "#{escape_javascript(namespace_project_blob_path(@project.namespace, @project, @id || @commit.id))}"
26
27
  });
  new ShortcutsFindFile(projectFindFile);