ish_manager 0.1.8.33 → 0.1.8.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6632b14e4f481e7ff53f96df5614fef857f9a7d3
4
- data.tar.gz: 55e69a6d9dd528ddb53c0f95dbb1cf1b11ac5087
3
+ metadata.gz: 86334fc75c5dbee29794846fc94f18b672d23b4b
4
+ data.tar.gz: f5e5dada0dc5d5d365bce2eb76161a5b8d562442
5
5
  SHA512:
6
- metadata.gz: 676d24598fe531e4a5c696c01a248ff032ea02e35924526a63192adbeffc5de99506130d74d42b10cfb56ad96e8bfb490c6f26c319018511b91fa11f2f07fce3
7
- data.tar.gz: 0d4b9b341ce4c2b4f9df4687ed31264cc5ef932e8cd43861ec5eaaaf53b3d8a4bee015fbef41da639e5870bb859392c53f7c293fb49ac1758b925ef7417232d5
6
+ metadata.gz: 428b6106487c9521d72238458741f421a7e2365885abfbe4775e1aa4d2dbdebdc53cca5ccfc0d0369ed15d8c6a2585f9ed3a89553a304464942d63af3833e65e
7
+ data.tar.gz: 21006383d18c10feefe7cd6747d8432d9c9fae653f783fd376b1d5ef3415415e7328ab0d70e549d054b0159a807e0267a111428578b4f0c4c2f4442e71cc4143
@@ -84,3 +84,14 @@ hr {
84
84
  }
85
85
  nav.pagination
86
86
  */
87
+
88
+ /**
89
+ * reports
90
+ */
91
+ .descr {
92
+ border: 1px solid yellow;
93
+ padding: 1em;
94
+ }
95
+ .descr .float-left {
96
+ padding-right: 1em;
97
+ }
@@ -40,16 +40,11 @@ class IshManager::ReportsController < IshManager::ApplicationController
40
40
  @report = Report.unscoped.find params[:id]
41
41
  authorize! :update, @report
42
42
 
43
- # photo
44
- photo = Photo.new
45
- photo.photo = params[:report][:photo]
46
- photo.report_id = @report.id
47
- # photo.user = @report.user
48
- photo.is_public = @report.is_public
49
- photo.is_trash = false
50
- photo.save
51
- @report.photo = photo
52
- params[:report][:photo] = nil
43
+ if params[:photo]
44
+ photo = Photo.new :photo => params[:photo]
45
+ @report.photo = photo
46
+ @report.save
47
+ end
53
48
 
54
49
  respond_to do |format|
55
50
  if @report.update_attributes(params[:report].permit!)
@@ -46,7 +46,10 @@
46
46
  %p
47
47
  = f.check_box :is_public
48
48
  = f.label :is_public
49
+
50
+ = file_field_tag :photo
51
+ - begin
52
+ = image_tag report.photo.photo.url(:thumb)
53
+ - rescue
49
54
 
50
- = f.file_field :photo
51
-
52
55
  = f.submit 'Submit'
@@ -17,4 +17,10 @@
17
17
 
18
18
  - if @report.subhead.length > 3
19
19
  .subhead= @report.subhead
20
- .descr= raw @report.descr
20
+
21
+ .descr
22
+ - if @report.photo
23
+ .float-left= image_tag @report.photo.photo.url( :small )
24
+ = raw @report.descr
25
+
26
+ .clearfix
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.33
4
+ version: 0.1.8.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox