talia_core 0.4.22 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. data/VERSION.yml +2 -2
  2. data/config/database.yml +9 -9
  3. data/config/rdfstore.yml +4 -4
  4. data/config/talia_core.yml +5 -2
  5. data/generators/generator_helpers.rb +66 -25
  6. data/generators/talia_admin/talia_admin_generator.rb +9 -9
  7. data/generators/talia_admin/templates/app/controllers/admin/admin_site_controller.rb +5 -0
  8. data/generators/talia_admin/templates/app/controllers/admin/custom_templates_controller.rb +7 -0
  9. data/generators/talia_admin/templates/app/controllers/admin/front_controller.rb +19 -0
  10. data/generators/talia_admin/templates/app/controllers/admin/talia_collections_controller.rb +7 -0
  11. data/generators/talia_admin/templates/app/controllers/admin/talia_sources_controller.rb +17 -0
  12. data/generators/talia_admin/templates/app/controllers/admin/users_controller.rb +7 -0
  13. data/generators/talia_admin/templates/app/controllers/users_controller.rb +7 -0
  14. data/generators/talia_admin/templates/app/helpers/admin/front_helper.rb +2 -0
  15. data/generators/talia_admin/templates/app/helpers/admin/talia_sources_helper.rb +7 -0
  16. data/generators/talia_admin/templates/app/helpers/users_helper.rb +2 -0
  17. data/generators/talia_admin/templates/app/models/guest.rb +7 -0
  18. data/generators/talia_admin/templates/app/models/talia_collection.rb +56 -0
  19. data/generators/talia_admin/templates/app/models/talia_source.rb +43 -0
  20. data/generators/talia_admin/templates/app/models/user.rb +59 -0
  21. data/generators/talia_admin/templates/app/models/user_mailer.rb +14 -0
  22. data/generators/talia_admin/templates/app/viewhints/talia_source_hints.rb +3 -0
  23. data/generators/talia_admin/templates/app/views/admin/custom_templates/index.dryml +7 -0
  24. data/generators/talia_admin/templates/app/views/admin/front/index.dryml +29 -0
  25. data/generators/talia_admin/templates/app/views/admin/front/summary.dryml +103 -0
  26. data/generators/talia_admin/templates/app/views/admin/talia_collections/index.dryml +7 -0
  27. data/generators/talia_admin/templates/app/views/admin/talia_sources/index.dryml +17 -0
  28. data/generators/talia_admin/templates/app/views/admin/talia_sources/show.dryml +8 -0
  29. data/generators/talia_admin/templates/app/views/admin/users/index.dryml +7 -0
  30. data/generators/talia_admin/templates/app/views/taglibs/admin_site.dryml +91 -0
  31. data/generators/talia_admin/templates/app/views/taglibs/application.dryml +9 -0
  32. data/generators/talia_admin/templates/app/views/taglibs/auto/admin/rapid/cards.dryml +34 -0
  33. data/generators/talia_admin/templates/app/views/taglibs/auto/admin/rapid/forms.dryml +71 -0
  34. data/generators/talia_admin/templates/app/views/taglibs/auto/admin/rapid/pages.dryml +543 -0
  35. data/generators/talia_admin/templates/app/views/taglibs/auto/rapid/cards.dryml +37 -0
  36. data/generators/talia_admin/templates/app/views/taglibs/auto/rapid/forms.dryml +35 -0
  37. data/generators/talia_admin/templates/app/views/taglibs/auto/rapid/pages.dryml +175 -0
  38. data/generators/talia_admin/templates/app/views/taglibs/front_site.dryml +1 -0
  39. data/generators/talia_admin/templates/app/views/taglibs/themes/clean/clean.dryml +10 -0
  40. data/generators/talia_admin/templates/app/views/user_mailer/forgot_password.erb +10 -0
  41. data/generators/talia_admin/templates/config/hobo_initializer.rb +1 -0
  42. data/generators/talia_admin/templates/migrations/create_users.rb +22 -0
  43. data/generators/talia_admin/templates/public/hobothemes/clean/images/101-3B5F87-ACD3E6.png +0 -0
  44. data/generators/talia_admin/templates/public/hobothemes/clean/images/30-3E547A-242E42.png +0 -0
  45. data/generators/talia_admin/templates/public/hobothemes/clean/images/30-DBE1E5-FCFEF5.png +0 -0
  46. data/generators/talia_admin/templates/public/hobothemes/clean/images/300-ACD3E6-fff.png +0 -0
  47. data/generators/talia_admin/templates/public/hobothemes/clean/images/50-ACD3E6-fff.png +0 -0
  48. data/generators/talia_admin/templates/public/hobothemes/clean/images/fieldbg.gif +0 -0
  49. data/generators/talia_admin/templates/public/hobothemes/clean/images/pencil.png +0 -0
  50. data/generators/talia_admin/templates/public/hobothemes/clean/images/small_close.png +0 -0
  51. data/generators/talia_admin/templates/public/hobothemes/clean/images/spinner.gif +0 -0
  52. data/generators/talia_admin/templates/public/hobothemes/clean/stylesheets/clean.css +326 -0
  53. data/generators/talia_admin/templates/public/hobothemes/clean/stylesheets/rapid-ui.css +100 -0
  54. data/generators/talia_admin/templates/public/javascripts/IE7.js +2 -0
  55. data/generators/talia_admin/templates/public/javascripts/blank.gif +0 -0
  56. data/generators/talia_admin/templates/public/javascripts/dryml-support.js +132 -0
  57. data/generators/talia_admin/templates/public/javascripts/hobo-rapid.js +937 -0
  58. data/generators/talia_admin/templates/public/javascripts/ie7-recalc.js +166 -0
  59. data/generators/talia_admin/templates/public/javascripts/lowpro.js +43 -25
  60. data/generators/talia_admin/templates/public/stylesheets/application.css +0 -0
  61. data/generators/talia_admin/templates/public/stylesheets/hobo-rapid.css +94 -0
  62. data/generators/talia_admin/templates/public/stylesheets/reset.css +95 -0
  63. data/generators/talia_admin/templates/test/fixtures/users.yml +7 -0
  64. data/generators/talia_admin/templates/test/functional/admin/{custom_templates_controller_test.rb → front_controller_test.rb} +1 -1
  65. data/generators/talia_admin/templates/test/functional/users_controller_test.rb +8 -0
  66. data/generators/talia_admin/templates/test/unit/user_test.rb +8 -0
  67. data/generators/talia_base/talia_base_generator.rb +24 -17
  68. data/generators/talia_oai/USAGE +0 -0
  69. data/generators/talia_oai/talia_oai_generator.rb +19 -0
  70. data/generators/talia_oai/templates/oai_controller.rb +9 -0
  71. data/generators/talia_oai/templates/oai_initializer.rb +16 -0
  72. data/lib/custom_template.rb +24 -0
  73. data/lib/talia_core/active_source_parts/class_methods.rb +1 -1
  74. data/lib/talia_core/active_source_parts/finders.rb +4 -0
  75. data/lib/talia_core/collection.rb +4 -0
  76. data/lib/talia_core/oai/active_source_model.rb +113 -0
  77. data/lib/talia_core/oai/active_source_oai_adapter/class_methods.rb +17 -0
  78. data/lib/talia_core/oai/active_source_oai_adapter.rb +106 -0
  79. data/lib/talia_core/semantic_property.rb +1 -0
  80. data/lib/talia_core/semantic_relation.rb +1 -0
  81. data/test/talia_core/active_source_test.rb +13 -0
  82. metadata +71 -59
  83. data/generators/talia_admin/templates/controllers/admin/background_controller.rb +0 -52
  84. data/generators/talia_admin/templates/controllers/admin/custom_templates_controller.rb +0 -25
  85. data/generators/talia_admin/templates/controllers/admin/locales_controller.rb +0 -15
  86. data/generators/talia_admin/templates/controllers/admin/roles_controller.rb +0 -8
  87. data/generators/talia_admin/templates/controllers/admin/sources_controller.rb +0 -9
  88. data/generators/talia_admin/templates/controllers/admin/translations_controller.rb +0 -61
  89. data/generators/talia_admin/templates/controllers/admin/users_controller.rb +0 -10
  90. data/generators/talia_admin/templates/controllers/admin_controller.rb +0 -7
  91. data/generators/talia_admin/templates/helpers/admin/background_helper.rb +0 -60
  92. data/generators/talia_admin/templates/helpers/admin/custom_templates_helper.rb +0 -5
  93. data/generators/talia_admin/templates/helpers/admin/locales_helper.rb +0 -2
  94. data/generators/talia_admin/templates/helpers/admin/roles_helper.rb +0 -2
  95. data/generators/talia_admin/templates/helpers/admin/sources_helper.rb +0 -65
  96. data/generators/talia_admin/templates/helpers/admin/translations_helper.rb +0 -51
  97. data/generators/talia_admin/templates/helpers/admin/users_helper.rb +0 -11
  98. data/generators/talia_admin/templates/helpers/admin_helper.rb +0 -30
  99. data/generators/talia_admin/templates/migrations/populate_users.rb +0 -14
  100. data/generators/talia_admin/templates/models/role.rb +0 -3
  101. data/generators/talia_admin/templates/public/javascripts/backend.js +0 -24
  102. data/generators/talia_admin/templates/public/stylesheets/talia_core/backend.css +0 -463
  103. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/body_bg.gif +0 -0
  104. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/footer_bg.gif +0 -0
  105. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/header.jpg +0 -0
  106. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/header_bg.gif +0 -0
  107. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/menu.jpg +0 -0
  108. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/menu_bg.gif +0 -0
  109. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/opednid.gif +0 -0
  110. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/page_bg.jpg +0 -0
  111. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/triangolino.gif +0 -0
  112. data/generators/talia_admin/templates/public/stylesheets/talia_core/images/backend/triangolino_full.gif +0 -0
  113. data/generators/talia_admin/templates/test/functional/admin/locales_controller_test.rb +0 -35
  114. data/generators/talia_admin/templates/test/functional/admin/sources_controller_test.rb +0 -109
  115. data/generators/talia_admin/templates/test/functional/admin/translations_controller_test.rb +0 -93
  116. data/generators/talia_admin/templates/test/functional/admin/users_controller_test.rb +0 -67
  117. data/generators/talia_admin/templates/test/functional/admin_controller_test.rb +0 -15
  118. data/generators/talia_admin/templates/views/admin/background/_finished.html.erb +0 -9
  119. data/generators/talia_admin/templates/views/admin/background/_pending.html.erb +0 -1
  120. data/generators/talia_admin/templates/views/admin/background/_progress.html.erb +0 -15
  121. data/generators/talia_admin/templates/views/admin/background/_running.html.erb +0 -11
  122. data/generators/talia_admin/templates/views/admin/background/environment.html.erb +0 -12
  123. data/generators/talia_admin/templates/views/admin/background/show.html.erb +0 -17
  124. data/generators/talia_admin/templates/views/admin/background/stderr.html.erb +0 -6
  125. data/generators/talia_admin/templates/views/admin/background/stdin.html.erb +0 -6
  126. data/generators/talia_admin/templates/views/admin/background/stdout.html.erb +0 -6
  127. data/generators/talia_admin/templates/views/admin/custom_templates/_content_form_column.rhtml +0 -2
  128. data/generators/talia_admin/templates/views/admin/custom_templates/_template_type_form_column.rhtml +0 -2
  129. data/generators/talia_admin/templates/views/admin/index.html.erb +0 -5
  130. data/generators/talia_admin/templates/views/admin/locales/new.html.erb +0 -9
  131. data/generators/talia_admin/templates/views/admin/sources/_show.html.erb +0 -13
  132. data/generators/talia_admin/templates/views/admin/translations/_new_translation.html.erb +0 -7
  133. data/generators/talia_admin/templates/views/admin/translations/_translation.html.erb +0 -10
  134. data/generators/talia_admin/templates/views/admin/translations/edit.html.erb +0 -16
  135. data/generators/talia_admin/templates/views/layouts/admin.html.erb +0 -56
  136. data/generators/talia_base/templates/script/setup_talia_backend +0 -43
@@ -1,93 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../test_helper'
2
-
3
- class Admin::TranslationsControllerTest < ActionController::TestCase
4
- def test_should_redirect_to_active_locale_edit
5
- login_as :admin
6
- get :index
7
- assert_redirected_to edit_admin_translation_path(Locale.active.code)
8
- end
9
-
10
- def test_should_get_edit_page
11
- login_as :admin
12
- get :edit, :id => locale
13
- assert_response :success
14
- assert_layout :admin
15
-
16
- assert_select "#languages_picker", /^Pick a language:/
17
- assert_select "#languages_picker", /Add a translation/
18
- assert_select "#languages_picker", /Add locale/
19
- assert_select "#languages_picker" do
20
- assert_select "select"
21
- end
22
-
23
- assert_select 'form' do
24
- assert_select '[action=?]', "/admin/translations/#{locale}"
25
- assert_select 'input[type=?]', 'hidden'
26
- end
27
- end
28
-
29
- # TODO move this case in a integration test.
30
- def test_translations_autoload
31
- login_as :admin
32
- reference_locale = 'it-IT'
33
-
34
- # Case 1: visit /admin/translations
35
- get :index
36
- assert_redirected_to edit_admin_translation_path(Locale.active.code)
37
- assert_nil session[:reference_locale]
38
- assert_false assigns(:autoload)
39
-
40
- # Case 2: manually load reference translations
41
- get :search, { :locale => reference_locale, :key1 => "hello" }
42
- assert_response :success
43
- assert_equal reference_locale, session[:reference_locale]
44
-
45
- # Case 3: go to next page and get reference translations autoloaded
46
- get :edit, { :id => Locale.active.code, :page => 2 }
47
- assert_response :success
48
- assert_equal reference_locale, session[:reference_locale]
49
- assert assigns(:autoload)
50
- end
51
-
52
- def test_should_update_translations
53
- orig_magick = Locale.active.magick
54
- login_as :admin
55
- put :update, params
56
- # assert_flash_notice "Your translations has been saved"
57
- assert_redirected_to edit_admin_translation_path(locale)
58
- assert_equal(session[:glob_cache], Locale.active.magick)
59
- assert(Locale.active.magick && (Locale.active.magick != orig_magick))
60
- end
61
-
62
- uses_mocha 'Admin::TranslationsControllerTest' do
63
- def test_should_show_error_message_on_failing_update
64
- ViewTranslation.expects(:update).returns false
65
- login_as :admin
66
- put :update, params
67
- # assert_flash_error "There was some problems"
68
- assert_redirected_to edit_admin_translation_path(locale, {:page => 2})
69
- end
70
- end
71
-
72
- def test_should_destroy_translation
73
- login_as :admin
74
- delete :destroy, :id => 1, :locale => 'en-US', :page => "1"
75
- assert_raise(ActiveRecord::RecordNotFound) { ViewTranslation.find(1) }
76
- # assert_flash_notice "Your translation has been deleted"
77
- assert_redirected_to edit_admin_translation_path(locale)
78
- end
79
-
80
- private
81
- def locale
82
- 'en-US'
83
- end
84
-
85
- def translations
86
- [ { "id" => "1", "tr_key" => "hello", "text" => "Hello!" },
87
- { "id" => "", "tr_key" => "rabbit", "text" => "Rabbit" } ]
88
- end
89
-
90
- def params
91
- { "id" => locale, "page" => "2", "translations" => translations }
92
- end
93
- end
@@ -1,67 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../test_helper'
2
-
3
- class Admin::UsersControllerTest < ActionController::TestCase
4
- # TODO: DRY tests. Check why login_as :admin doesn't work if inside #setup.
5
-
6
- def test_should_get_index
7
- login_as :admin
8
-
9
- get :index
10
- assert_response :success
11
- assert_not_nil assigns(:users)
12
- end
13
-
14
- def test_should_get_new
15
- login_as :admin
16
-
17
- get :new
18
- assert_response :success
19
- end
20
-
21
- def test_should_create_user
22
- login_as :admin
23
-
24
- assert_difference('User.count') do
25
- post :create, :user => params
26
- end
27
-
28
- assert_redirected_to :action => "show", :id => assigns(:user)
29
- end
30
-
31
- def test_should_show_user
32
- login_as :admin
33
-
34
- get :show, :id => users(:quentin).id
35
- assert_response :success
36
- end
37
-
38
- def test_should_get_edit
39
- login_as :admin
40
-
41
- get :edit, :id => users(:quentin).id
42
- assert_response :success
43
- end
44
-
45
- def test_should_update_user
46
- login_as :admin
47
-
48
- put :update, :id => users(:someone).id, :user => params
49
- assert_redirected_to :action => "show", :id => assigns(:user)
50
- end
51
-
52
- def test_should_destroy_user
53
- login_as :admin
54
-
55
- assert_difference('User.count', -1) do
56
- delete :destroy, :id => Fixtures.identify(:someone)
57
- end
58
-
59
- assert_redirected_to :action => "index"
60
- end
61
-
62
- private
63
- def params
64
- { :login => 'luca', :email => 'luca@talia.org',
65
- :password => 'luca', :password_confirmation => 'luca' }
66
- end
67
- end
@@ -1,15 +0,0 @@
1
- require File.dirname(__FILE__) + '/../test_helper'
2
-
3
- class AdminControllerTest < ActionController::TestCase
4
- def test_should_redirect_to_login_when_not_loggedin
5
- get :index
6
- assert_redirected_to login_path
7
- end
8
-
9
- def test_should_get_index_when_loggedin_as_admin
10
- login_as :admin
11
-
12
- get :index
13
- assert_response :success
14
- end
15
- end
@@ -1,9 +0,0 @@
1
- <div class="background_box">
2
- <div class="background_item"><b>Started at:</b> <%= @job.started_at.strftime("%m/%d/%Y %H:%M:%S") %></div>
3
- <div class="background_item"><b>Finished at:</b> <%= @job.finished_at.strftime("%m/%d/%Y %H:%M:%S") %></div>
4
- <div class="background_item"><b>Ran for:</b> <%= job_duration %></div>
5
- <div class="background_item"><b>Exit Status:</b> <%= @job.exit_status %></div>
6
- </div>
7
-
8
- <div class="background_item"><%= stdout_link %></div>
9
- <div class="background_item"><%= stderr_link %></div>
@@ -1 +0,0 @@
1
- <div class="background_item"><b>Job is waiting to be executed, priority: <%= @job.priority %></p></div>
@@ -1,15 +0,0 @@
1
- <% if @progress_job%>
2
-
3
- <div class="background_progress" >
4
- <div class="background_progress_bar "style="width: <%= (@progress_job.percentage * 6) %>px;">
5
- <span class="background_progress_caption">
6
- <%= @progress_job.progress_message %>&nbsp;<%= @progress_job.percentage %>%&nbsp;(<%= progress_eta %>)
7
- </span>
8
- </div>
9
- </div>
10
-
11
- <% else %>
12
- <div class="background_item"><b>No progress information available.</b></div>
13
- <% end %>
14
-
15
- <div class="background_item"><b>Job is running since <%= @job.started_at.strftime("%m/%d/%Y %H:%M:%S") %> (<%= job_duration %>)</b></div>
@@ -1,11 +0,0 @@
1
- <% @progress_job = TaliaCore::BackgroundJobs::ProgressJob.find(:first, :conditions => { :job_id => @job.id }) %>
2
- <%= periodically_call_remote(:url => { :action => 'update_progress', :id => @job.id }, :frequency => '3', :update => 'back_progress') %>
3
-
4
- <div class="background_box" id="back_progress">
5
- <%= render :partial => 'progress' %>
6
- </div>
7
-
8
- <div class="background_box">
9
-
10
- <div class="background_item"><b>Process ID:</b> <%= @job.pid %></div>
11
- </div>
@@ -1,12 +0,0 @@
1
- <div class="backlink"><%= job_link %></div>
2
- <h2>Runtime Environment Variables:</h2>
3
- <table>
4
- <tr>
5
- <th>Variable</th><th>Value</th>
6
- </tr>
7
- <% @environment.each do |k,v| %>
8
- <tr style="background-color: <%= cycle('#E0E0E0', '#FFFFFF') %>;">
9
- <td><%= k %></td><td><%= v %></td>
10
- </tr>
11
- <% end %>
12
- </table>
@@ -1,17 +0,0 @@
1
- <div class="backlink"><%= link_to 'Job list', :action => 'index' %></div>
2
- <h2>Job <%= @job.id %><% job_tag %></h2>
3
-
4
- <div class="background_box">
5
- <div class="background_item"><b>Priority:</b> <%= @job.priority %></div>
6
- <div class="background_item"><b>Submitter:</b> <%= @job.submitter %></div>
7
- <div class="background_item"><b>Submitted at:</b> <%= @job.submitted_at.strftime("%m/%d/%Y %H:%M:%S") %></div>
8
- <% if @job.runner %>
9
- <div class="background_item"><b>Runner:</b> <%= @job.runner %></div>
10
- <% end %>
11
- <div class="background_item"><b>Command:</b> <%= @job.command %></div>
12
- </div>
13
-
14
- <%= render_job %>
15
-
16
- <div class="background_item"><%= environment_link %></div>
17
- <div class="background_item"><%= stdin_link %></div>
@@ -1,6 +0,0 @@
1
- <div class="backlink"><%= job_link %></div>
2
- <div class="output">
3
- <pre>
4
- <%= @job.stderr %>
5
- </pre>
6
- </div>
@@ -1,6 +0,0 @@
1
- <div class="backlink"><%= job_link %></div>
2
- <div class="output">
3
- <pre>
4
- <%= @job.stdin %>
5
- </pre>
6
- </div>
@@ -1,6 +0,0 @@
1
- <div class="backlink"><%= job_link %></div>
2
- <div class="output">
3
- <pre>
4
- <%= @job.stdout %>
5
- </pre>
6
- </div>
@@ -1,2 +0,0 @@
1
- <label>Content</label>
2
- <%= text_area :record, :content, :cols => 80, :rows => 50 %>
@@ -1,2 +0,0 @@
1
- <label>Type</label>
2
- <%= select :record, :template_type, ['xslt', 'css'] %>
@@ -1,5 +0,0 @@
1
- <% for admin_page in active_pages %>
2
- <div id="<%= admin_page %>_access" class="main_menu_box">
3
- <%= link_to h(admin_page.titleize), :controller => "admin/#{h(admin_page)}" %>
4
- </div>
5
- <% end %>
@@ -1,9 +0,0 @@
1
- <% form_tag :controller => 'admin/locales', :action => 'create' do -%>
2
- <p><label for="name">Name</label><br/>
3
- <%= text_field_tag 'name' %> <span class="small grey italic">(example: English)</span></p>
4
-
5
- <p><label for="code">Code</label><br/>
6
- <%= text_field_tag 'code' %> <span class="small grey italic">(example: en-US)</span></p>
7
-
8
- <p><%= submit_tag 'Create' %> or <%= link_to "back to the translations", admin_translations_path %></p>
9
- <% end %>
@@ -1,13 +0,0 @@
1
- <% @source = TaliaCore::ActiveSource.find(:first, :conditions => { :id => params[:id] }, :prefetch_relations => true) %>
2
-
3
- <h1><%= @source[N::DCNS.title].first || N::URI.new(@source).to_name_s %></h1>
4
- <% for pred in @source.direct_predicates %>
5
- <h2><%= N::URI.new(pred).to_name_s %></h2>
6
- <ul>
7
- <% for prop in @source[pred] %>
8
- <li>
9
- <%= prop.is_a?(TaliaCore::ActiveSource) ? link_to(N::URI.new(prop.uri).to_name_s, prop.uri.to_s) : prop.to_s %>
10
- </li>
11
- <% end %>
12
- </ul>
13
- <% end %>
@@ -1,7 +0,0 @@
1
- <tr class="translation">
2
- <td><%= text_field_tag "translations[][tr_key]", new_translation.tr_key, :size => 12 %></td>
3
- <td>
4
- <%= text_field_tag "translations[][text]", new_translation.text, :size => 48 %>
5
- <%= hidden_field_tag "translations[][id]", new_translation.id %>
6
- </td>
7
- </tr>
@@ -1,10 +0,0 @@
1
- <tr>
2
- <td>
3
- <%= label_tag "translations[][text]", translation.tr_key %>
4
- <%= hidden_field_tag "translations[][tr_key]", translation.tr_key %>
5
- </td>
6
- <td>
7
- <%= text_field_tag "translations[][text]", translation.text, :size => 48 %>
8
- <%= hidden_field_tag "translations[][id]", translation.id %>
9
- </td>
10
- </tr>
@@ -1,16 +0,0 @@
1
- <%= languages_picker %>
2
- <% autoload_reference_translations %>
3
- <%= javascript_include_tag 'translations' %>
4
- <% form_tag(admin_translation_path(@locale_code), :method => :put) do -%>
5
- <p style="margin-top: 2ex"><%= submit_tag %></p>
6
- <table id="translations" border="0" cellspacing="5" cellpadding="5">
7
- <tr><td></td><td></td></tr>
8
- <tr>
9
- <th>Key</th>
10
- <th>Translation</th>
11
- </tr>
12
- <%= render :partial => 'translation', :collection => @translations %>
13
- </table>
14
- <p><%= add_translation %></p>
15
- <p><%= submit_tag %></p>
16
- <% end -%>
@@ -1,56 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
-
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6
- <meta name="keywords" content="parole chiave" />
7
- <meta name="description" content="Descrizione" />
8
- <meta name="copyright" content="Copyright" />
9
- <meta name="robots" content="all" />
10
- <meta http-equiv="pragma" content="no-cache" />
11
- <%= stylesheet_link_tag('talia_core/backend') %>
12
- <%= javascript_include_tag('prototype') %>
13
- <%= javascript_include_tag('scriptaculous') %>
14
- <%= javascript_include_tag('lowpro') %>
15
- <%= javascript_include_tag('backend') %>
16
- <%= javascript_include_tag(:defaults) %>
17
- <%= active_scaffold_includes %>
18
- <%= yield :javascript %>
19
- <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
20
-
21
- <title><%= page_title %></title>
22
- </head>
23
-
24
- <body>
25
-
26
- <div id="paginaExt">
27
- <div id="paginaInt">
28
- <div id="testata">
29
- <h1>Discovery Project</h1>
30
- <p class="testata_sottotitolo">Backend Management</p>
31
- </div>
32
-
33
- <div id="menu">
34
- <ul>
35
- <li><%= link_to('Home', '/') %>
36
- <% for admin_page in active_pages %>
37
- <li><%= link_to(admin_page.titleize, :controller => "admin/#{admin_page}")%></li>
38
- <% end %>
39
- <li><%= link_to('Logout', :controller => 'sessions', :action => 'destroy') %></li>
40
- </ul>
41
- </div>
42
-
43
- <div id="contenuti">
44
-
45
- <div class="floatClear">
46
- </div>
47
-
48
- <!-- LOGIN -->
49
- <div id="contenutoInterno">
50
- <%= show_flash %>
51
- <%= yield %>
52
- </div>
53
- </div>
54
- </div>
55
- </div>
56
- </body>
@@ -1,43 +0,0 @@
1
- #!/bin/env ruby
2
-
3
- require File.dirname(__FILE__) + '/../config/boot'
4
- require "#{RAILS_ROOT}/config/environment"
5
- require 'rails_generator'
6
- require 'rails_generator/scripts/generate'
7
- # Load the monkeypatching for the migrations
8
- require "#{TALIA_CODE_ROOT}/generators/generator_helpers.rb"
9
-
10
- # First time plugin, has to be done this way since it can not be loaded in
11
- # a different way
12
- puts "Install and configure the restful authentication plugin"
13
- ARGV = ['install', 'git://github.com/technoweenie/restful-authentication.git']
14
- require 'commands/plugin'
15
- orig_name = $0
16
- $0 = 'generate'
17
- Rails::Generator::Scripts::Generate.new.run(%w(authenticated user sessions))
18
-
19
- puts "Install and configure role-requirements"
20
- Commands::Plugin.parse!(['install', 'git://github.com/timcharper/role_requirement.git'])
21
- Rails::Generator::Scripts::Generate.new.run(%w(roles Role User))
22
-
23
- if(Rails::VERSION::MAJOR > 2 ||(Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR > 2))
24
- # TODO: Needed only as long as ActiveScaffold depends on it
25
- puts "Install the render_component plugin for ActiveScaffold (optional since Rails 2.2)"
26
- Commands::Plugin.parse!(['install', 'git://github.com/lackac/render_component.git', '-r', 'rails-edge'])
27
- end
28
-
29
- puts "Install the auto completion plugin"
30
- Commands::Plugin.parse!(['install', 'auto_complete'])
31
-
32
- puts "Install the adminstration backend"
33
- Rails::Generator::Scripts::Generate.new.run(%w(talia_admin))
34
-
35
- # Add some dependencies that have been just installed
36
- ActiveSupport::Dependencies.load_paths << File.join(RAILS_ROOT, 'vendor', 'plugins', 'restful-authentication', 'lib')
37
- ActiveSupport::Dependencies.load_paths << File.join(RAILS_ROOT, 'vendor', 'plugins', 'role_requirement', 'lib')
38
-
39
- # Init the auth thing for the migration
40
- require File.join(RAILS_ROOT, "config", "initializers", "site_keys.rb")
41
-
42
- migration_path = File.join(RAILS_ROOT, 'db', 'migrate')
43
- ActiveRecord::Migrator.migrate(migration_path)