debian-mirror-gitlab/app/helpers/mirror_helper.rb

21 lines
878 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2018-11-20 20:47:30 +05:30
module MirrorHelper
def mirrors_form_data_attributes
2019-02-15 15:39:39 +05:30
{
project_mirror_ssh_endpoint: ssh_host_keys_project_mirror_path(@project, :json),
project_mirror_endpoint: project_mirror_path(@project, :json)
}
2018-11-20 20:47:30 +05:30
end
2019-07-31 22:56:46 +05:30
def mirror_lfs_sync_message
2021-01-03 14:25:43 +05:30
docs_link_url = help_page_path('topics/git/lfs/index')
docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url }
html_escape(_('Git LFS objects will be synced if LFS is %{docs_link_start}enabled for the project%{docs_link_end}. Push mirrors will %{strong_open}not%{strong_close} sync LFS objects over SSH.')) %
{ docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
2019-07-31 22:56:46 +05:30
end
2018-11-20 20:47:30 +05:30
end
2019-12-04 20:38:33 +05:30
2021-06-08 01:23:25 +05:30
MirrorHelper.prepend_mod_with('MirrorHelper')