wco_models 3.1.0.67 → 3.1.0.69

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: bc1b0041e1e7cc0a58fa69b37704b5dfebdc2d0610290017330310b8c2cee242
4
- data.tar.gz: a9a37074958de290fd370c174dda3122b79d7088b114ce07eed61f42a6c7b6fa
3
+ metadata.gz: ccaac0453a8e3bc7547214646136c37c0a9704ed39c21e1d548e5c45d5b568f0
4
+ data.tar.gz: c1ee1eb79c03a19d908275c495f9ff79cc6dd3e0709293873910e78bbcd066b8
5
5
  SHA512:
6
- metadata.gz: 3d03c8ec55871c5912f2e6f45c7cc9218ba149c09b9b0f8803f16e1151f02144acc6ca133d351c1d12d7a564b1a8b7d6673d280fce125f8f7bc7c69de9b55a15
7
- data.tar.gz: 4ee0c0bd1ceaa19bf59cd71de798ed0d30eb767f94db0b247636dbc565877edbdb55828febc2957bd0ad2e91e2ebafd476ed711973bb3e2d994db855592aad2a
6
+ metadata.gz: 8fa9faf6600eecb6164d617f769d3658de0501c5b0648b83ea6c660236345277701cdca020e6ff14b3cbf773a91c895993cd72a6b06c237c96547a19db740c9f
7
+ data.tar.gz: 0460b8b7ea57ddcef05a57b72f6978587b4ae8850a5718ff3ff571639a413b54d5770a5fddb0a77ca44666f160b3e6e6a76b27f8a1bf20457ed4e95a837bd774
@@ -0,0 +1,67 @@
1
+
2
+
3
+ .galleries--index .mini {
4
+ float: left;
5
+ }
6
+
7
+ .galleries--title {
8
+ // text-align: center;
9
+ }
10
+
11
+ div.galleries-show {
12
+ > * {
13
+ border-bottom: 2px solid red;
14
+ }
15
+
16
+ > *:last-child {
17
+ border-bottom: none;
18
+ }
19
+
20
+ .row-large .goto {
21
+ display: none;
22
+ }
23
+
24
+ }
25
+
26
+
27
+ // .row-thumbs .item {
28
+ // margin-bottom: 1em;
29
+ // img {
30
+ // margin-top: 10px;
31
+ // }
32
+ // }
33
+
34
+ .row-large .item {
35
+ // border: 1px solid red;
36
+ border-radius: 20px;
37
+
38
+ display: block;
39
+ margin-bottom: 1em;
40
+ max-height: 95vh;
41
+ padding: 10px;
42
+ padding-bottom: 50px;
43
+ background: #cecece;
44
+
45
+ .wrapper {
46
+ width: 100%;
47
+ height: 80vh;
48
+ background-repeat: no-repeat;
49
+ background-position: center center;
50
+ background-size: contain;
51
+
52
+ img {
53
+ max-height: 100%;
54
+ max-width: 100%;
55
+ }
56
+ }
57
+ }
58
+
59
+
60
+ .orderable-items {
61
+ .item {
62
+ border: 1px solid red;
63
+ padding: 10px;
64
+
65
+ max-width: Min(125px, 30vw);
66
+ }
67
+ }
@@ -0,0 +1,87 @@
1
+
2
+ .photos-minis {
3
+ img {
4
+ border: 1px solid red;
5
+ width: 20px;
6
+ height: 20px;
7
+
8
+ }
9
+ }
10
+
11
+ div.thumb {
12
+ margin: 0 0.5em 0.5em 0;
13
+ }
14
+
15
+ .photos-thumbs img,
16
+ img.thumb {
17
+ border: 1px solid red;
18
+ width: 100px;
19
+ height: 100px;
20
+ }
21
+
22
+
23
+
24
+ .photos--index-mini {
25
+ }
26
+ .photos--index-thumbs {
27
+ .item {
28
+ border: 1px solid red;
29
+ padding: 10px;
30
+
31
+ max-width: Min(125px, 30vw);
32
+ }
33
+ }
34
+ .photos--meta-manager {
35
+ display: flex;
36
+ justify-content: space-between;
37
+
38
+ .right-hand {
39
+ text-align: right;
40
+ }
41
+ .right-hand a {
42
+
43
+ }
44
+ .right-hand a:not(:first-child):before {
45
+ content: "|";
46
+ padding: 0 10px 0 15px;
47
+ }
48
+ }
49
+ .photos--multinew {
50
+ border: 1px dashed #356;
51
+ display: inline-block;
52
+ margin-bottom: 2em;
53
+ padding: 10px;
54
+
55
+ input[type='file'] {
56
+ overflow-x: auto;
57
+ max-width: Max( 300px, 50vw );
58
+ }
59
+
60
+ .errors > div {
61
+ border: 1px solid red;
62
+ }
63
+
64
+ .thumbnails {
65
+ .item {
66
+ border: 1px solid blue;
67
+ display: flex;
68
+
69
+ > * {
70
+ margin-right: .5em;
71
+ }
72
+ }
73
+ }
74
+
75
+ }
76
+
77
+ .row-deleted {
78
+ .goto,
79
+ .x {
80
+ display: none;
81
+ }
82
+ }
83
+ .row-mini {
84
+ .flex-row {
85
+ margin-bottom: 500px;
86
+ }
87
+ }
@@ -137,7 +137,15 @@ h5.title {
137
137
  /* P */
138
138
 
139
139
  .padded {
140
+ // border: 1px solid green;
141
+
140
142
  margin: 0.5em;
141
- width: 100%;
143
+ width: calc( 100% - 1em );
144
+ }
145
+
146
+ /* T */
147
+
148
+ .title {
149
+ word-break: break-word;
142
150
  }
143
151
 
@@ -0,0 +1,40 @@
1
+
2
+ .videos-index {
3
+ .header {
4
+ display: flex;
5
+ justify-content: space-between;
6
+ }
7
+
8
+ .item {
9
+ margin-bottom: 1em;
10
+
11
+ .title {
12
+ word-break: break-word;
13
+ }
14
+ }
15
+
16
+ .pagination {
17
+ margin: 1em 0;
18
+ }
19
+ }
20
+
21
+ div.videos-show {
22
+ // border-bottom: 2px solid red;
23
+ padding-bottom: .8em;
24
+
25
+ margin: 0 auto;
26
+ width: 640px;
27
+
28
+ .row {
29
+ display: flex;
30
+ margin: 0;
31
+
32
+ img {
33
+ margin-right: .8em;
34
+ width: 100px;
35
+ height: 100px;
36
+ }
37
+ }
38
+
39
+
40
+ }
@@ -47,7 +47,7 @@ class Wco::VideosController < Wco::ApplicationController
47
47
 
48
48
  respond_to do |format|
49
49
  format.html do
50
- render
50
+ render '_index'
51
51
  end
52
52
  format.json do
53
53
  render :json => @videos
@@ -17,6 +17,9 @@ class Wco::Gallery
17
17
  validates :slug, presence: true, uniqueness: true
18
18
  before_validation :set_slug, :on => :create
19
19
 
20
+ index({ created_at: -1 })
21
+ index({ created_at: -1, name: -1 })
22
+
20
23
  field :subhead
21
24
  field :descr, :as => :description
22
25
 
@@ -10,6 +10,9 @@ class Wco::Video
10
10
  store_in collection: 'videos'
11
11
 
12
12
  field :name, :type => String
13
+ index({ created_at: -1 })
14
+ index({ created_at: -1, name: -1 })
15
+
13
16
  field :descr, :type => String, :as => :description
14
17
  field :subhead ## still need it... 2023-03-24
15
18
 
@@ -4,7 +4,7 @@
4
4
  -# _vp_ 2022-09-25 :: Small styling revision
5
5
  -#
6
6
 
7
- - n_thumbs ||= 12
7
+ - n_thumbs ||= 8
8
8
  - galleries ||= @galleries
9
9
 
10
10
  .galleries--index.maxwidth
@@ -28,9 +28,9 @@
28
28
  - if g.photos.length == 0
29
29
  No Photos
30
30
  - else
31
- .flex-row
31
+ .d-flex.flex-wrap.photos-thumbs
32
32
  - g.photos.limit( n_thumbs ).each do |photo|
33
- = link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.slug)
33
+ = link_to image_tag(photo.photo.url(:thumb), :alt => ''), gallery_path(g.slug)
34
34
 
35
35
  - if galleries.respond_to? :total_pages
36
36
  = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
@@ -6,7 +6,7 @@
6
6
  (#{gallery.photos.length})
7
7
  = link_to '[~]', edit_gallery_path( gallery )
8
8
  .d-inline-block= button_to 'x', gallery_path(gallery), method: :delete, data: { confirm: 'Are you sure?' }
9
- - if gallery.is_public && !gallery.is_trash && !gallery.is_done
9
+ - if gallery.is_public
10
10
  %i.material-icons visibility
11
11
  - else
12
12
  %i.material-icons visibility_off
@@ -2,7 +2,7 @@
2
2
  - videos ||= @videos
3
3
  - this_videos_path ||= videos_path
4
4
 
5
- .videos--index
5
+ .videos--index.container-fluid
6
6
  .videos--menu
7
7
  = link_to "Videos (#{videos.count})", this_videos_path
8
8
 
@@ -18,19 +18,16 @@
18
18
 
19
19
  .row
20
20
  - videos.each do |video|
21
- .col-md-4.item
22
- .float-left
23
- - if video.youtube_id.present?
24
- %iframe{:allowfullscreen => "true", :frameborder => "0", :height => "150", :src => "//www.youtube.com/embed/#{video.youtube_id}", :width => "200"}
25
- - else
26
- .thumb= image_tag video.thumb.url(:thumb)
27
- .title
28
- = link_to video.name, video_path( video )
29
- .meta-edit
30
- .inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
31
- = link_to '[~]', edit_video_path( video )
32
-
33
- = render 'meta', item: video
21
+ .col-md-4
22
+ .d-flex
23
+ .thumb= image_tag video.thumb.url(:thumb), class: 'thumb'
24
+ .a
25
+ .title
26
+ = link_to video.name, video_path( video )
27
+ .d-flex
28
+ = link_to '[~]', edit_video_path( video )
29
+ = button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
30
+ = render 'meta', item: video
34
31
 
35
32
  = paginate videos, param_name: :videos_page, views_prefix: 'wco'
36
33
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.67
4
+ version: 3.1.0.69
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-14 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -363,8 +363,11 @@ files:
363
363
  - app/assets/stylesheets/vendor/bootstrap-4.6.2.min.css
364
364
  - app/assets/stylesheets/wco/alerts_notices.scss
365
365
  - app/assets/stylesheets/wco/application.css
366
+ - app/assets/stylesheets/wco/galleries.scss
366
367
  - app/assets/stylesheets/wco/pagination.scss
368
+ - app/assets/stylesheets/wco/photos.scss
367
369
  - app/assets/stylesheets/wco/utils.scss
370
+ - app/assets/stylesheets/wco/videos.scss
368
371
  - app/controllers/wco/application_controller.rb
369
372
  - app/controllers/wco/galleries_controller.rb
370
373
  - app/controllers/wco/headlines_controller.rb
@@ -550,7 +553,6 @@ files:
550
553
  - app/views/wco/videos/_header.haml
551
554
  - app/views/wco/videos/_index.haml
552
555
  - app/views/wco/videos/edit.haml
553
- - app/views/wco/videos/index.haml
554
556
  - app/views/wco/videos/new.haml
555
557
  - app/views/wco/videos/show.haml
556
558
  - app/views/wco/videos/trash/_embed.haml
@@ -1,3 +0,0 @@
1
-
2
- .videos-index.padded
3
- = render 'index', :videos => @videos