summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/_viewer_switcher.html.haml
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2017-05-02 13:20:41 -0500
committerRuben Davila <rdavila84@gmail.com>2017-05-02 13:20:41 -0500
commitbbfbcebdf69261bac6aa142f430719955e8e86b9 (patch)
tree25916a1a761cb6c8fcdac4b20b76017a7f4506d3 /app/views/projects/blob/_viewer_switcher.html.haml
parent3b82444eb7791e58e3e0ba2f08b8ccde48e3d4c6 (diff)
parent920d55b9f8afd35e16351fb57d671acf66092e89 (diff)
downloadgitlab-ce-bbfbcebdf69261bac6aa142f430719955e8e86b9.tar.gz
Merge branch 'master' into 28433-internationalise-cycle-analytics-page
Diffstat (limited to 'app/views/projects/blob/_viewer_switcher.html.haml')
-rw-r--r--app/views/projects/blob/_viewer_switcher.html.haml12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/projects/blob/_viewer_switcher.html.haml b/app/views/projects/blob/_viewer_switcher.html.haml
new file mode 100644
index 00000000000..6a521069418
--- /dev/null
+++ b/app/views/projects/blob/_viewer_switcher.html.haml
@@ -0,0 +1,12 @@
+- if blob.show_viewer_switcher?
+ - simple_viewer = blob.simple_viewer
+ - rich_viewer = blob.rich_viewer
+
+ .btn-group.js-blob-viewer-switcher{ role: "group" }
+ - simple_label = "Display #{simple_viewer.switcher_title}"
+ %button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }>
+ = icon(simple_viewer.switcher_icon)
+
+ - rich_label = "Display #{rich_viewer.switcher_title}"
+ %button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }>
+ = icon(rich_viewer.switcher_icon)