merbiful-release 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  PLUGIN = "merbiful-release"
7
7
  NAME = "merbiful-release"
8
- GEM_VERSION = "0.1.0"
8
+ GEM_VERSION = "0.1.1"
9
9
  AUTHOR = "Martin Kihlgren"
10
10
  EMAIL = "martin@wemind.se"
11
11
  HOMEPAGE = ""
@@ -6,7 +6,7 @@
6
6
  %a{:href => url(:merbiful_admin, :action => "css", :css_id => css.id)}
7
7
  %li{:class => "css_name"}= css.name
8
8
  %li{:class => "css_version"}= "ver##{css.latest.id} (#{time_ago_in_words(css.latest.created_at)} ago)"
9
- %li= link_to("-", url(:merbiful_admin, :action => "destroy_css", :css_id => css.id))
9
+ %li= link_to("-", url(:merbiful_admin, :action => "destroy_css", :css_id => css.id), :onclick => confirm("Are you absolutely certain that you want to destroy the css named #{css.name}? All versions will be irreversibly destroyed."))
10
10
  - if params[:css_id].to_s == css.id.to_s
11
11
  %table.css
12
12
  %form{:action => url(:merbiful_admin, :action => "css", :css_id => css.id), :method => "post"}
@@ -14,4 +14,4 @@
14
14
  %img{:height => 20, :src => image.to_s, :alt => image.to_s}
15
15
  %li{:class => "path"}= image
16
16
  - if Merbiful::Images.delete_possible?(image)
17
- %a{:href => url(:merbiful_admin, :action => "delete_image", :path => image)} -
17
+ = link_to("-", url(:merbiful_admin, :action => "delete_image", :path => image), :onclick => confirm("Are you absolutely certain that you want to delete the image at #{image}?"))
@@ -1,28 +1,17 @@
1
+ - if Merbiful::Images.upload_possible?
2
+ %form{:action => url(:merbiful_admin, :action => "upload_image"), :enctype => "multipart/form-data", :method => "post"}
3
+ Upload new image
4
+ %input{:name => "image", :size => "30", :type => "file"}
5
+ %input{:type => "submit", :value => "Upload"}
6
+ - else
7
+ %p Upload seems to be impossible, perhaps the 'public/images' directory is not writable?
1
8
  %ul{:class => "images"}
2
- - Merbiful::Images.all.each do |css|
3
- %li{:class => "css"}
4
- %ul{:class => "css_info info"}
5
- %a{:href => url(:merbiful_admin, :action => "css", :css_id => css.id)}
6
- %li{:class => "css_name"}= css.name
7
- %li{:class => "css_version"}= "ver##{css.latest.id} (#{time_ago_in_words(css.latest.created_at)} ago)"
8
- %li= link_to("-", url(:merbiful_admin, :action => "destroy_css", :css_id => css.id))
9
- - if params[:css_id].to_s == css.id.to_s
10
- %table.css
11
- %form{:action => url(:merbiful_admin, :action => "css", :css_id => css.id), :method => "post"}
12
- %tr
13
- %td Name
14
- %td= text_field(:name => "css[name]", :value => @form_css.name) + errors(@form_css, :name)
15
- %tr
16
- %td Body
17
- %td~ text_area(@form_css.body, :name => "version[body]", :cols => 80, :rows => text_area_rows) + errors(@form_version, :body)
18
- %tr{:class => "filter"}
19
- %td Filter
20
- %td= select(:name => "version[filter]", :collection => Merbiful::filters, :selected => @form_css.latest.filter) + errors(@form_version, :filter)
21
- %tr
22
- %td Media
23
- %td= text_field(:name => "css[media]", :value => @form_css.media) + errors(@form_css, :media)
24
- %tr{:class => "cached"}
25
- %td Cached
26
- %td= check_box(:name => "css[cached]", :checked => @form_css.cached) + errors(@form_css, :cached)
27
- %tr{:class => "submit"}
28
- %td{:colspan => "2"}= submit("Save")
9
+ - Merbiful::Images.images.each do |image|
10
+ %li{:class => "image"}
11
+ %ul{:class => "image_info info"}
12
+ %a{:href => image}
13
+ %li{:class => "picture"}
14
+ %img{:height => 20, :src => image.to_s, :alt => image.to_s}
15
+ %li{:class => "path"}= image
16
+ - if Merbiful::Images.delete_possible?(image)
17
+ %a{:href => url(:merbiful_admin, :action => "delete_image", :path => image)} -
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merbiful-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Kihlgren