ish_manager 0.1.8.434 → 0.1.8.436
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ish_manager/application.scss +2 -1
- data/app/assets/stylesheets/ish_manager/videos.scss +0 -5
- data/app/controllers/ish_manager/galleries_controller.rb +1 -1
- data/app/controllers/ish_manager/reports_controller.rb +12 -3
- data/app/controllers/ish_manager/videos_controller.rb +17 -2
- data/app/views/ish_manager/application/_meta.haml +2 -2
- data/app/views/ish_manager/newsitems/_form.haml +2 -1
- data/app/views/ish_manager/newsitems/edit.haml +2 -3
- data/app/views/ish_manager/reports/_form.haml +82 -88
- data/app/views/ish_manager/reports/edit.haml +1 -2
- data/app/views/ish_manager/reports/index.haml +22 -22
- data/app/views/ish_manager/reports/show.haml +14 -14
- data/app/views/ish_manager/user_profiles/show.haml +1 -2
- data/app/views/ish_manager/videos/_form.haml +4 -7
- data/app/views/ish_manager/videos/show.haml +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fe0af2fe32744d65c81b4c43ece7e78dc43ed9f489d06b50d997a0eeae87ab2
|
4
|
+
data.tar.gz: b4b65f1f3e5f3eee1165abfed84b578ea1b1a160afa1dab15e7c1b421ecae2b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7469ea57788dff6abfb772046dbd54c88cbddd7f8f57b77fb5d16c4848fb13e47fbf6ba5b2f0709f48bf2061e9800a581e24a41e61751e98a4d689787316a6fa
|
7
|
+
data.tar.gz: 39beb58297123e266f857c567e2103dcd75662b8c2ab4f58ad1521211a5bd88113ce2f0eca1d1e1be65833975d02e2488348dc53cfe3d4f755460aeb3ee805fe
|
@@ -246,7 +246,6 @@ table.dataTable {
|
|
246
246
|
.description {
|
247
247
|
border: 1px solid red;
|
248
248
|
padding: 1em;
|
249
|
-
font-size: 1.6em;
|
250
249
|
}
|
251
250
|
|
252
251
|
|
@@ -430,6 +429,8 @@ textarea.large {
|
|
430
429
|
display: inline;
|
431
430
|
}
|
432
431
|
|
432
|
+
|
433
|
+
|
433
434
|
/* N */
|
434
435
|
|
435
436
|
.n-selected {
|
@@ -101,9 +101,9 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def update
|
104
|
-
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
105
104
|
authorize! :update, @gallery
|
106
105
|
|
106
|
+
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
107
107
|
if params[:gallery][:shared_profiles].present?
|
108
108
|
params[:gallery][:shared_profiles].delete('')
|
109
109
|
end
|
@@ -56,15 +56,16 @@ class IshManager::ReportsController < IshManager::ApplicationController
|
|
56
56
|
def index
|
57
57
|
authorize! :index, Report
|
58
58
|
@reports = Report.unscoped.order_by( :created_at => :desc
|
59
|
-
).where( :is_trash => false, :user_profile => @current_profile
|
60
|
-
).page( params[:reports_page] ).per( Report::PER_PAGE )
|
59
|
+
).where( :is_trash => false, :user_profile => @current_profile )
|
61
60
|
if params[:q]
|
62
|
-
@reports = @reports.or({ slug: /#{params[:q]}/i }, { name: /#{params[:q]}}/i }) # @TODO: why can't I have space in search term?
|
61
|
+
# @reports = @reports.or({ slug: /#{params[:q]}/i }, { name: /#{params[:q]}}/i }) # @TODO: why can't I have space in search term?
|
62
|
+
@reports = @reports.where({ :name => /#{params[:q]}/i })
|
63
63
|
if @reports.length == 1
|
64
64
|
redirect_to report_path(@reports[0])
|
65
65
|
return
|
66
66
|
end
|
67
67
|
end
|
68
|
+
@reports = @reports.page( params[:reports_page] ).per( Report::PER_PAGE )
|
68
69
|
end
|
69
70
|
|
70
71
|
def new
|
@@ -94,6 +95,14 @@ class IshManager::ReportsController < IshManager::ApplicationController
|
|
94
95
|
@report.update_attributes( :photo => photo, :updated_at => Time.now )
|
95
96
|
end
|
96
97
|
|
98
|
+
old_shared_profile_ids = @report.shared_profiles.map(&:id)
|
99
|
+
if params[:report][:shared_profiles].present?
|
100
|
+
params[:report][:shared_profiles].delete('')
|
101
|
+
end
|
102
|
+
params[:report][:shared_profile_ids] = params[:report][:shared_profiles]
|
103
|
+
params[:report].delete :shared_profiles
|
104
|
+
|
105
|
+
|
97
106
|
respond_to do |format|
|
98
107
|
if @report.update_attributes(params[:report].permit!)
|
99
108
|
format.html do
|
@@ -40,7 +40,8 @@ class IshManager::VideosController < IshManager::ApplicationController
|
|
40
40
|
|
41
41
|
def index
|
42
42
|
authorize! :index, Video.new
|
43
|
-
@videos = Video.unscoped.where( is_trash: false,
|
43
|
+
@videos = Video.unscoped.where( is_trash: false,
|
44
|
+
:user_profile => @current_profile
|
44
45
|
).order_by( :created_at => :desc )
|
45
46
|
|
46
47
|
if params[:q]
|
@@ -81,10 +82,24 @@ class IshManager::VideosController < IshManager::ApplicationController
|
|
81
82
|
@video = Video.unscoped.find params[:id]
|
82
83
|
authorize! :update, @video
|
83
84
|
|
85
|
+
old_shared_profile_ids = @video.shared_profile_ids
|
86
|
+
if params[:video][:shared_profiles].present?
|
87
|
+
params[:video][:shared_profiles].delete('')
|
88
|
+
end
|
89
|
+
params[:video][:shared_profile_ids] = params[:video][:shared_profiles]
|
90
|
+
params[:video].delete :shared_profiles
|
91
|
+
|
84
92
|
@video.update params[:video].permit!
|
85
93
|
if @video.save
|
94
|
+
|
95
|
+
# if params[:video][:shared_profile_ids].present?
|
96
|
+
# new_shared_profiles = Ish::UserProfile.find( params[:video][:shared_profile_ids]
|
97
|
+
# ).select { |p| !old_shared_profile_ids.include?( p.id ) }
|
98
|
+
# ::IshManager::ApplicationMailer.shared_video( new_shared_profiles, @video ).deliver
|
99
|
+
# end
|
100
|
+
|
86
101
|
flash[:notice] = 'Success.'
|
87
|
-
redirect_to
|
102
|
+
redirect_to video_path(@video)
|
88
103
|
else
|
89
104
|
flash[:alert] = "No luck: #{@video.errors.messages}"
|
90
105
|
render :edit
|
@@ -3,11 +3,11 @@
|
|
3
3
|
|
4
4
|
<b>On</b> #{item.created_at.to_s[0...10]}
|
5
5
|
- if item.user_profile
|
6
|
-
<b>By
|
6
|
+
<b>By</b>
|
7
7
|
= link_to item.user_profile.name, edit_user_profile_path( item.user_profile )
|
8
8
|
|
9
9
|
-# - if item.tags.length > 0
|
10
10
|
-# <b>Tags:</b> #{ item.tags.map(&:name).join(', ') }
|
11
11
|
|
12
12
|
- if defined?(item.premium_tier) && item.premium_tier > 0
|
13
|
-
<b>Tier
|
13
|
+
<b>Tier $#{item.premium_tier}</b>
|
@@ -4,120 +4,114 @@
|
|
4
4
|
|
5
5
|
- url ||= reports_path
|
6
6
|
= form_for report, :url => url, :html => { :multipart => true } do |f|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
|
8
|
+
-# - if report.errors.any?
|
9
|
+
-# #error_explanation
|
10
|
+
-# %h3= t('e.there_are_errors')
|
11
|
+
-# %ul
|
12
|
+
-# - report.errors.full_messages.each do |msg|
|
13
|
+
-# %li= msg
|
13
14
|
|
14
15
|
.row
|
15
|
-
.col
|
16
|
+
.col-md-6
|
16
17
|
.field
|
17
18
|
= f.label :"Name"
|
18
19
|
= f.text_field :name, :class=> 'form-control', :placeholder => "name of report", :type => "text"
|
20
|
+
.field
|
19
21
|
= f.label "Slug"
|
20
22
|
= f.text_field :slug, :class=> 'form-control', :placeholder => "name seo", :type => "text"
|
21
|
-
|
22
|
-
.col.s4
|
23
23
|
.field
|
24
|
-
= f.label :
|
25
|
-
= f.
|
24
|
+
= f.label :created_at
|
25
|
+
= f.text_field :created_at
|
26
26
|
.field
|
27
27
|
= f.label "Item Type: default, longscroll"
|
28
28
|
= f.text_field :item_type
|
29
29
|
|
30
|
-
.col
|
31
|
-
|
32
|
-
= f.label :created_at
|
33
|
-
= f.text_field :created_at
|
34
|
-
|
35
|
-
.field
|
36
|
-
= f.label :Description
|
37
|
-
= f.text_area :descr, :class => 'tinymce'
|
38
|
-
.field
|
39
|
-
= f.label :raw_json
|
40
|
-
= f.text_area :raw_json
|
41
|
-
|
42
|
-
%br
|
30
|
+
.col-md-6
|
31
|
+
= render 'ish_manager/application/form_nonpublic', f: f, model: report
|
43
32
|
|
44
33
|
.row
|
45
|
-
.col
|
34
|
+
.col-md-4
|
46
35
|
.field
|
36
|
+
= f.label :Description
|
37
|
+
= f.text_area :descr
|
38
|
+
.col-md-4
|
39
|
+
.field
|
40
|
+
= f.label :raw_json
|
41
|
+
= f.text_area :raw_json
|
42
|
+
.col-md-4
|
43
|
+
.field
|
44
|
+
= f.label :subhead
|
45
|
+
= f.text_area :subhead, :class => 'form-control', :rows => "5", :style=> "resize: vertical;"
|
46
|
+
|
47
|
+
.row
|
48
|
+
.col-md-4
|
49
|
+
.field.my-row
|
47
50
|
= f.label :Coordinates
|
48
|
-
.
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
.col.s6
|
56
|
-
.form-group
|
57
|
-
%label{} Y-coordinate
|
58
|
-
= f.text_field :y, :placeholder => "y", :type => "text", :class=>"form-control"
|
59
|
-
.col.s4
|
51
|
+
= f.text_field :x, :placeholder => "x", :type => "text", :class=>"form-control"
|
52
|
+
= f.text_field :y, :placeholder => "y", :type => "text", :class=>"form-control"
|
53
|
+
= f.text_field :z, :placeholder => "z", :type => "text", :class=>"form-control"
|
54
|
+
|
55
|
+
|
56
|
+
.col-md-4
|
60
57
|
.field
|
61
58
|
= f.label :premium_tier
|
62
59
|
= f.number_field :premium_tier
|
63
60
|
.field
|
64
61
|
= f.label :user_profile
|
65
62
|
= select :report, :user_profile_id, @user_profiles_list
|
66
|
-
.col.s4
|
67
|
-
unused
|
68
63
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
$( document ).ready(function() {
|
86
|
-
$(".caret").html("");
|
87
|
-
});
|
88
|
-
|
89
|
-
function upload(){
|
90
|
-
document.getElementById("photo").click();
|
91
|
-
}
|
64
|
+
.col-md-4
|
65
|
+
.panel.panel-default
|
66
|
+
.panel-heading
|
67
|
+
%h3.panel-title Upload File
|
68
|
+
.panel-body
|
69
|
+
.row
|
70
|
+
.col.s6.col.soffset-3
|
71
|
+
%button.btn.btn-primary.btn-lg.btn-block{:type => "button", :onClick => "upload()"} Upload File
|
72
|
+
= file_field_tag :photo, :style => "display:none", :id=>"photo"
|
73
|
+
.div.center
|
74
|
+
-# @TODO: wtf?
|
75
|
+
%img#thumbnail_image_boy.img-thumbnail{:alt => "uploaded image", :width=>"200px"}
|
76
|
+
|
77
|
+
|
78
|
+
|
92
79
|
|
93
|
-
function handleFileSelect(evt) {
|
94
|
-
var files = evt.target.files;
|
95
|
-
|
96
|
-
// Loop through the FileList and render image files as thumbnails.
|
97
|
-
for (var i = 0, f; f = files[i]; i++) {
|
98
|
-
// Only process image files.
|
99
|
-
if (f.type.match('image.*')) {
|
100
|
-
var reader = new FileReader();
|
101
|
-
|
102
|
-
reader.onload = function (e) {
|
103
|
-
// get loaded data and render thumbnail.
|
104
|
-
document.getElementById("thumbnail_image_boy").src = e.target.result;
|
105
|
-
};
|
106
|
-
|
107
|
-
// read the image file as a data URL.
|
108
|
-
reader.readAsDataURL(f);
|
109
|
-
}else{
|
110
|
-
$("#photo").val("");
|
111
|
-
alert("Only images accepted.");
|
112
|
-
}
|
113
|
-
}
|
114
|
-
}
|
115
|
-
document.getElementById('photo').addEventListener('change', handleFileSelect, false);
|
116
80
|
|
117
|
-
.input
|
118
|
-
= f.check_box :is_public
|
119
|
-
= f.label :is_public
|
120
81
|
.input
|
121
82
|
= f.check_box :is_trash
|
122
83
|
= f.label :is_trash
|
123
84
|
%button.btn.btn-success{:type => "submit"} submit
|
85
|
+
|
86
|
+
:javascript
|
87
|
+
$( document ).ready(function() {
|
88
|
+
$(".caret").html("");
|
89
|
+
});
|
90
|
+
|
91
|
+
function upload(){
|
92
|
+
document.getElementById("photo").click();
|
93
|
+
}
|
94
|
+
|
95
|
+
function handleFileSelect(evt) {
|
96
|
+
var files = evt.target.files;
|
97
|
+
|
98
|
+
// Loop through the FileList and render image files as thumbnails.
|
99
|
+
for (var i = 0, f; f = files[i]; i++) {
|
100
|
+
// Only process image files.
|
101
|
+
if (f.type.match('image.*')) {
|
102
|
+
var reader = new FileReader();
|
103
|
+
|
104
|
+
reader.onload = function (e) {
|
105
|
+
// get loaded data and render thumbnail.
|
106
|
+
document.getElementById("thumbnail_image_boy").src = e.target.result;
|
107
|
+
};
|
108
|
+
|
109
|
+
// read the image file as a data URL.
|
110
|
+
reader.readAsDataURL(f);
|
111
|
+
}else{
|
112
|
+
$("#photo").val("");
|
113
|
+
alert("Only images accepted.");
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
document.getElementById('photo').addEventListener('change', handleFileSelect, false);
|
@@ -1,29 +1,29 @@
|
|
1
1
|
|
2
2
|
-# ish_manager / reports / index
|
3
3
|
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
= link_to image_new, new_report_path
|
4
|
+
.reports-index.max-width
|
5
|
+
%h3
|
6
|
+
Reports (#{@reports.length})
|
7
|
+
= link_to image_new, new_report_path
|
9
8
|
|
10
|
-
|
9
|
+
= paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
- @reports.each do |report|
|
12
|
+
.card
|
13
|
+
.card-content
|
14
|
+
= link_to '[~]', edit_report_path( report )
|
15
|
+
.float-left= button_to '[x]', report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
16
|
+
- if report.is_public
|
17
|
+
%i.material-icons visibility
|
18
|
+
- else
|
19
|
+
%i.material-icons visibility_off
|
20
|
+
= link_to report.name, report_path( report )
|
21
|
+
%br
|
22
|
+
.gray
|
23
|
+
= pp_date report.created_at
|
24
|
+
slug: #{report.slug}
|
25
|
+
- if report.photo
|
26
|
+
= image_tag report.photo.photo.url :thumb
|
27
27
|
|
28
|
-
|
28
|
+
= paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
|
29
29
|
|
@@ -1,20 +1,20 @@
|
|
1
1
|
|
2
|
-
.
|
3
|
-
.row
|
4
|
-
.large-12.columns
|
5
|
-
%h1.flex-row
|
6
|
-
= @report.name
|
7
|
-
= link_to '[~]', edit_report_path( @report )
|
8
|
-
= button_to '[x]', report_path( @report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
2
|
+
.reports-show.max-width
|
9
3
|
|
10
|
-
|
4
|
+
%h1.flex-row
|
5
|
+
= @report.name
|
6
|
+
= link_to '[~]', edit_report_path( @report )
|
7
|
+
= button_to '[x]', report_path( @report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
11
8
|
|
12
|
-
|
13
|
-
|
9
|
+
= render 'meta', item: @report
|
10
|
+
|
11
|
+
- if @report.subhead.length > 3
|
12
|
+
.subhead= @report.subhead
|
13
|
+
|
14
|
+
.descr
|
15
|
+
- if @report.photo
|
16
|
+
.float-left= image_tag @report.photo.photo.url( :small )
|
17
|
+
= raw @report.descr
|
14
18
|
|
15
|
-
.descr
|
16
|
-
- if @report.photo
|
17
|
-
.float-left= image_tag @report.photo.photo.url( :small )
|
18
|
-
= raw @report.descr
|
19
19
|
%hr
|
20
20
|
= render 'form', :url => report_path(@report.id), :report => @report
|
@@ -1,7 +1,5 @@
|
|
1
1
|
|
2
2
|
= form_for video do |f|
|
3
|
-
-# = render 'form_errors', :item => @video
|
4
|
-
|
5
3
|
.row
|
6
4
|
.col.m6
|
7
5
|
.field
|
@@ -12,7 +10,7 @@
|
|
12
10
|
= f.text_field :name
|
13
11
|
.field
|
14
12
|
= f.label :descr
|
15
|
-
= f.
|
13
|
+
= f.text_area :descr
|
16
14
|
.col.m6
|
17
15
|
.field
|
18
16
|
= f.label :video
|
@@ -28,10 +26,9 @@
|
|
28
26
|
= f.label :user_profile
|
29
27
|
= f.select :user_profile_id, @user_profiles_list
|
30
28
|
.row
|
31
|
-
.col
|
32
|
-
= f
|
33
|
-
|
34
|
-
.col.s4
|
29
|
+
.col-md-6
|
30
|
+
= render 'ish_manager/application/form_nonpublic', f: f, model: video
|
31
|
+
.col-md-6
|
35
32
|
= f.check_box :is_trash
|
36
33
|
= f.label :is_trash
|
37
34
|
|
@@ -10,15 +10,16 @@
|
|
10
10
|
- else
|
11
11
|
%iframe{:allowfullscreen => "true", :frameborder => "0", :height => "480", :src => "#{video.video.url}", :width => "640"}
|
12
12
|
|
13
|
-
.
|
13
|
+
.my-row
|
14
14
|
.a= image_tag video.thumb.url(:thumb)
|
15
15
|
.a
|
16
|
-
|
16
|
+
%h3
|
17
17
|
= video.name.blank? ? t('videos.no_title') : video.name
|
18
18
|
.meta-edit
|
19
19
|
.inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
20
20
|
= link_to '[~]', edit_video_path( video )
|
21
21
|
|
22
22
|
= render 'ish_manager/application/metaline', :item => video
|
23
|
-
|
23
|
+
.flex-row
|
24
|
+
Download File: #{link_to video.video_file_name, video.video.url}
|
24
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.436
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|