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 +1 -1
- data/templates/css.html.haml~ +1 -1
- data/templates/images.html.haml +1 -1
- data/templates/images.html.haml~ +16 -27
- metadata +1 -1
data/Rakefile
CHANGED
data/templates/css.html.haml~
CHANGED
@@ -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"}
|
data/templates/images.html.haml
CHANGED
@@ -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
|
-
|
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}?"))
|
data/templates/images.html.haml~
CHANGED
@@ -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.
|
3
|
-
%li{:class => "
|
4
|
-
%ul{:class => "
|
5
|
-
%a{:href =>
|
6
|
-
%li{:class => "
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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)} -
|