wontomedia 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,24 +16,17 @@
16
16
  # along with this program in the file COPYING and/or LICENSE. If not,
17
17
  # see "http://www.gnu.org/licenses/".
18
18
  %>
19
- <% if @display_unimplemented %>
20
19
 
21
20
  <div id="block-navigation" class="box">
22
- <span class="unimplemented">
23
21
  <ul style="margin: 0; margin-bottom: 0.6ex; padding: 0; padding-left: 1.5em;">
22
+ <li><%= link_to "Add Content",
23
+ site_content_url("Contributing") -%></li>
24
24
  <li><%= link_to "About this site",
25
- "#{WontoMedia.help_url_prefix}Help:About_Wontology.org" -%></li>
26
- <li><%= link_to "Contributing", "#" -%></li>
27
- <li><%= link_to "Contact Us", "#" -%></li>
28
- <li><%= link_to "Press Info", "#" -%></li>
29
- <li><%= link_to "WontoMedia Software",
30
- "#{WontoMedia.help_url_prefix}WontoMedia" -%></li>
31
- <li><a href="http://twitter.com/wontology">Follow
32
- Us</a><%= image_tag 'twitter_icon', :alt=>'twitter',
33
- :class=>'image-in-text' %>
34
- </li>
25
+ site_content_url("About") -%></li>
26
+ <%= yield %>
27
+ <li>
28
+ <span style="font-size: 60%">powered by</span>
29
+ <%= link_to "WontoMedia",
30
+ "#{WontoMedia.help_url_prefix}WontoMedia" -%></li>
35
31
  </ul>
36
- </span>
37
32
  </div>
38
-
39
- <% end %>
@@ -25,6 +25,9 @@ WontoMedia = OpenStruct.new({
25
25
  # change these if you use a local wiki, but will work to use public
26
26
  :help_url_prefix => "http://wiki.wontology.org/wiki/help.php?title=",
27
27
  :popup_url_prefix => "http://wiki.wontology.org/wiki/popup.php?title=",
28
+ :site_content_url_prefix =>
29
+ "http://wiki.wontology.org/wiki/help.php?title=Wontology:",
30
+ :site_content_url_postfix => '',
28
31
 
29
32
  :ads => OpenStruct.new({
30
33
  # :amazon => OpenStruct.new({
@@ -0,0 +1,24 @@
1
+ # WontoMedia - a wontology web application
2
+ # Copyright (C) 2010 - Glen E. Ivey
3
+ # www.wontology.com
4
+ #
5
+ # This program is free software: you can redistribute it and/or modify
6
+ # it under the terms of the GNU Affero General Public License version
7
+ # 3 as published by the Free Software Foundation.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU Affero General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU Affero General Public License
15
+ # along with this program in the file COPYING and/or LICENSE. If not,
16
+ # see <http://www.gnu.org/licenses/>.
17
+
18
+ directories_to_calculate: ---
19
+ - app
20
+ - lib
21
+
22
+ test_directories_to_calculate: ---
23
+ - test
24
+ - features
data/config/routes.rb CHANGED
@@ -17,21 +17,32 @@
17
17
 
18
18
 
19
19
  ActionController::Routing::Routes.draw do |map|
20
- map.admin_index '/admin', :controller => 'admin', :action => 'index'
21
- map.admin_item_up '/admin/item_up', :controller => 'admin',
22
- :action => 'item_up'
23
- map.admin_connection_up '/admin/connection_up', :controller => 'admin',
24
- :action => 'connection_up'
20
+ #### temporary: 301's for old-style REST URLs outside of the /w/ space
21
+ map.redirect '/items/*i', '/w/items', :keep_path => :i, :permanent => true
22
+ map.redirect '/connections/*c', '/w/connections', :keep_path => :c,
23
+ :permanent => true
25
24
 
26
- map.items_lookup '/items/lookup', :controller => :items, :action => :lookup
27
- map.itemCreatePopup '/items/new-pop',
28
- :controller => :items, :action => :newpop
29
- map.resources :items
25
+ # more specific routes that override...
26
+ map.items_lookup '/items/lookup', :controller => :items, :action => :lookup,
27
+ :path_prefix => '/w'
28
+ map.itemCreatePopup '/items/new-pop', :controller => :items,
29
+ :action => :newpop, :path_prefix => '/w'
30
30
 
31
- map.resources :connections
31
+ # .... these general routes
32
32
  map.root :controller => "items", :action => "home"
33
+ map.resources :items, :path_prefix => '/w'
34
+ map.resources :connections, :path_prefix => '/w'
35
+
36
+ # 'admin' isn't RESTful, so need named routes for all
37
+ map.admin_index '/w/admin', :controller => 'admin', :action => 'index'
38
+ map.admin_item_up '/w/admin/item_up', :controller => 'admin',
39
+ :action => 'item_up'
40
+ map.admin_connection_up '/w/admin/connection_up', :controller => 'admin',
41
+ :action => 'connection_up'
33
42
 
34
- # Install the default routes as the lowest priority.
35
- # map.connect ':controller/:action/:id'
36
- # map.connect ':controller/:action/:id.:format'
43
+ # pretty URLs for items (match against all the "/w/" paths first)
44
+ map.item_by_name '/:name', :controller => :items, :action => 'show',
45
+ :conditions => { :method => :get }
46
+ map.edit_item_by_name '/:name/edit', :controller => :items, :action => 'edit',
47
+ :conditions => { :method => :get }
37
48
  end
@@ -16,12 +16,108 @@
16
16
  # see <http://www.gnu.org/licenses/>.
17
17
 
18
18
 
19
+ define_Item_Class:
20
+ subject: Item_Class
21
+ predicate: sub_class_of
22
+ obj: Item_Class
23
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
24
+
25
+ define_Property_Item:
26
+ subject: Property_Item
27
+ predicate: sub_class_of
28
+ obj: Item_Class
29
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
30
+
31
+ define_Type_Item:
32
+ subject: Type_Item
33
+ predicate: sub_class_of
34
+ obj: Item_Class
35
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
36
+
37
+ define_String_Value:
38
+ subject: String_Value
39
+ predicate: sub_class_of
40
+ obj: Type_Item
41
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
42
+
43
+ define_Integer_Value:
44
+ subject: Integer_Value
45
+ predicate: sub_class_of
46
+ obj: Type_Item
47
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
48
+
49
+ define_Number_Value:
50
+ subject: Number_Value
51
+ predicate: sub_class_of
52
+ obj: Type_Item
53
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
54
+
55
+ define_Boolean_Value:
56
+ subject: Boolean_Value
57
+ predicate: sub_class_of
58
+ obj: Type_Item
59
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
60
+
61
+ define_Value_True:
62
+ subject: Value_True
63
+ predicate: is_instance_of
64
+ obj: Boolean_Value
65
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
66
+
67
+ define_Value_False:
68
+ subject: Value_False
69
+ predicate: is_instance_of
70
+ obj: Boolean_Value
71
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
72
+
73
+ define_URL_Value:
74
+ subject: URL_Value
75
+ predicate: sub_class_of
76
+ obj: String_Value
77
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
78
+
79
+ set_ordered_class:
80
+ subject: ordered_relationship
81
+ predicate: sub_class_of
82
+ obj: Property_Item
83
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
84
+
85
+ set_hierarchical_class:
86
+ subject: hierarchical_relationship
87
+ predicate: sub_class_of
88
+ obj: Property_Item
89
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
90
+
91
+ set_value_class:
92
+ subject: value_relationship
93
+ predicate: sub_class_of
94
+ obj: Property_Item
95
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
96
+
97
+ set_symmetric_class:
98
+ subject: symmetric_relationship
99
+ predicate: sub_class_of
100
+ obj: Property_Item
101
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
102
+
19
103
  define_sub_property_of:
20
104
  subject: sub_property_of
21
105
  predicate: sub_property_of
22
106
  obj: hierarchical_relationship
23
107
  flags: <%= Connection::DATA_IS_UNALTERABLE %>
24
108
 
109
+ define_sub_class_of:
110
+ subject: sub_class_of
111
+ predicate: sub_property_of
112
+ obj: hierarchical_relationship
113
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
114
+
115
+ define_is_instance_of:
116
+ subject: is_instance_of
117
+ predicate: sub_property_of
118
+ obj: hierarchical_relationship
119
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
120
+
25
121
  define_inverse_relationship:
26
122
  subject: inverse_relationship
27
123
  predicate: sub_property_of
@@ -52,6 +148,48 @@ define_child_to_parent_symmetry:
52
148
  obj: parent_of
53
149
  flags: <%= Connection::DATA_IS_UNALTERABLE %>
54
150
 
151
+ define_property_subject_is:
152
+ subject: property_subject_is
153
+ predicate: sub_property_of
154
+ obj: symmetric_relationship
155
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
156
+
157
+ define_property_object_is:
158
+ subject: property_object_is
159
+ predicate: sub_property_of
160
+ obj: symmetric_relationship
161
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
162
+
163
+ define_applies_to_class:
164
+ subject: applies_to_class
165
+ predicate: sub_property_of
166
+ obj: symmetric_relationship
167
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
168
+
169
+ define_has_scalar_object:
170
+ subject: has_scalar_object
171
+ predicate: sub_property_of
172
+ obj: value_relationship
173
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
174
+
175
+ define_has_item_object:
176
+ subject: has_item_object
177
+ predicate: sub_property_of
178
+ obj: value_relationship
179
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
180
+
181
+ define_max_uses_per_item:
182
+ subject: max_uses_per_item
183
+ predicate: sub_property_of
184
+ obj: value_relationship
185
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
186
+
187
+ mupi_is_scalar:
188
+ subject: max_uses_per_item
189
+ predicate: has_scalar_object
190
+ obj: Value_True
191
+ flags: <%= Connection::DATA_IS_UNALTERABLE %>
192
+
55
193
  define_peer_of:
56
194
  subject: peer_of
57
195
  predicate: sub_property_of