mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 15:46:08 +10:00
Add mirror status to project homepage.
This commit is contained in:
@@ -106,13 +106,13 @@
|
||||
.project-repo-buttons {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@include btn-gray;
|
||||
.btn {
|
||||
@include btn-gray;
|
||||
|
||||
.count {
|
||||
display: inline-block;
|
||||
}
|
||||
.count {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
= link_to project_path(forked_from_project) do
|
||||
= forked_from_project.namespace.try(:name)
|
||||
|
||||
- if @project.mirror?
|
||||
- import_url = @project.safe_import_url
|
||||
%p
|
||||
Mirrored from #{link_to import_url, import_url}.
|
||||
|
||||
= render "shared/mirror_status"
|
||||
= render "shared/mirror_update_button", size: "sm"
|
||||
|
||||
|
||||
.project-repo-buttons
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
- case @project.mirror_last_update_status
|
||||
- when :success
|
||||
Updated #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
|
||||
- when :failed
|
||||
- if @project.mirror_ever_updated_successfully?
|
||||
Last successful update #{time_ago_with_tooltip(@project.mirror_last_successful_update_at)}.
|
||||
|
||||
- if can?(current_user, :admin_project, @project)
|
||||
= link_to namespace_project_mirror_path(@project.namespace, @project) do
|
||||
= icon("exclamation-triangle")
|
||||
Failed to update #{time_ago_with_tooltip(@project.mirror_last_update_at)}.
|
||||
- else
|
||||
= icon("exclamation-triangle")
|
||||
Failed to update #{time_ago_with_tooltip(@project.mirror_last_update_at)}.
|
||||
Reference in New Issue
Block a user