debian-mirror-gitlab/app/views/projects/blob/_viewer_switcher.html.haml

13 lines
748 B
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- if blob.show_viewer_switcher?
- simple_viewer = blob.simple_viewer
- rich_viewer = blob.rich_viewer
2020-03-09 13:42:32 +05:30
.btn-group.js-blob-viewer-switcher.ml-2{ role: "group" }>
2017-08-17 22:00:37 +05:30
- simple_label = "Display #{simple_viewer.switcher_title}"
2021-01-03 14:25:43 +05:30
%button.btn.gl-button.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }>
2020-07-28 23:09:34 +05:30
= sprite_icon(simple_viewer.switcher_icon)
2017-08-17 22:00:37 +05:30
- rich_label = "Display #{rich_viewer.switcher_title}"
2021-01-03 14:25:43 +05:30
%button.btn.gl-button.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }>
2020-07-28 23:09:34 +05:30
= sprite_icon(rich_viewer.switcher_icon)