Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e09a5de3
Commit
e09a5de3
authored
Nov 11, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mirror status to project homepage.
parent
9098fc54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+5
-5
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+7
-0
app/views/shared/_mirror_status.html.haml
app/views/shared/_mirror_status.html.haml
+14
-0
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
e09a5de3
...
...
@@ -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
;
}
}
}
...
...
app/views/projects/_home_panel.html.haml
View file @
e09a5de3
...
...
@@ -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
...
...
app/views/shared/_mirror_status.html.haml
0 → 100644
View file @
e09a5de3
-
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
)
}
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment