wheels 0.1.25 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.25
1
+ 0.1.27
data/app/models/user.rb CHANGED
@@ -6,6 +6,8 @@ class User < ActiveRecord::Base
6
6
  has_many :access_control_entries, :dependent=>:destroy
7
7
  before_create :create_profile
8
8
 
9
+ validates :role, :presence => true
10
+
9
11
  accepts_nested_attributes_for :profile
10
12
 
11
13
  def initialize(*args)
@@ -0,0 +1,7 @@
1
+ %li.attachment
2
+ %ul{:id=>@attachment.element_id}
3
+ %li= link_to @attachment.file.original_filename, @attachment.file.url
4
+ %li Size: #{number_to_human_size @attachment.file.size}
5
+ %li Modified: #{@attachment.updated_at.try(:strftime, "%D %R")}
6
+ %li= link_to 'Remove File', page_attachment_path(@page, @attachment), :method=>:delete, "data-confirm"=>'Are you sure?', :remote=>true
7
+
@@ -1,3 +1,3 @@
1
- $('##{container}').remove;
1
+ $('##{container}').remove();
2
2
  = render :partial => "loadbehind/destroy"
3
3
 
File without changes
@@ -1,12 +1,43 @@
1
- - include_ckeditor
1
+
2
2
  = render :partial => "child_pages_links"
3
+ -if @page.errors.any?
4
+ #errorExplanation
5
+ %h2= "#{pluralize(@page.errors.count, "error")} prohibited this page from being saved:"
6
+ %ul
7
+ - @page.errors.full_messages.each do |msg|
8
+ %li= msg
3
9
 
4
- - if params[:action]=="new"
10
+ #tabs
11
+ %ul
12
+ %li= link_to 'Page Text', '#field-body'
13
+ %li= link_to 'Files', '#field-attachments'
14
+ %li= link_to 'Stylesheet', '#field-stylesheet'
5
15
  = form_for resource, :remote=>true do |f|
6
- = render :partial => "form_fields", :locals=>{:f=>f}
7
- - else
8
- = form_for form_object, {:url=>form_url, :remote=>true} do |f|
9
- = render :partial => "form_fields", :locals=>{:f=>f}
16
+ #field-body
17
+ .field
18
+ = f.label :title
19
+ = f.text_field :title
20
+ .field
21
+ .fieldName "Display Title for this page?"
22
+ = f.check_box :show_title
23
+ .textarea
24
+ = f.label :body
25
+ = f.text_area :body, :class=>'ckeditor_textarea', :size => "120x20"
26
+ = f.label :stylesheet
27
+ = hidden_field_tag :container, 'content_pane'
28
+ = hidden_field_tag :ajax_function, 'html'
29
+ #field-stylesheet
30
+ = f.text_area :stylesheet, :rows=>80, :cols=>20
31
+ #field-attachments
32
+ %ul#attachments_list
33
+ %li.sidebar_title Files
34
+ - @page.attachments.each do |attachment|
35
+ = render :partial => "attachments/edit", :locals=>{:a=>(@attachment=attachment)}
36
+ %li
37
+ Upload a file to this page.
38
+ = render :partial=>'attachments/form'
39
+
40
+
10
41
 
11
42
  = content_for :head do
12
43
  = javascript_include_tag 'jquery-validate/jquery.validate.pack'
@@ -2,3 +2,5 @@ if (CKEDITOR.instances['page_body']) {CKEDITOR.remove(CKEDITOR.instances['page_b
2
2
  $('##{container}').#{ajax_function}(#{raw render_js('form')});
3
3
  $('.ckeditor_textarea').ckeditor({filebrowserBrowseUrl : '/galleries'});
4
4
 
5
+ $('#tabs').tabs();
6
+
@@ -2,6 +2,8 @@
2
2
  = content_for :head do
3
3
  = javascript_include_tag %w(jquery.hotkeys jquery.cookie jquery.jstree)
4
4
  = javascript_include_tag %(sitemap_jstree)
5
+ = javascript_include_tag %(uploadify/jquery.uploadify.v2.1.0.min)
6
+ = javascript_include_tag %(uploadify/swfobject)
5
7
  = stylesheet_link_tag %(admin)
6
8
 
7
9
  = sidebar_content do
data/wheels.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wheels}
8
- s.version = "0.1.25"
8
+ s.version = "0.1.27"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyler Gannon"]
12
- s.date = %q{2010-10-04}
12
+ s.date = %q{2010-11-01}
13
13
  s.description = %q{Call rails generate wheels.}
14
14
  s.email = %q{tgannon@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -101,6 +101,7 @@ Gem::Specification.new do |s|
101
101
  "app/views/app_configs/show.html.haml",
102
102
  "app/views/app_configs/show.js.haml",
103
103
  "app/views/app_configs/update.js.haml",
104
+ "app/views/attachments/_edit.html.haml",
104
105
  "app/views/attachments/_form.html.haml",
105
106
  "app/views/attachments/_index.html.haml",
106
107
  "app/views/attachments/_show.html.haml",
@@ -108,6 +109,7 @@ Gem::Specification.new do |s|
108
109
  "app/views/attachments/create.js.haml",
109
110
  "app/views/attachments/destroy.js.haml",
110
111
  "app/views/attachments/edit.js.haml",
112
+ "app/views/attachments/file",
111
113
  "app/views/attachments/index.html.haml",
112
114
  "app/views/attachments/index.js.haml",
113
115
  "app/views/attachments/new.html.haml",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 25
9
- version: 0.1.25
8
+ - 27
9
+ version: 0.1.27
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tyler Gannon
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-04 00:00:00 -07:00
17
+ date: 2010-11-01 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -124,6 +124,7 @@ files:
124
124
  - app/views/app_configs/show.html.haml
125
125
  - app/views/app_configs/show.js.haml
126
126
  - app/views/app_configs/update.js.haml
127
+ - app/views/attachments/_edit.html.haml
127
128
  - app/views/attachments/_form.html.haml
128
129
  - app/views/attachments/_index.html.haml
129
130
  - app/views/attachments/_show.html.haml
@@ -131,6 +132,7 @@ files:
131
132
  - app/views/attachments/create.js.haml
132
133
  - app/views/attachments/destroy.js.haml
133
134
  - app/views/attachments/edit.js.haml
135
+ - app/views/attachments/file
134
136
  - app/views/attachments/index.html.haml
135
137
  - app/views/attachments/index.js.haml
136
138
  - app/views/attachments/new.html.haml