diff options
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 29 | ||||
-rw-r--r-- | app/views/projects/branches/destroy.js.haml | 1 | ||||
-rw-r--r-- | app/views/projects/branches/index.html.haml | 31 | ||||
-rw-r--r-- | app/views/projects/branches/new.html.haml | 28 |
4 files changed, 0 insertions, 89 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml deleted file mode 100644 index 4e7415be4aa..00000000000 --- a/app/views/projects/branches/_branch.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -- commit = @repository.commit(branch.target) -%li(class="js-branch-#{branch.name}") - %h4 - = link_to namespace_project_tree_path(@project.namespace, @project, branch.name) do - %strong.str-truncated= branch.name - - if branch.name == @repository.root_ref - %span.label.label-info default - - if @project.protected_branch? branch.name - %span.label.label-success - %i.fa.fa-lock - protected - .pull-right - - if can?(current_user, :download_code, @project) - = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-xs' - - if branch.name != @repository.root_ref - = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-grouped btn-xs', method: :post, title: "Compare" do - %i.fa.fa-files-o - Compare - - - if can_remove_branch?(@project, branch.name) - = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: 'btn btn-grouped btn-xs btn-remove remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do - %i.fa.fa-trash-o - - - if commit - %ul.list-unstyled - = render 'projects/commits/inline_commit', commit: commit, project: @project - - else - %p - Cant find HEAD commit for this branch diff --git a/app/views/projects/branches/destroy.js.haml b/app/views/projects/branches/destroy.js.haml deleted file mode 100644 index 882a4d0c5e2..00000000000 --- a/app/views/projects/branches/destroy.js.haml +++ /dev/null @@ -1 +0,0 @@ -$('.js-totalbranch-count').html("#{@repository.branches.size}") diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml deleted file mode 100644 index a313ffcf272..00000000000 --- a/app/views/projects/branches/index.html.haml +++ /dev/null @@ -1,31 +0,0 @@ -= render "projects/commits/head" -%h3.page-title - Branches - .pull-right - - if can? current_user, :push_code, @project - = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do - %i.fa.fa-add-sign - New branch - - .dropdown.inline - %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'} - %span.light sort: - - if @sort.present? - = @sort.humanize - - else - Name - %b.caret - %ul.dropdown-menu - %li - = link_to namespace_project_branches_path(sort: nil) do - Name - = link_to namespace_project_branches_path(sort: 'recently_updated') do - = sort_title_recently_updated - = link_to namespace_project_branches_path(sort: 'last_updated') do - = sort_title_oldest_updated -%hr -- unless @branches.empty? - %ul.bordered-list.top-list.all-branches - - @branches.each do |branch| - = render "projects/branches/branch", branch: branch - = paginate @branches, theme: 'gitlab' diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml deleted file mode 100644 index e5fcb98c68c..00000000000 --- a/app/views/projects/branches/new.html.haml +++ /dev/null @@ -1,28 +0,0 @@ -- if @error - .alert.alert-danger - %button{ type: "button", class: "close", "data-dismiss" => "alert"} × - = @error -%h3.page-title - %i.fa.fa-code-fork - New branch -= form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "form-horizontal" do - .form-group - = label_tag :branch_name, 'Name for new branch', class: 'control-label' - .col-sm-10 - = text_field_tag :branch_name, params[:branch_name], placeholder: 'enter new branch name', required: true, tabindex: 1, class: 'form-control' - .form-group - = label_tag :ref, 'Create from', class: 'control-label' - .col-sm-10 - = text_field_tag :ref, params[:ref], placeholder: 'existing branch name, tag or commit SHA', required: true, tabindex: 2, class: 'form-control' - .form-actions - = button_tag 'Create branch', class: 'btn btn-create', tabindex: 3 - = link_to 'Cancel', namespace_project_branches_path(@project.namespace, @project), class: 'btn btn-cancel' - -:javascript - disableButtonIfAnyEmptyField($("#new-branch-form"), ".form-control", ".btn-create"); - var availableTags = #{@project.repository.ref_names.to_json}; - - $("#ref").autocomplete({ - source: availableTags, - minLength: 1 - }); |