diff options
Diffstat (limited to 'app/views/projects/buttons/_compare.html.haml')
-rw-r--r-- | app/views/projects/buttons/_compare.html.haml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/projects/buttons/_compare.html.haml b/app/views/projects/buttons/_compare.html.haml new file mode 100644 index 00000000000..82b1b837fbb --- /dev/null +++ b/app/views/projects/buttons/_compare.html.haml @@ -0,0 +1,8 @@ +- project = local_assigns.fetch(:project) +- ref = local_assigns.fetch(:ref, nil) +- root_ref = local_assigns.fetch(:root_ref, nil) +- unless ref.blank? || root_ref == ref + - compare_path = project_compare_index_path(project, from: root_ref, to: ref) + + = link_button_to compare_path, class: 'shortcuts-compare', rel: 'nofollow' do + = _('Compare') |