inline_forms 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -4,17 +4,14 @@ Inline Forms is almost a complete admin application. You can try it out easily.
4
4
 
5
5
  = Usage
6
6
 
7
- gem install inline_forms
8
-
9
- inline_forms MyAppName
10
-
11
- rails g inline_forms Picture name:string caption:string image:image_field description:text apartment:belongs_to _presentation:'#{name}' -f
12
-
13
- rails generate uploader Image
14
-
15
- rails g inline_forms Apartment name:string title:string description:text pictures:has_many pictures:associated _enabled:yes _presentation:'#{name}' -f
16
-
17
- rails s
7
+ gem install inline_forms
8
+ inline_forms MyAppName
9
+ cd MyAppName
10
+ rails g inline_forms Picture name:string caption:string image:image_field description:text apartment:belongs_to _presentation:'#{name}' -f
11
+ rails generate uploader Image
12
+ rails g inline_forms Apartment name:string title:string description:text pictures:has_many pictures:associated _enabled:yes _presentation:'#{name}' -f
13
+ bundle exec rake db:migrate
14
+ rails s
18
15
 
19
16
  point your browser to http://localhost:3000/apartments (make sure JavaScript is enabled)
20
17
 
@@ -9,6 +9,10 @@ module InlineFormsHelper
9
9
 
10
10
  private
11
11
 
12
+ def inline_forms_version
13
+ InlineForms::VERSION
14
+ end
15
+
12
16
  # close link
13
17
  def close_link( object, update_span )
14
18
  link_to image_tag( 'close.png',
@@ -0,0 +1,12 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.submit "Resend confirmation instructions" %></p>
10
+ <% end %>
11
+
12
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @resource.email %>!</p>
2
+
3
+ <p>You can confirm your account through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,16 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <p><%= f.label :password, "New password" %><br />
8
+ <%= f.password_field :password %></p>
9
+
10
+ <p><%= f.label :password_confirmation, "Confirm new password" %><br />
11
+ <%= f.password_field :password_confirmation %></p>
12
+
13
+ <p><%= f.submit "Change my password" %></p>
14
+ <% end %>
15
+
16
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,19 @@
1
+ <div id="large_title">QwiRed</div>
2
+ <div id="flash_message">
3
+ <%= devise_error_messages!.empty? ? 'Please provide your email and we will send you instructions' : devise_error_messages! -%>
4
+ </div>
5
+
6
+ <div id="sign_in">
7
+ <div id="sign_in_form">
8
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
9
+
10
+ <br /> <%= f.email_field :email %><br /><br />
11
+
12
+ <div><%= f.submit "Send me instructions" %></div>
13
+ <% end %>
14
+ </div>
15
+ </div>
16
+ <div id="shared_links">
17
+ <%= render :partial => "devise/shared/links" %>
18
+ </div>
19
+
@@ -0,0 +1,25 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
10
+ <%= f.password_field :password %></p>
11
+
12
+ <p><%= f.label :password_confirmation %><br />
13
+ <%= f.password_field :password_confirmation %></p>
14
+
15
+ <p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
16
+ <%= f.password_field :current_password %></p>
17
+
18
+ <p><%= f.submit "Update" %></p>
19
+ <% end %>
20
+
21
+ <h3>Cancel my account</h3>
22
+
23
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
24
+
25
+ <%= link_to "Back", :back %>
@@ -0,0 +1,25 @@
1
+ <div id="large_title">QwiRed</div>
2
+ <div id="flash_message">
3
+ <%= devise_error_messages!.empty? ? 'Please signup with your name, email and password' : devise_error_messages! -%>
4
+ </div>
5
+
6
+ <div id="sign_in">
7
+ <div id="sign_in_form">
8
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
9
+ <div class="float_right"><%= f.label :name %>&nbsp;&nbsp;<%= f.text_field :name %></div>
10
+ <div style="clear: both"></div>
11
+ <div class="float_right"><%= f.label :email %>&nbsp;&nbsp;<%= f.email_field :email %></div>
12
+ <div style="clear: both"></div>
13
+ <div class="float_right"><%= f.label :password %>&nbsp;&nbsp;<%= f.password_field :password %></div>
14
+ <div style="clear: both"></div>
15
+ <div class="float_right"><%= f.label :password_confirmation %>&nbsp;&nbsp;<%= f.password_field :password_confirmation %></div>
16
+ <div style="clear: both"></div>
17
+
18
+ <div><%= f.submit "Sign up" %></div>
19
+ <% end %>
20
+ </div>
21
+ </div>
22
+ <div id="shared_links">
23
+ <%= render :partial => "devise/shared/links" %>
24
+ </div>
25
+
@@ -0,0 +1,15 @@
1
+ <div id="large_title">RumboTS</div>
2
+ <div id="flash_message"><%= flash[:alert] || 'Please login with your email and password' -%></div>
3
+
4
+ <div id="sign_in">
5
+ <div id="sign_in_form">
6
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
7
+ <%= f.email_field :email %><br />
8
+ <%= f.password_field :password %>
9
+ <p><%= f.submit "Sign in" %></p>
10
+ <% end %>
11
+ </div>
12
+ </div>
13
+ <div id="shared_links">
14
+ <%= render :partial => "devise/shared/links" %>
15
+ </div>
@@ -0,0 +1,25 @@
1
+ | <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Sign in", new_session_path(resource_name) %> |
3
+ <% end -%>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %> |
7
+ <% end -%>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %> |
11
+ <% end -%>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %> |
15
+ <% end -%>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %> |
19
+ <% end -%>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %> |
24
+ <% end -%>
25
+ <% end -%>
@@ -0,0 +1,12 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <p><%= f.label :email %><br />
7
+ <%= f.email_field :email %></p>
8
+
9
+ <p><%= f.submit "Resend unlock instructions" %></p>
10
+ <% end %>
11
+
12
+ <%= render :partial => "devise/shared/links" %>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>RumboTS</title>
5
+ <%= stylesheet_link_tag 'devise' %>
6
+ <%#= javascript_include_tag :defaults %>
7
+ <%#= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
data/bin/inline_forms CHANGED
@@ -161,5 +161,22 @@ else
161
161
  system('bundle exec rake db:migrate')
162
162
  end
163
163
 
164
+ puts "Creating header in app/views/inline_forms/_header.html.erb...\n"
165
+ header_src = "
166
+ <div id='Header'>
167
+ <div id='title'>
168
+ #{app_name} v<%= inline_forms_version -%>
169
+ </div>
170
+ <% if cancan_enabled? -%>
171
+ <div id='logout'>
172
+ <%= link_to 'Afmelden: \#{current_user.name}', destroy_user_session_path %>
173
+ </div>
174
+ <% end -%>
175
+ <div style='clear: both;'></div>
176
+ </div>
177
+ "
178
+ FileUtils.mkdir_p 'app/views/inline_forms'
179
+ File.open( 'app/views/inline_forms/_header.html.erb', 'w') {|f| f.write(header_src) }
180
+
164
181
  puts "\n\nDone! Now make your tables.\n\n\n"
165
182
 
data/lib/inline_forms.rb CHANGED
@@ -1,5 +1,5 @@
1
- #puts "loading inline_forms...#{VERSION}"
2
-
1
+ require ('inline_forms/version.rb')
2
+ #puts "Loading inline_forms version #{InlineForms::VERSION}"
3
3
  module InlineForms
4
4
 
5
5
  # ActiveRecord::Migration comes with a set of column types.
@@ -1,3 +1,3 @@
1
1
  module InlineForms
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ace Suares
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-16 00:00:00 -04:00
18
+ date: 2011-10-18 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -153,6 +153,17 @@ files:
153
153
  - app/helpers/form_elements/text_field.rb
154
154
  - app/helpers/inline_forms_helper.rb
155
155
  - app/models/geo_code_curacao.rb
156
+ - app/views/devise/confirmations/new.html.erb
157
+ - app/views/devise/mailer/confirmation_instructions.html.erb
158
+ - app/views/devise/mailer/reset_password_instructions.html.erb
159
+ - app/views/devise/mailer/unlock_instructions.html.erb
160
+ - app/views/devise/passwords/edit.html.erb
161
+ - app/views/devise/passwords/new.html.erb
162
+ - app/views/devise/registrations/edit.html.erb
163
+ - app/views/devise/registrations/new.html.erb
164
+ - app/views/devise/sessions/new.html.erb
165
+ - app/views/devise/shared/_links.erb
166
+ - app/views/devise/unlocks/new.html.erb
156
167
  - app/views/inline_forms/_close.html.erb
157
168
  - app/views/inline_forms/_edit.html.erb
158
169
  - app/views/inline_forms/_header.html.erb
@@ -168,6 +179,7 @@ files:
168
179
  - app/views/inline_forms/show_element.js.erb
169
180
  - app/views/inline_forms/show_undo.js.erb
170
181
  - app/views/inline_forms/update.js.erb
182
+ - app/views/layouts/devise.html.erb
171
183
  - app/views/layouts/inline_forms.html.erb
172
184
  - bin/inline_forms
173
185
  - inline_forms.gemspec