parlement 0.2 → 0.3
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.
- data/CHANGES +14 -4
- data/README +25 -5
- data/Rakefile +21 -21
- data/app/controllers/account_controller.rb +5 -1
- data/app/controllers/elt_controller.rb +7 -10
- data/app/controllers/person_controller.rb +9 -0
- data/app/controllers/subscriber_controller.rb +21 -0
- data/app/helpers/elt_helper.rb +25 -13
- data/app/helpers/mailman.rb +9 -92
- data/app/helpers/subscriber_helper.rb +2 -0
- data/app/models/attachment.rb +2 -0
- data/app/models/elt.rb +64 -2
- data/app/models/mail.rb +198 -0
- data/app/models/mail_notify.rb +63 -0
- data/app/models/person.rb +8 -1
- data/app/views/account/_login.rhtml +31 -28
- data/app/views/account/_show.rhtml +4 -4
- data/app/views/elt/_elt.rhtml +23 -28
- data/app/views/elt/_list.rhtml +6 -2
- data/app/views/elt/new.rhtml +1 -1
- data/app/views/elt/show.rhtml +32 -10
- data/app/views/layouts/top.rhtml +16 -10
- data/app/views/mail_notify/publish.text.html.rhtml +46 -0
- data/app/views/mail_notify/publish.text.plain.rhtml +2 -0
- data/app/views/person/_listElts.rhtml +33 -0
- data/app/views/person/show.rhtml +21 -19
- data/config/boot.rb +2 -0
- data/config/environment.rb +19 -13
- data/config/environments/development.rb +3 -1
- data/config/environments/production.rb +2 -0
- data/config/environments/test.rb +2 -0
- data/config/routes.rb +5 -2
- data/db/ROOT/mail.txt +2 -0
- data/db/ROOT/parlement/news/release0.2.txt +8 -0
- data/db/ROOT/parlement/news/release0.3.txt +11 -0
- data/db/ROOT/parlement/test.txt +6 -1
- data/db/ROOT/parlement.txt +23 -30
- data/db/ROOT/perso.txt +17 -18
- data/db/development_structure.sql +133 -217
- data/db/schema.rb +83 -0
- data/db/schema.sql +11 -15
- data/lib/data_import.rb +3 -1
- data/public/attachment/file/architecture.png +0 -0
- data/public/attachment/file/architecture.svg +8972 -0
- data/public/attachment/file/security.svg +8960 -0
- data/public/images/Sleep-Deprivation-5.JPG +0 -0
- data/public/images/eltBackground.png +0 -0
- data/public/images/eltBackground.svg +89 -0
- data/public/images/orange_by_darren_Hester_350o.jpg +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/smile.png +0 -0
- data/public/images/smile.svg +257 -0
- data/public/images/world.png +0 -0
- data/public/images/world.svg +170 -0
- data/public/javascripts/controls.js +30 -1
- data/public/javascripts/dragdrop.js +210 -145
- data/public/javascripts/effects.js +261 -399
- data/public/javascripts/ie7.js +6 -0
- data/public/javascripts/prototype.js +131 -72
- data/public/oldindex.html +270 -71
- data/public/stylesheets/default.css +189 -215
- data/script/about +1 -1
- data/script/breakpointer +1 -1
- data/script/console +1 -1
- data/script/destroy +1 -1
- data/script/generate +1 -1
- data/script/performance/benchmarker +1 -1
- data/script/performance/profiler +1 -1
- data/script/plugin +1 -1
- data/script/process/reaper +1 -1
- data/script/process/spawner +1 -1
- data/script/process/spinner +1 -1
- data/script/runner +1 -1
- data/script/server +1 -1
- data/test/fixtures/elts.yml +2 -0
- data/test/fixtures/mail/mail_ruby +27 -0
- data/test/fixtures/mail/mail_rubyChild +28 -0
- data/test/fixtures/mail/mail_rubyWithAttachment +7932 -0
- data/test/fixtures/mail/mail_rubyWithSubject +27 -0
- data/test/fixtures/mails.yml +7 -1
- data/test/fixtures/people.yml +5 -0
- data/test/fixtures/subscribers.yml +11 -0
- data/test/functional/account_controller_test.rb +38 -37
- data/test/functional/subscriber_controller_test.rb +128 -0
- data/test/test_helper.rb +44 -0
- data/test/unit/attachment_test.rb +1 -1
- data/test/unit/elt_test.rb +3 -2
- data/test/unit/mail_notify_test.rb +37 -0
- data/test/unit/mail_test.rb +124 -1
- data/test/unit/notifier_test.rb +0 -14
- data/test/unit/person_test.rb +2 -1
- data/test/unit/subscriber_test.rb +35 -0
- data/test/unit/user_test.rb +3 -3
- data/vendor/plugins/file_column/CHANGELOG +64 -0
- data/vendor/plugins/file_column/README +54 -0
- data/vendor/plugins/file_column/Rakefile +36 -0
- data/vendor/plugins/file_column/TODO +6 -0
- data/vendor/plugins/file_column/init.rb +12 -0
- data/vendor/plugins/file_column/lib/file_column.rb +719 -0
- data/vendor/plugins/file_column/lib/file_column_helper.rb +145 -0
- data/vendor/plugins/file_column/lib/file_compat.rb +28 -0
- data/vendor/plugins/file_column/lib/magick_file_column.rb +188 -0
- data/vendor/plugins/file_column/lib/validations.rb +112 -0
- data/vendor/plugins/file_column/test/abstract_unit.rb +90 -0
- data/vendor/plugins/file_column/test/connection.rb +17 -0
- data/vendor/plugins/file_column/test/file_column_helper_test.rb +97 -0
- data/vendor/plugins/file_column/test/file_column_test.rb +630 -0
- data/vendor/plugins/file_column/test/fixtures/entry.rb +32 -0
- data/vendor/plugins/file_column/test/fixtures/invalid-image.jpg +1 -0
- data/vendor/plugins/file_column/test/fixtures/kerb.jpg +0 -0
- data/vendor/plugins/file_column/test/fixtures/mysql.sql +25 -0
- data/vendor/plugins/file_column/test/fixtures/schema.rb +10 -0
- data/vendor/plugins/file_column/test/fixtures/skanthak.png +0 -0
- data/vendor/plugins/file_column/test/magick_test.rb +251 -0
- data/vendor/plugins/file_column/test/magick_view_only_test.rb +21 -0
- data/vendor/plugins/guid/README.TXT +19 -0
- data/vendor/plugins/guid/init.rb +23 -0
- data/vendor/plugins/guid/lib/usesguid.rb +37 -0
- data/vendor/plugins/guid/lib/uuid22.rb +43 -0
- data/vendor/plugins/guid/lib/uuidtools.rb +565 -0
- metadata +83 -15
- data/db/ROOT/CV.txt +0 -166
- data/lib/file_column.rb +0 -263
- data/lib/file_column_helper.rb +0 -45
- /data/{lib → vendor/plugins/file_column/lib}/rails_file_column.rb +0 -0
data/lib/file_column_helper.rb
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# This module contains helper methods for displaying and uploading files
|
|
2
|
-
# for attributes created by +FileColumn+'s +file_column+ method. It will be
|
|
3
|
-
# automatically included into ActionView::Base, thereby making this module's
|
|
4
|
-
# methods available in all your views.
|
|
5
|
-
module FileColumnHelper
|
|
6
|
-
|
|
7
|
-
# Use this helper to create an upload field for a file_column attribute. This will generate
|
|
8
|
-
# an additional hidden field to keep uploaded files during form-redisplays. For example,
|
|
9
|
-
# when called with
|
|
10
|
-
#
|
|
11
|
-
# <%= file_column_field("entry", "image") %>
|
|
12
|
-
#
|
|
13
|
-
# the following HTML will be generated (assuming the form is redisplayed and something has
|
|
14
|
-
# already been uploaded):
|
|
15
|
-
#
|
|
16
|
-
# <input type="hidden" name="entry[image_temp]" value="..." />
|
|
17
|
-
# <input type="file" name="entry[image]" />
|
|
18
|
-
#
|
|
19
|
-
# You can use the +option+ argument to pass additional options to the file-field tag.
|
|
20
|
-
def file_column_field(object, method, options={})
|
|
21
|
-
result = ActionView::Helpers::InstanceTag.new(object, method.to_s+"_temp", self).to_input_field_tag("hidden", {})
|
|
22
|
-
result << ActionView::Helpers::InstanceTag.new(object, method, self).to_input_field_tag("file", options)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
# Creates an URL where an uploaded file can be accessed. When called for an Entry object with
|
|
26
|
-
# id 42 like this
|
|
27
|
-
#
|
|
28
|
-
# <%= url_for_file_column("entry", "image")
|
|
29
|
-
#
|
|
30
|
-
# the follwoing URL will be produced, assuming the file "test.png" has been stored in
|
|
31
|
-
# the "image"-column:
|
|
32
|
-
#
|
|
33
|
-
# /entry/image/42/test.png
|
|
34
|
-
#
|
|
35
|
-
# This will produce a valid URL even for temporary uploaded files, e.g. files where the object
|
|
36
|
-
# they are belonging to has not been saved in the database yet.
|
|
37
|
-
def url_for_file_column(object_name, method)
|
|
38
|
-
object = instance_variable_get("@#{object_name.to_s}")
|
|
39
|
-
url = ""
|
|
40
|
-
url << @request.relative_url_root.to_s
|
|
41
|
-
url << object.send("#{method}_options")["base_url"]
|
|
42
|
-
url << "#{method}/"
|
|
43
|
-
url << object.send("#{method}_relative_path")
|
|
44
|
-
end
|
|
45
|
-
end
|
|
File without changes
|