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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
e4cca4d7
Commit
e4cca4d7
authored
Apr 13, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display video blobs in-line like images
parent
31b87b8c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
2 deletions
+24
-2
app/assets/stylesheets/framework/files.scss
app/assets/stylesheets/framework/files.scss
+4
-2
app/models/blob.rb
app/models/blob.rb
+2
-0
app/models/blob_viewer/video.rb
app/models/blob_viewer/video.rb
+12
-0
app/views/projects/blob/viewers/_video.html.haml
app/views/projects/blob/viewers/_video.html.haml
+2
-0
changelogs/unreleased/dm-video-viewer.yml
changelogs/unreleased/dm-video-viewer.yml
+4
-0
No files found.
app/assets/stylesheets/framework/files.scss
View file @
e4cca4d7
...
...
@@ -61,11 +61,13 @@
.file-content
{
background
:
$white-light
;
&
.image_file
{
&
.image_file
,
&
.video
{
background
:
$file-image-bg
;
text-align
:
center
;
img
{
img
,
video
{
padding
:
20px
;
max-width
:
80%
;
}
...
...
app/models/blob.rb
View file @
e4cca4d7
...
...
@@ -27,6 +27,8 @@ class Blob < SimpleDelegator
BlobViewer
::
Image
,
BlobViewer
::
Sketch
,
BlobViewer
::
Video
,
BlobViewer
::
PDF
,
BlobViewer
::
BinarySTL
,
...
...
app/models/blob_viewer/video.rb
0 → 100644
View file @
e4cca4d7
module
BlobViewer
class
Video
<
Base
include
Rich
include
ClientSide
self
.
partial_name
=
'video'
self
.
extensions
=
UploaderHelper
::
VIDEO_EXT
self
.
binary
=
true
self
.
switcher_icon
=
'film'
self
.
switcher_title
=
'video'
end
end
app/views/projects/blob/viewers/_video.html.haml
0 → 100644
View file @
e4cca4d7
.file-content.video
%video
{
src:
blob_raw_url
,
controls:
true
,
data:
{
setup:
'
{}
'
}
}
changelogs/unreleased/dm-video-viewer.yml
0 → 100644
View file @
e4cca4d7
---
title
:
Display video blobs in-line like images
merge_request
:
author
:
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