Commit e09a5de3 authored by Douwe Maan's avatar Douwe Maan

Add mirror status to project homepage.

parent 9098fc54
......@@ -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
......
- 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)}.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment