mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 15:46:08 +10:00
Add mirror status to commits, branches and tags pages.
This commit is contained in:
@@ -3,17 +3,25 @@
|
||||
%div
|
||||
= 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-primary default
|
||||
- elsif @repository.merged_to_root_ref? branch.name
|
||||
%span.label.label-info.has_tooltip(title="Merged into #{@repository.root_ref}")
|
||||
merged
|
||||
|
||||
- if @project.protected_branch? branch.name
|
||||
%span.label.label-success
|
||||
%i.fa.fa-lock
|
||||
protected
|
||||
- if branch.name == @repository.root_ref
|
||||
%span.label.label-primary default
|
||||
- elsif @repository.merged_to_root_ref? branch.name
|
||||
%span.label.label-info.has_tooltip(title="Merged into #{@repository.root_ref}")
|
||||
merged
|
||||
|
||||
- if @project.protected_branch? branch.name
|
||||
%span.label.label-success
|
||||
= icon('lock')
|
||||
protected
|
||||
|
||||
- if @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(branch.name)
|
||||
- tooltip_message = "The branch could not be updated automatically because it has diverged from its upstream counterpart."
|
||||
- tooltip_message << "<br>To discard the local changes and overwrite the branch with the upstream version, delete it here and choose 'Update Now' above." if can?(current_user, :push_code, @project)
|
||||
%span.label.label-danger.has_tooltip{data: { html: "true", title: tooltip_message }}
|
||||
= icon('exclamation-triangle')
|
||||
diverged from upstream
|
||||
|
||||
.controls.hidden-xs
|
||||
- if create_mr_button?(@repository.root_ref, branch.name)
|
||||
= link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-grouped btn-xs' do
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
.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
|
||||
= icon('plus')
|
||||
New branch
|
||||
|
||||
.dropdown.inline
|
||||
@@ -26,6 +26,9 @@
|
||||
= sort_title_oldest_updated
|
||||
.oneline
|
||||
Protected branches can be managed in project settings
|
||||
|
||||
= render 'projects/commits/mirror_status'
|
||||
|
||||
- unless @branches.empty?
|
||||
%ul.content-list.all-branches
|
||||
- @branches.each do |branch|
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
- if @project.mirror?
|
||||
.gray-content-block.second-block
|
||||
.pull-right
|
||||
= render "shared/mirror_update_button"
|
||||
|
||||
- import_url = @project.safe_import_url
|
||||
.oneline
|
||||
This project is mirrored from #{link_to import_url, import_url}.
|
||||
|
||||
= render "shared/mirror_status"
|
||||
@@ -24,6 +24,8 @@
|
||||
%ul.breadcrumb.repo-breadcrumb
|
||||
= commits_breadcrumbs
|
||||
|
||||
= render 'projects/commits/mirror_status'
|
||||
|
||||
%div{id: dom_id(@project)}
|
||||
#commits-list= render "commits", project: @project
|
||||
.clear
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
- if can? current_user, :push_code, @project
|
||||
.pull-right
|
||||
= link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do
|
||||
%i.fa.fa-add-sign
|
||||
= icon('plus')
|
||||
New tag
|
||||
.oneline
|
||||
Tags give the ability to mark specific points in history as being important
|
||||
|
||||
= render 'projects/commits/mirror_status'
|
||||
|
||||
.tags
|
||||
- unless @tags.empty?
|
||||
%ul.content-list
|
||||
|
||||
Reference in New Issue
Block a user