refinerycms-applicants 1.0.2 → 1.1.0
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 +4 -4
- data/README.md +2 -2
- data/app/models/applicant.rb +2 -5
- data/app/views/admin/applicants/_applicant.html.erb +1 -1
- data/app/views/admin/applicants/_form.html.erb +0 -27
- data/app/views/applicants/new.html.erb +0 -15
- data/lib/version.rb +1 -1
- metadata +2 -4
- data/app/views/applicants/index.html.erb +0 -11
- data/app/views/applicants/show.html.erb +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7cac2501636cd48fb45c34f17dfd022869a47cf
|
4
|
+
data.tar.gz: ec5dd73f6c3f9d32d1ee54a690b2fa854b6a5a4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 225226618ecb20bf1f85be2621c728e63ee74ced427b24ef864554c5f0ff2feab15f965b7509f530b4c105749953f46e4e2ed765582835e23b1c26544ab0d2a2
|
7
|
+
data.tar.gz: 9ee6de27a70adb7d348f9bf5c439bcc1dbeaa2adf6a5e1d706a4ce838634cae8a3e3f6faafb3066c36901556b95bacbfccf1d320ced387ce6692feddae21c863
|
data/README.md
CHANGED
@@ -22,12 +22,12 @@ Include the latest [gem](http://rubygems.org/gems/refinerycms-applicants) into y
|
|
22
22
|
Refinery CMS application's Gemfile:
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
gem "refinerycms-applicants"
|
25
|
+
gem "refinerycms-applicants"
|
26
26
|
```
|
27
27
|
|
28
28
|
Then run the following commands to install the Gem and migrate your database:
|
29
29
|
|
30
30
|
bundle install
|
31
|
-
rails generate
|
31
|
+
rails generate refinerycms_applicants
|
32
32
|
rake db:migrate
|
33
33
|
|
data/app/models/applicant.rb
CHANGED
@@ -3,14 +3,11 @@ class Applicant < ActiveRecord::Base
|
|
3
3
|
has_many :answers
|
4
4
|
has_many :questions, :through => :answers
|
5
5
|
|
6
|
-
acts_as_indexed :fields => [:name
|
7
|
-
attr_accessible :name, :
|
6
|
+
acts_as_indexed :fields => [:name]
|
7
|
+
attr_accessible :name, :position, :answers_attributes
|
8
8
|
accepts_nested_attributes_for :answers
|
9
9
|
|
10
10
|
validates :name, :presence => true, :uniqueness => true
|
11
|
-
validates :contact_name, :presence => true
|
12
|
-
validates :contact_email, :presence => true
|
13
|
-
validates :contact_phone, :presence => true
|
14
11
|
|
15
12
|
def build_answers
|
16
13
|
Question.current.all.each do |q|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(applicant) -%>">
|
2
2
|
<span class='title'>
|
3
3
|
<%= applicant.name %>
|
4
|
-
<span class="preview">&
|
4
|
+
<span class="preview">— <%= applicant.created_at.strftime("%m/%d/%Y") %></span>
|
5
5
|
</span>
|
6
6
|
<span class='actions'>
|
7
7
|
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_applicant_path(applicant),
|
@@ -11,33 +11,6 @@
|
|
11
11
|
<%= f.text_field :name, :class => 'larger widest' -%>
|
12
12
|
</div>
|
13
13
|
|
14
|
-
<table width="100%" border="0">
|
15
|
-
<tr>
|
16
|
-
<td>
|
17
|
-
<div class='field'>
|
18
|
-
<%= f.label :contact_name -%>
|
19
|
-
<%= f.text_field :contact_name -%>
|
20
|
-
</div>
|
21
|
-
</td>
|
22
|
-
</tr>
|
23
|
-
<tr>
|
24
|
-
<td>
|
25
|
-
<div class='field'>
|
26
|
-
<%= f.label :contact_email -%>
|
27
|
-
<%= f.text_field :contact_email -%>
|
28
|
-
</div>
|
29
|
-
</td>
|
30
|
-
</tr>
|
31
|
-
<tr>
|
32
|
-
<td>
|
33
|
-
<div class='field'>
|
34
|
-
<%= f.label :contact_phone -%>
|
35
|
-
<%= f.text_field :contact_phone -%>
|
36
|
-
</div>
|
37
|
-
</td>
|
38
|
-
</tr>
|
39
|
-
</table>
|
40
|
-
|
41
14
|
<div class='field'>
|
42
15
|
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
|
43
16
|
<ul id='page_parts'>
|
@@ -13,21 +13,6 @@
|
|
13
13
|
<%= f.text_field :name, :maxlength => 255 %>
|
14
14
|
</div>
|
15
15
|
|
16
|
-
<fieldset>
|
17
|
-
<div class='field'>
|
18
|
-
<%= f.required_label :contact_name %>
|
19
|
-
<%= f.text_field :contact_name, :maxlength => 255 %>
|
20
|
-
</div>
|
21
|
-
<div class='field'>
|
22
|
-
<%= f.required_label :contact_email %>
|
23
|
-
<%= f.text_field :contact_email, :maxlength => 255 %>
|
24
|
-
</div>
|
25
|
-
<div class='field'>
|
26
|
-
<%= f.required_label :contact_phone %>
|
27
|
-
<%= f.text_field :contact_phone, :maxlength => 255 %>
|
28
|
-
</div>
|
29
|
-
</fieldset>
|
30
|
-
|
31
16
|
<div style="clear:both;"></div>
|
32
17
|
|
33
18
|
<% @applicant.answers.each do |answer| %>
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-applicants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Plante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: refinerycms
|
@@ -60,9 +60,7 @@ files:
|
|
60
60
|
- app/views/admin/questions/edit.html.erb
|
61
61
|
- app/views/admin/questions/index.html.erb
|
62
62
|
- app/views/admin/questions/new.html.erb
|
63
|
-
- app/views/applicants/index.html.erb
|
64
63
|
- app/views/applicants/new.html.erb
|
65
|
-
- app/views/applicants/show.html.erb
|
66
64
|
- app/views/applicants/thank_you.html.erb
|
67
65
|
- README.md
|
68
66
|
- LICENSE
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<% content_for :body_content_left do %>
|
2
|
-
<ul id="applicants">
|
3
|
-
<% @applicants.each do |applicant| %>
|
4
|
-
<li>
|
5
|
-
<%= link_to applicant.name, applicant_url(applicant) %>
|
6
|
-
</li>
|
7
|
-
<% end %>
|
8
|
-
</ul>
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
<%= render :partial => "/shared/content_page" %>
|
@@ -1,53 +0,0 @@
|
|
1
|
-
<% content_for :body_content_title do %>
|
2
|
-
<%= @applicant.name %>
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<% content_for :body_content_left do %>
|
6
|
-
<section>
|
7
|
-
<h1>Name</h1>
|
8
|
-
<p>
|
9
|
-
<%=raw @applicant.name %>
|
10
|
-
</p>
|
11
|
-
</section>
|
12
|
-
<section>
|
13
|
-
<h1>Founder1 Name</h1>
|
14
|
-
<p>
|
15
|
-
<%=raw @applicant.contact_name %>
|
16
|
-
</p>
|
17
|
-
</section>
|
18
|
-
<section>
|
19
|
-
<h1>Founder1 Email</h1>
|
20
|
-
<p>
|
21
|
-
<%=raw @applicant.contact_email %>
|
22
|
-
</p>
|
23
|
-
</section>
|
24
|
-
<section>
|
25
|
-
<h1>Founder1 Phone</h1>
|
26
|
-
<p>
|
27
|
-
<%=raw @applicant.contact_phone %>
|
28
|
-
</p>
|
29
|
-
</section>
|
30
|
-
<% (1..10).to_a.each do |q| %>
|
31
|
-
<section>
|
32
|
-
<h1><%= t("activerecord.attributes.applicant.question_#{q}") %></h1>
|
33
|
-
<p>
|
34
|
-
<%= raw @applicant.send("question_#{q}") %>
|
35
|
-
</p>
|
36
|
-
</section>
|
37
|
-
<% end %>
|
38
|
-
<% end %>
|
39
|
-
|
40
|
-
<% content_for :body_content_right do %>
|
41
|
-
<aside>
|
42
|
-
<h2><%= t('other') %></h2>
|
43
|
-
<ul id="applicants">
|
44
|
-
<% @applicants.each do |applicant| %>
|
45
|
-
<li>
|
46
|
-
<%= link_to applicant.name, applicant_url(applicant) %>
|
47
|
-
</li>
|
48
|
-
<% end %>
|
49
|
-
</ul>
|
50
|
-
</aside>
|
51
|
-
<% end %>
|
52
|
-
|
53
|
-
<%= render :partial => "/shared/content_page" %>
|