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
@@ -0,0 +1,17 @@
1
+ <index-page>
2
+ <content: replace>
3
+ <sidebared-content>
4
+ <collection: replace>
5
+ <table-plus fields="this, uri, short_type">
6
+ <empty-message:>No sources match your criteria</empty-message:>
7
+ </table-plus>
8
+ </collection:>
9
+ <aside:>
10
+ <h2>Collections</h2>
11
+ <collection with="&all_collections">
12
+ <empty-message:>No collections found</empty-message>
13
+ </collection>
14
+ </aside:>
15
+ </sidebared-content>
16
+ </content:>
17
+ </index-page>
@@ -0,0 +1,8 @@
1
+ <show-page>
2
+ <content-body: replace>
3
+ <section class="content-body">
4
+ <field-list replace fields="name, uri, type" />
5
+ <properties />
6
+ </section>
7
+ </content-body:>
8
+ </show-page>
@@ -0,0 +1,7 @@
1
+ <index-page>
2
+ <collection: replace>
3
+ <table-plus fields="this, email_address, administrator, state">
4
+ <empty-message:>No users match your criteria</empty-message:>
5
+ </table-plus>
6
+ </collection:>
7
+ </index-page>
@@ -0,0 +1,91 @@
1
+ <!-- Tag definitions for the Admin subsite -->
2
+
3
+ <include src="rapid" plugin="hobo"/>
4
+
5
+ <include src="taglibs/auto/admin/rapid/cards"/>
6
+ <include src="taglibs/auto/admin/rapid/pages"/>
7
+ <include src="taglibs/auto/admin/rapid/forms"/>
8
+
9
+ <set-theme name="clean"/>
10
+
11
+ <def tag="app-name">Talia Admin Panel</def>
12
+
13
+ <def tag="prop-language">
14
+ <b>Language:</b> <this.lang if="lang" />
15
+ <else>n/a (default)</else>
16
+ </def>
17
+
18
+ <def tag="semlabel"><this.label if="respond_to?(:label)" /><else><do if="respond_to?(:uri)"><%= this.to_uri.to_name_s %></do><else><%= this.to_s %></else></else></def>
19
+
20
+ <def tag="prop-type">
21
+ <b>Type:</b> <this.type if="type" />
22
+ <else>n/a (String)</else>
23
+ </def>
24
+
25
+ <def tag="property-string-card">
26
+ <card>
27
+ <header:><h4>"<this/>"</h4></header:>
28
+ <body:>
29
+ <p><prop-type /> <prop-language /></p>
30
+ </body:>
31
+ </card>
32
+ </def>
33
+
34
+ <def tag="property-relation-card">
35
+ <card>
36
+ <header:>
37
+ <h4>
38
+ <wrap tag="a" href="&url_for(:controller => 'admin/talia_sources', :action => this.id)" when="is_a?(TaliaCore::ActiveSource)">
39
+ &lt;<semlabel />&gt;
40
+ </wrap>
41
+ </h4>
42
+ </header:>
43
+ <body:><p><%= this.uri.to_s %></p></body:>
44
+ </card>
45
+
46
+ </def>
47
+
48
+ <def tag="property-card">
49
+ <property-string-card if="is_a?(TaliaCore::PropertyString)" />
50
+ <else><property-relation-card /></else>
51
+ </def>
52
+
53
+ <def tag="properties">
54
+ <repeat: with="&@properties">
55
+ <h3><%= this_key.to_uri.to_name_s %></h3>
56
+ <property-card repeat param/>
57
+ </repeat:>
58
+ </def>
59
+
60
+ <def tag="sidebared-content">
61
+ <section-group>
62
+ <section param="main-content">
63
+ <header param="content-header">
64
+ <h2 param="heading">
65
+ <ht key="talia_sources.index.heading">
66
+ <%= model.name.titleize.pluralize %>
67
+ </ht>
68
+ </h2>
69
+
70
+ <p param="count" if>
71
+ <ht key="talia_sources.collection.count" count="&this.size">
72
+ There <count prefix="are"/>
73
+ </ht>
74
+ </p>
75
+ </header>
76
+
77
+ <section param="content-body">
78
+ <a action="new" to="&model" param="new-link">
79
+ <ht key="talia_sources.actions.new">New <%= model.name.titleize %></ht>
80
+ </a>
81
+
82
+ <page-nav param="top-page-nav"/>
83
+
84
+ <section>
85
+ <collection param />
86
+ </section>
87
+ </section>
88
+ </section>
89
+ <aside param />
90
+ </section-group>
91
+ </def>
@@ -0,0 +1,9 @@
1
+ <include src="rapid" plugin="hobo"/>
2
+
3
+ <include src="taglibs/auto/rapid/cards"/>
4
+ <include src="taglibs/auto/rapid/pages"/>
5
+ <include src="taglibs/auto/rapid/forms"/>
6
+
7
+ <set-theme name="clean"/>
8
+
9
+ <def tag="app-name">Talia</def>
@@ -0,0 +1,34 @@
1
+ <!-- AUTOMATICALLY GENERATED FILE - DO NOT EDIT -->
2
+
3
+ <def tag="card" for="CustomTemplate">
4
+ <card class="custom-template" param="default" merge>
5
+ <header: param>
6
+ <h4 param="heading"><a><name/></a></h4>
7
+ </header:>
8
+ </card>
9
+ </def>
10
+
11
+ <def tag="card" for="TaliaCollection">
12
+ <card class="talia-collection" param="default" merge>
13
+ <header: param>
14
+ <h4 param="heading"><a><name/></a></h4>
15
+ </header:>
16
+ </card>
17
+ </def>
18
+
19
+ <def tag="card" for="TaliaSource">
20
+ <card class="talia-source" param="default" merge>
21
+ <header: param>
22
+ <h4 param="heading"><a><name/></a></h4>
23
+ </header:>
24
+ </card>
25
+ </def>
26
+
27
+ <def tag="card" for="User">
28
+ <card class="user" param="default" merge>
29
+ <header: param>
30
+ <h4 param="heading"><a><name/></a></h4>
31
+ </header:>
32
+ </card>
33
+ </def>
34
+
@@ -0,0 +1,71 @@
1
+ <!-- AUTOMATICALLY GENERATED FILE - DO NOT EDIT -->
2
+
3
+ <def tag="form" for="CustomTemplate">
4
+ <form merge param="default">
5
+ <error-messages param/>
6
+ <field-list fields="name, template_type, content" param/>
7
+ <div param="actions">
8
+ <submit label="#{ht 'custom_templates.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
9
+ </div>
10
+ </form>
11
+ </def>
12
+
13
+
14
+
15
+ <def tag="form" for="TaliaCollection">
16
+ <form merge param="default">
17
+ <error-messages param/>
18
+ <field-list fields="uri" param/>
19
+ <div param="actions">
20
+ <submit label="#{ht 'talia_collections.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
21
+ </div>
22
+ </form>
23
+ </def>
24
+
25
+
26
+
27
+ <def tag="form" for="TaliaSource">
28
+ <form merge param="default">
29
+ <error-messages param/>
30
+ <field-list fields="uri, type" param/>
31
+ <div param="actions">
32
+ <submit label="#{ht 'talia_sources.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
33
+ </div>
34
+ </form>
35
+ </def>
36
+
37
+
38
+
39
+ <def tag="form" for="User">
40
+ <form merge param="default">
41
+ <error-messages param/>
42
+ <field-list fields="name, email_address, administrator, state" param/>
43
+ <div param="actions">
44
+ <submit label="#{ht 'users.actions.save', :default=>['Save']}" param/><or-cancel param="cancel"/>
45
+ </div>
46
+ </form>
47
+ </def>
48
+
49
+ <def tag="signup-form" polymorphic/>
50
+ <def tag="signup-form" for="User">
51
+ <form lifecycle="signup" merge param="default">
52
+ <error-messages param/>
53
+ <field-list fields="name, email_address, password, password_confirmation" param/>
54
+ <div param="actions">
55
+ <submit label="#{ht 'users.actions.signup', :default=>['Signup']}" param/><or-cancel param="cancel"/>
56
+ </div>
57
+ </form>
58
+ </def>
59
+
60
+ <def tag="reset-password-form" polymorphic/>
61
+ <def tag="reset-password-form" for="User">
62
+ <form lifecycle="reset_password" merge param="default">
63
+ <error-messages param/>
64
+ <input type="hidden" name="key" value="&this.lifecycle.provided_key" if="&this.lifecycle.provided_key"/>
65
+ <field-list fields="password, password_confirmation" param/>
66
+ <div param="actions">
67
+ <submit label="#{ht 'users.actions.reset_password', :default=>['Reset Password']}" param/><or-cancel param="cancel"/>
68
+ </div>
69
+ </form>
70
+ </def>
71
+