wontomedia 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +14 -7
- data/VERSION.yml +2 -2
- data/app/controllers/admin_controller.rb +5 -4
- data/app/controllers/items_controller.rb +128 -35
- data/app/helpers/connections_helper.rb +18 -0
- data/app/helpers/format_helper.rb +6 -0
- data/app/helpers/items_helper.rb +6 -6
- data/app/views/admin/index.html.erb +4 -3
- data/app/views/connections/index.html.erb +6 -3
- data/app/views/connections/show.html.erb +6 -4
- data/app/views/items/_content_examples.html.erb +2 -1
- data/app/views/items/_show_outbound_links.html.erb +1 -1
- data/app/views/items/edit.html.erb +1 -1
- data/app/views/items/index.html.erb +2 -1
- data/app/views/items/show.html.erb +24 -19
- data/app/views/layouts/_navigation_menu.html.erb +8 -15
- data/assets/wontomedia-sample.rb +3 -0
- data/config/caliper.yml +24 -0
- data/config/routes.rb +24 -13
- data/db/fixtures/connections.yml +138 -0
- data/db/fixtures/items.yml +348 -21
- data/default-custom/app/views/items/home.html.erb +2 -1
- data/default-custom/app/views/{items/_home_extern_list.html.erb → layouts/_local_navigation.html.erb} +12 -13
- data/lib/helpers/tripple_navigation.rb +23 -0
- data/public/javascripts/forConnectionsForms.js +1 -1
- data/public/javascripts/forItemsForms.js +2 -1
- data/public/javascripts/itemCreatePopup.js +1 -1
- data/public/robots.txt +5 -5
- metadata +6 -5
- /data/{public → default-custom/public}/favicon.ico +0 -0
@@ -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
|
-
"
|
26
|
-
|
27
|
-
<li
|
28
|
-
|
29
|
-
|
30
|
-
|
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 %>
|
data/assets/wontomedia-sample.rb
CHANGED
@@ -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({
|
data/config/caliper.yml
ADDED
@@ -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
|
-
|
21
|
-
map.
|
22
|
-
|
23
|
-
|
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
|
-
|
27
|
-
map.
|
28
|
-
:
|
29
|
-
map.
|
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
|
-
|
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
|
-
#
|
35
|
-
|
36
|
-
|
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
|
data/db/fixtures/connections.yml
CHANGED
@@ -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
|