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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f59ba038998f76d3d5ecdcb6eb2f77479f920c263afe1d43ee460cf50ce3d544
4
- data.tar.gz: f0644f8f8d78f5d4a28d890a0448b29c967ed409d06a809a006a4eede8aff31a
3
+ metadata.gz: 8fe0af2fe32744d65c81b4c43ece7e78dc43ed9f489d06b50d997a0eeae87ab2
4
+ data.tar.gz: b4b65f1f3e5f3eee1165abfed84b578ea1b1a160afa1dab15e7c1b421ecae2b6
5
5
  SHA512:
6
- metadata.gz: a86169cf6c2e4b5c32474bca91829d70e78de53dad447e2f88d9cf1e3a9c52ecad7f9776a3ee480997a2109fab55e1cfbe967ad595ee52d6a25840a9dbc890a8
7
- data.tar.gz: 28999bf3f30065d70c73698e26c1a46f194c4fbdc46c1cd75b4bcc346dcf732c3b11f315144b91ce74db1f69703eb8817acf1978f53e07e01832694cbecf3812
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 {
@@ -25,11 +25,6 @@ div.videos-show {
25
25
  margin: 0 auto;
26
26
  width: 640px;
27
27
 
28
- .title {
29
- font-size: 1.4em;
30
- margin-left: .2em;
31
- }
32
-
33
28
  .row {
34
29
  display: flex;
35
30
  margin: 0;
@@ -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, :user_profile => @current_profile
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 videos_path
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:</b>
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:$#{item.premium_tier}</b>
13
+ <b>Tier $#{item.premium_tier}</b>
@@ -28,7 +28,8 @@
28
28
  = f.text_area :subhead
29
29
  .field
30
30
  = f.label :descr
31
- = f.text_area :descr, :class => :tinymce
31
+ = f.text_area :descr
32
+ .descr= raw newsitem.descr
32
33
 
33
34
  .col-sm-6
34
35
  .field
@@ -1,8 +1,7 @@
1
1
 
2
- .newsitems-edit
2
+ .newsitems-edit.max-width
3
3
  %h1
4
4
  Edit Newsitem
5
5
  = render 'form', :newsitem => @newsitem
6
6
 
7
- .debug
8
- = @newsitem.inspect
7
+ -# .debug= @newsitem.inspect
@@ -4,120 +4,114 @@
4
4
 
5
5
  - url ||= reports_path
6
6
  = form_for report, :url => url, :html => { :multipart => true } do |f|
7
- - if report.errors.any?
8
- #error_explanation
9
- %h3= t('e.there_are_errors')
10
- %ul
11
- - report.errors.full_messages.each do |msg|
12
- %li= msg
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.s4
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 :subhead
25
- = f.text_area :subhead, :class => 'form-control', :rows => "5", :style=> "resize: vertical;"
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.s4
31
- .field
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.s4
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
- .panel.panel-default
49
- .panel-body
50
- .col.s6
51
- .form-group
52
- %label{} X-coordinate
53
- = f.text_field :x, :placeholder => "x", :type => "text", :class=>"form-control"
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
- .row
70
- .panel.panel-default
71
- .panel-heading
72
- %h3.panel-title Upload File
73
- .panel-body
74
- .row
75
- .col.s6.col.soffset-3
76
- %button.btn.btn-primary.btn-lg.btn-block{:type => "button", :onClick => "upload()"} Upload File
77
- = file_field_tag :photo, :style => "display:none", :id=>"photo"
78
- .div.center
79
- -# @TODO: wtf?
80
- %img#thumbnail_image_boy.img-thumbnail{:alt => "uploaded image", :width=>"200px"}
81
-
82
-
83
- :javascript
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,6 +1,5 @@
1
1
 
2
- .row
3
- .large-12.columns
2
+ .reports-edit.max-width
4
3
  %h1 Edit Report #{@report.name}
5
4
 
6
5
  = render 'form', :url => report_path(@report.id), :report => @report
@@ -1,29 +1,29 @@
1
1
 
2
2
  -# ish_manager / reports / index
3
3
 
4
- .row
5
- .large-12.columns
6
- %h3
7
- Reports (#{@reports.length})
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
- = paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
9
+ = paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
11
10
 
12
- - @reports.each do |report|
13
- .card
14
- .card-content
15
- = link_to '[~]', edit_report_path( report )
16
- .float-left= button_to '[x]', report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
17
- - if report.is_public
18
- %i.material-icons visibility
19
- - else
20
- %i.material-icons visibility_off
21
- = link_to report.name, report_path( report )
22
- %br
23
- .gray
24
- = pp_date report.created_at
25
- - if report.photo
26
- = image_tag report.photo.photo.url :thumb
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
- = paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
28
+ = paginate @reports, :param_name => :reports_page, :views_prefix => 'ish_manager'
29
29
 
@@ -1,20 +1,20 @@
1
1
 
2
- .manager-reports-show
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
- = render 'meta', item: @report
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
- - if @report.subhead.length > 3
13
- .subhead= @report.subhead
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
@@ -12,5 +12,4 @@
12
12
  Payments (purchased items) (#{@profile.payments.length}):
13
13
  - @profile.payments.each do |payment|
14
14
  .Card.item
15
- = payment.inspect
16
- = payment.item&.inspect
15
+ = payment
@@ -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.text_field :descr
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.s4
32
- = f.check_box :is_public
33
- = f.label :is_public
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
- .flex-row
13
+ .my-row
14
14
  .a= image_tag video.thumb.url(:thumb)
15
15
  .a
16
- .title
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
- .flex-row= link_to video.video_file_name, video.video.url
23
+ .flex-row
24
+ Download File:&nbsp;#{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.434
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-15 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails