wontomedia 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +661 -0
- data/COPYING.DOCUMENTATION +450 -0
- data/LICENSE +661 -0
- data/README.markdown +56 -0
- data/Rakefile +185 -0
- data/VERSION.yml +4 -0
- data/app/controllers/admin_controller.rb +144 -0
- data/app/controllers/application_controller.rb +29 -0
- data/app/controllers/connections_controller.rb +150 -0
- data/app/controllers/items_controller.rb +365 -0
- data/app/helpers/connections_helper.rb +67 -0
- data/app/helpers/format_helper.rb +154 -0
- data/app/helpers/items_helper.rb +105 -0
- data/app/models/category_item.rb +23 -0
- data/app/models/connection.rb +210 -0
- data/app/models/individual_item.rb +23 -0
- data/app/models/item.rb +86 -0
- data/app/models/property_item.rb +23 -0
- data/app/models/qualified_item.rb +23 -0
- data/app/views/admin/index.html.erb +74 -0
- data/app/views/connections/_index_outbound_links.html.erb +48 -0
- data/app/views/connections/_spo_select_controls.html.erb +151 -0
- data/app/views/connections/edit.html.erb +70 -0
- data/app/views/connections/index.html.erb +84 -0
- data/app/views/connections/new.html.erb +61 -0
- data/app/views/connections/show.html.erb +110 -0
- data/app/views/items/_active_content.html.erb +26 -0
- data/app/views/items/_content_examples.html.erb +55 -0
- data/app/views/items/_core_tasks.html.erb +23 -0
- data/app/views/items/_form_fields.html.erb +69 -0
- data/app/views/items/_list_outbound_links.html.erb +58 -0
- data/app/views/items/_screen_select.html.erb +24 -0
- data/app/views/items/_show_outbound_links.html.erb +70 -0
- data/app/views/items/_topic_list.html.erb +26 -0
- data/app/views/items/_type_select.html.erb +47 -0
- data/app/views/items/edit.html.erb +63 -0
- data/app/views/items/index.html.erb +74 -0
- data/app/views/items/new.html.erb +124 -0
- data/app/views/items/newpop.html.erb +58 -0
- data/app/views/items/show.html.erb +209 -0
- data/app/views/layouts/_amazon_ads.html.erb +55 -0
- data/app/views/layouts/_glossary_help_box.html.erb +43 -0
- data/app/views/layouts/_google_ads.html.erb +40 -0
- data/app/views/layouts/_language_select.html.erb +24 -0
- data/app/views/layouts/_login_controls.html.erb +24 -0
- data/app/views/layouts/_master_help.html.erb +24 -0
- data/app/views/layouts/_navigation_menu.html.erb +39 -0
- data/app/views/layouts/_search_box.html.erb +27 -0
- data/app/views/layouts/_status_msgs.html.erb +25 -0
- data/app/views/layouts/application.html.erb +67 -0
- data/app/views/layouts/base.html.erb +93 -0
- data/app/views/layouts/home.html.erb +67 -0
- data/app/views/layouts/popup.html.erb +23 -0
- data/assets/wontomedia-sample.rb +47 -0
- data/config/asset_packages.yml +44 -0
- data/config/boot.rb +110 -0
- data/config/cucumber.yml +65 -0
- data/config/database-mysql-development.yml +47 -0
- data/config/database-mysql.yml +26 -0
- data/config/environment.rb +94 -0
- data/config/environments/cucumber.rb +29 -0
- data/config/environments/development.rb +26 -0
- data/config/environments/production.rb +33 -0
- data/config/environments/test.rb +31 -0
- data/config/initializers/inflections.rb +19 -0
- data/config/initializers/mime_types.rb +14 -0
- data/config/initializers/new_rails_defaults.rb +26 -0
- data/config/locales/en.yml +14 -0
- data/config/routes.rb +37 -0
- data/db/fixtures/connections.yml +96 -0
- data/db/fixtures/items.yml +277 -0
- data/db/migrate/20090312212805_create_items.rb +31 -0
- data/db/migrate/20090406221320_create_connections.rb +32 -0
- data/db/migrate/20090411014503_add_type_for_item_subclasses.rb +29 -0
- data/db/migrate/20090415142152_rename_item_type.rb +31 -0
- data/db/migrate/20090518022918_rename_object_and_self.rb +33 -0
- data/db/migrate/20090529171442_add_flags_to_items.rb +27 -0
- data/db/migrate/20090529171508_add_flags_to_connections.rb +27 -0
- data/db/migrate/20090605213800_flags_columns_not_null.rb +29 -0
- data/db/migrate/20090605215028_flags_columns_default_zero.rb +29 -0
- data/db/schema.rb +30 -0
- data/default-custom/app/views/items/_home_extern_list.html.erb +32 -0
- data/default-custom/app/views/items/_home_introductory_text.html.erb +70 -0
- data/default-custom/app/views/items/home.html.erb +77 -0
- data/default-custom/public/images/logo.png +0 -0
- data/default-custom/public/images/logo.svg +74 -0
- data/default-custom/public/stylesheets/wm.css +301 -0
- data/doc/README.markdown +44 -0
- data/doc/README_FOR_APP +82 -0
- data/doc/customization.markdown +93 -0
- data/doc/scripts/rake-customize.markdown +83 -0
- data/lib/helpers/connection_helper.rb +41 -0
- data/lib/helpers/item_helper.rb +141 -0
- data/lib/helpers/tripple_navigation.rb +158 -0
- data/lib/tasks/cucumber.rake +83 -0
- data/lib/tasks/customize.rake +70 -0
- data/lib/tasks/db.rake +65 -0
- data/lib/tasks/javascript_testing_tasks.rake +176 -0
- data/public/404.html +50 -0
- data/public/422.html +50 -0
- data/public/500.html +53 -0
- data/public/dispatch.cgi +20 -0
- data/public/dispatch.fcgi +34 -0
- data/public/dispatch.rb +20 -0
- data/public/favicon.ico +0 -0
- data/public/images/blank_error_icon.png +0 -0
- data/public/images/blank_status_icon.png +0 -0
- data/public/images/error_error_icon.png +0 -0
- data/public/images/error_status_icon.png +0 -0
- data/public/images/good_status_icon.png +0 -0
- data/public/images/help_icon.png +0 -0
- data/public/images/twitter_icon.png +0 -0
- data/public/images/warn_error_icon.png +0 -0
- data/public/images/working_status_icon.gif +0 -0
- data/public/javascripts/application.js +56 -0
- data/public/javascripts/controls.js +963 -0
- data/public/javascripts/dragdrop.js +973 -0
- data/public/javascripts/effects.js +1128 -0
- data/public/javascripts/event.simulate.js +64 -0
- data/public/javascripts/fancybox.js +43 -0
- data/public/javascripts/forConnectionsForms.js +218 -0
- data/public/javascripts/forItemsForms.js +511 -0
- data/public/javascripts/itemCreatePopup.js +115 -0
- data/public/javascripts/itemTitleToName.js +119 -0
- data/public/javascripts/jquery.js +4376 -0
- data/public/javascripts/modalbox.js +502 -0
- data/public/javascripts/prototype.js +4320 -0
- data/public/javascripts/reconcileJQueryAndPrototype.js +19 -0
- data/public/robots.txt +7 -0
- data/public/stylesheets/blank.gif +0 -0
- data/public/stylesheets/fancy_close.png +0 -0
- data/public/stylesheets/fancy_loading.png +0 -0
- data/public/stylesheets/fancy_nav_left.png +0 -0
- data/public/stylesheets/fancy_nav_right.png +0 -0
- data/public/stylesheets/fancy_shadow_e.png +0 -0
- data/public/stylesheets/fancy_shadow_n.png +0 -0
- data/public/stylesheets/fancy_shadow_ne.png +0 -0
- data/public/stylesheets/fancy_shadow_nw.png +0 -0
- data/public/stylesheets/fancy_shadow_s.png +0 -0
- data/public/stylesheets/fancy_shadow_se.png +0 -0
- data/public/stylesheets/fancy_shadow_sw.png +0 -0
- data/public/stylesheets/fancy_shadow_w.png +0 -0
- data/public/stylesheets/fancy_title_left.png +0 -0
- data/public/stylesheets/fancy_title_main.png +0 -0
- data/public/stylesheets/fancy_title_over.png +0 -0
- data/public/stylesheets/fancy_title_right.png +0 -0
- data/public/stylesheets/fancybox.css +333 -0
- data/public/stylesheets/modalbox.css +110 -0
- data/public/stylesheets/scaffold.css +36 -0
- data/public/stylesheets/spinner.gif +0 -0
- data/script/about +4 -0
- data/script/console +3 -0
- data/script/cucumber +10 -0
- data/script/dbconsole +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/performance/request +3 -0
- data/script/plugin +3 -0
- data/script/process/inspector +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/vendor/plugins/asset_packager/CHANGELOG +122 -0
- data/vendor/plugins/asset_packager/README +178 -0
- data/vendor/plugins/asset_packager/Rakefile +22 -0
- data/vendor/plugins/asset_packager/about.yml +8 -0
- data/vendor/plugins/asset_packager/init.rb +2 -0
- data/vendor/plugins/asset_packager/install.rb +1 -0
- data/vendor/plugins/asset_packager/lib/jsmin.rb +205 -0
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package.rb +212 -0
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package_helper.rb +39 -0
- data/vendor/plugins/asset_packager/tasks/asset_packager_tasks.rake +23 -0
- data/vendor/plugins/asset_packager/test/asset_package_helper_development_test.rb +100 -0
- data/vendor/plugins/asset_packager/test/asset_package_helper_production_test.rb +140 -0
- data/vendor/plugins/asset_packager/test/asset_packager_test.rb +92 -0
- data/vendor/plugins/asset_packager/test/asset_packages.yml +20 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/application.js +2 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/bar.js +4 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/controls.js +815 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/dragdrop.js +913 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/effects.js +958 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/foo.js +4 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/prototype.js +2006 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/bar.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/foo.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/header.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/screen.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/bar.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/foo.css +16 -0
- metadata +265 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
#--
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
|
21
|
+
# This model class is a child of Item using Rails' single-table inheritance.
|
22
|
+
class PropertyItem < Item
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#--
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see <http://www.gnu.org/licenses/>.
|
18
|
+
#++
|
19
|
+
|
20
|
+
|
21
|
+
# This model class is a child of Item using Rails' single-table inheritance.
|
22
|
+
class QualifiedItem < Item
|
23
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
|
21
|
+
<% content_for :head do %>
|
22
|
+
<meta name="robots" content="noindex" />
|
23
|
+
<meta name="googlebot" content="noindex" />
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<h1>Administration Options</h1>
|
27
|
+
|
28
|
+
<h2>Data Backup and Restore</h2>
|
29
|
+
|
30
|
+
<p><%=
|
31
|
+
link_to "Download all items in YAML",
|
32
|
+
:controller => 'items', :action => 'index', :format => 'yaml',
|
33
|
+
:rel => 'nofollow'
|
34
|
+
%>
|
35
|
+
|
36
|
+
to backup item data for future restore.
|
37
|
+
</p>
|
38
|
+
|
39
|
+
<p><%=
|
40
|
+
link_to "Download all connections in 'Notation 3' (aka N3) format",
|
41
|
+
:controller => 'connections', :action => 'index', :format => 'n3',
|
42
|
+
:rel => 'nofollow'
|
43
|
+
%>
|
44
|
+
|
45
|
+
to backup connection data for future restore.
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<% form_tag( { :action => 'item_up' }, :multipart => true ) do %>
|
49
|
+
<p><label for="item_upload">Upload a YAML file containing definitions
|
50
|
+
for new items</lable><br/>
|
51
|
+
|
52
|
+
<%= file_field 'item_upload', 'itemfile' %>
|
53
|
+
<%= submit_tag "Upload" %>
|
54
|
+
<br/>
|
55
|
+
|
56
|
+
Note: all items must be loaded into the system before uploading any
|
57
|
+
connection data that references them.
|
58
|
+
</p>
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
|
62
|
+
<% form_tag( { :action => 'connection_up' }, :multipart => true ) do %>
|
63
|
+
<p><label for="connection_upload">Upload an N3 file containing definitions
|
64
|
+
for new connections. (Connections are defined by creating URIs that
|
65
|
+
are bare anchors using the related item's "name" fields.) </lable><br/>
|
66
|
+
|
67
|
+
<%= file_field 'connection_upload', 'connectionfile' %>
|
68
|
+
<%= submit_tag 'Upload' %>
|
69
|
+
</p>
|
70
|
+
<% end %>
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
<% @have_displayed_out_links = false unless defined? @have_displayed_out_links
|
21
|
+
%>
|
22
|
+
|
23
|
+
<ul>
|
24
|
+
<li>
|
25
|
+
<%= link_to 'Create a new connection', new_connection_path,
|
26
|
+
:rel => 'nofollow' -%><%
|
27
|
+
unless @have_displayed_out_links %><%=
|
28
|
+
popup_help_icon "Help for connections create/new",
|
29
|
+
"Help:Popup/ConnectionAdd"
|
30
|
+
-%><% end %>
|
31
|
+
</li>
|
32
|
+
|
33
|
+
<li>
|
34
|
+
<%= link_to 'View all items', items_path -%><%
|
35
|
+
unless @have_displayed_out_links %><%=
|
36
|
+
popup_help_icon "Help for items list", "Help:Popup/ShowItems" -%><%
|
37
|
+
end %>
|
38
|
+
</li>
|
39
|
+
|
40
|
+
<li>
|
41
|
+
<%= link_to 'Create a new item', new_item_path, :rel => 'nofollow' -%><%
|
42
|
+
unless @have_displayed_out_links %><%=
|
43
|
+
popup_help_icon "Help for items create/new", "Help:Popup/ItemAdd" -%><%
|
44
|
+
end %>
|
45
|
+
</li>
|
46
|
+
</ul>
|
47
|
+
|
48
|
+
<% @have_displayed_out_links = true %>
|
@@ -0,0 +1,151 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
|
21
|
+
<script type="text/javascript">
|
22
|
+
function sizeDescDiv(name){
|
23
|
+
var h = document.viewport.getHeight() / 6;
|
24
|
+
$(name + "_desc").style.height = h + "px";
|
25
|
+
var w = $("connection_" + name + "_id").getWidth();
|
26
|
+
$(name + "_desc").style.width = w + "px";
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
<style>
|
30
|
+
div {
|
31
|
+
overflow: auto;
|
32
|
+
}
|
33
|
+
div.desc {
|
34
|
+
display: table-cell;
|
35
|
+
text-align: center;
|
36
|
+
vertical-align: middle;
|
37
|
+
}
|
38
|
+
div p {
|
39
|
+
margin-top: 0.5ex;
|
40
|
+
}
|
41
|
+
</style>
|
42
|
+
|
43
|
+
|
44
|
+
<p class="directions">
|
45
|
+
You must select an item for each of the
|
46
|
+
<span id="subject_required">subject</span>,
|
47
|
+
<span id="predicate_required">relationship</span>, and
|
48
|
+
<span id="obj_required">object</span>.
|
49
|
+
</p>
|
50
|
+
|
51
|
+
<table>
|
52
|
+
<tr><td style="text-align: right">
|
53
|
+
<%= f.label :subject_id %>
|
54
|
+
</td><td>
|
55
|
+
<%= select_tag "connection[subject_id]",
|
56
|
+
options_for_select(
|
57
|
+
[[ "- this object -", "" ],
|
58
|
+
[ "- create a new item for this object -", "-1" ],
|
59
|
+
] +
|
60
|
+
items.map do |n|
|
61
|
+
[ h("#{n.name} : #{n.title}"), n.id ]
|
62
|
+
end,
|
63
|
+
connection.subject.nil? ? "" : connection.subject.id
|
64
|
+
),
|
65
|
+
:tabindex=>'10', :style=>'width: 90%;'
|
66
|
+
%>
|
67
|
+
<script type="text/javascript">
|
68
|
+
$('connection_subject_id').focus();
|
69
|
+
</script>
|
70
|
+
<%= popup_help_icon "Help for connection's subject selection",
|
71
|
+
"Help:Popup/ConnectionSubject" %>
|
72
|
+
<%= image_tag "blank_error_icon.png", :id=>"subject_error_icon", :alt=>"",
|
73
|
+
:size=>"16x16" %>
|
74
|
+
|
75
|
+
<!-- start 'div' differently depending on 'if' -->
|
76
|
+
<% if connection.subject.nil? %>
|
77
|
+
<div id="subject_desc" class="desc">
|
78
|
+
<%= image_tag "blank_status_icon.png", :id=>"subject_status_icon",
|
79
|
+
:alt=>"", :size=>"32x16" %>
|
80
|
+
<% else %>
|
81
|
+
<div id="subject_desc" class="">
|
82
|
+
<p><%= h connection.subject.description %></p>
|
83
|
+
<% end %>
|
84
|
+
</div>
|
85
|
+
<script type="text/javascript">sizeDescDiv('subject');</script>
|
86
|
+
</td></tr>
|
87
|
+
<tr><td style="text-align: right">
|
88
|
+
<%= f.label :predicate_id,"Relates to" %>
|
89
|
+
</td><td>
|
90
|
+
<%= select_tag "connection[predicate_id]",
|
91
|
+
options_for_select(
|
92
|
+
[[ "- has this relationship -", "" ],
|
93
|
+
[ "- create a new property for this relationship -", "-1" ],
|
94
|
+
] +
|
95
|
+
verbs.map do |n|
|
96
|
+
[ h("#{n.name} : #{n.title}"), n.id ]
|
97
|
+
end,
|
98
|
+
connection.predicate.nil? ? "" : connection.predicate.id
|
99
|
+
),
|
100
|
+
:tabindex=>'20', :style=>'width: 90%;'
|
101
|
+
%>
|
102
|
+
<%= popup_help_icon "Help for connection's predicate selection",
|
103
|
+
"Help:Popup/ConnectionPredicate" %>
|
104
|
+
<%= image_tag "blank_error_icon.png", :id=>"predicate_error_icon", :alt=>"",
|
105
|
+
:size=>"16x16" %>
|
106
|
+
|
107
|
+
<!-- start 'div' differently depending on 'if' -->
|
108
|
+
<% if connection.predicate.nil? %>
|
109
|
+
<div id="predicate_desc" class="desc">
|
110
|
+
<%= image_tag "blank_status_icon.png", :id=>"predicate_status_icon",
|
111
|
+
:alt=>"", :size=>"32x16" %>
|
112
|
+
<% else %>
|
113
|
+
<div id="predicate_desc" class="">
|
114
|
+
<p><%= h connection.predicate.description %></p>
|
115
|
+
<% end %>
|
116
|
+
</div>
|
117
|
+
<script type="text/javascript">sizeDescDiv('predicate');</script>
|
118
|
+
</td></tr>
|
119
|
+
<tr><td style="text-align: right">
|
120
|
+
<%= f.label :obj_id, "Object" %>
|
121
|
+
</td><td>
|
122
|
+
<%= select_tag "connection[obj_id]",
|
123
|
+
options_for_select(
|
124
|
+
[[ "- to this object -", "" ],
|
125
|
+
[ "- create a new item for this object -", "-1" ],
|
126
|
+
] +
|
127
|
+
items.map do |n|
|
128
|
+
[ h("#{n.name} : #{n.title}"), n.id ]
|
129
|
+
end,
|
130
|
+
connection.obj.nil? ? "" : connection.obj.id
|
131
|
+
),
|
132
|
+
:tabindex=>'30', :style=>'width: 90%;'
|
133
|
+
%>
|
134
|
+
<%= popup_help_icon "Help for connection's object selection",
|
135
|
+
"Help:Popup/ConnectionObject" %>
|
136
|
+
<%= image_tag "blank_error_icon.png", :id=>"obj_error_icon", :alt=>"",
|
137
|
+
:size=>"16x16" %>
|
138
|
+
|
139
|
+
<!-- start 'div' differently depending on 'if' -->
|
140
|
+
<% if connection.obj.nil? %>
|
141
|
+
<div id="obj_desc" class="desc">
|
142
|
+
<%= image_tag "blank_status_icon.png", :id=>"obj_status_icon",
|
143
|
+
:alt=>"", :size=>"32x16" %>
|
144
|
+
<% else %>
|
145
|
+
<div id="obj_desc" class="">
|
146
|
+
<p><%= h connection.obj.description %></p>
|
147
|
+
<% end %>
|
148
|
+
</div>
|
149
|
+
<script type="text/javascript">sizeDescDiv('obj');</script>
|
150
|
+
</td></tr>
|
151
|
+
</table>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
|
21
|
+
<% content_for :head do %>
|
22
|
+
<meta name="robots" content="noindex" />
|
23
|
+
<meta name="googlebot" content="noindex" />
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<%
|
27
|
+
@title_text = (h @connection.subject.name) + " : " +
|
28
|
+
(h @connection.predicate.name) + " : " +
|
29
|
+
(h @connection.obj.name)
|
30
|
+
|
31
|
+
# initialize array to define "Glossary Help" box of links:
|
32
|
+
@glossary_help_entries = [
|
33
|
+
[ 'Item', 'Help:GlossaryAtoO#anchor_Item' ],
|
34
|
+
[ 'Connection', 'Help:GlossaryAtoO#anchor_Connection' ]
|
35
|
+
]
|
36
|
+
%>
|
37
|
+
|
38
|
+
|
39
|
+
<div class="headline">Editing connection<%=
|
40
|
+
popup_help_icon "Help connection edit", "Help:Popup/HeaderConnectionEdit" %>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
|
44
|
+
<% form_for(@connection) do |f| %>
|
45
|
+
<%= f.error_messages %>
|
46
|
+
<%= render :partial => "spo_select_controls",
|
47
|
+
:locals => {
|
48
|
+
:f => f, :connection => @connection,
|
49
|
+
:items => @items, :verbs => @verbs
|
50
|
+
} %>
|
51
|
+
<p><%= f.submit 'Update', :tabindex=>'40' %></p>
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
|
55
|
+
<div class="horizontal-link-list"><ul>
|
56
|
+
<li><%= link_to 'Cancel, show connection',
|
57
|
+
connection_path(@connection), :rel => 'nofollow' -%></li>
|
58
|
+
<li><%= link_to 'Cancel, show connection list',
|
59
|
+
connections_path, :rel => 'nofollow' -%></li>
|
60
|
+
<li><%= link_to 'Cancel, show item list', items_path,
|
61
|
+
:rel => 'nofollow' -%></li>
|
62
|
+
</ul></div>
|
63
|
+
|
64
|
+
<% content_for :first_bottom_page_js do %>
|
65
|
+
<script type="text/javascript">
|
66
|
+
inAConnectionsForm = true;
|
67
|
+
creatingNewConnection = false;
|
68
|
+
creatingNewItem = true;
|
69
|
+
</script>
|
70
|
+
<% end %>
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<%
|
2
|
+
# WontoMedia - a wontology web application
|
3
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
4
|
+
# www.wontology.com
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License version
|
8
|
+
# 3 as published by the Free Software Foundation.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful, but
|
11
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Affero General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License
|
16
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
17
|
+
# see "http://www.gnu.org/licenses/".
|
18
|
+
%>
|
19
|
+
|
20
|
+
|
21
|
+
<%
|
22
|
+
@title_text = 'All Connections'
|
23
|
+
|
24
|
+
# initialize array to define "Glossary Help" box of links:
|
25
|
+
@glossary_help_entries = [
|
26
|
+
[ 'Subject', 'Help:GlossaryPtoZ#anchor_Subject' ],
|
27
|
+
[ 'Predicate', 'Help:GlossaryPtoZ#anchor_Predicate' ],
|
28
|
+
[ 'Object', 'Help:GlossaryAtoO#anchor_Object' ],
|
29
|
+
[ 'Title', 'Help:GlossaryPtoZ#anchor_Title' ]
|
30
|
+
]
|
31
|
+
%>
|
32
|
+
|
33
|
+
|
34
|
+
<div class="headline">
|
35
|
+
<%= popup_help_icon "Help, connections list",
|
36
|
+
"Help:Popup/HeaderConnectionsIndex"
|
37
|
+
-%>Listing all defined connections
|
38
|
+
</div>
|
39
|
+
<div class="noncontent vertical-link-list"
|
40
|
+
style="float: left; margin-left: 2em;">
|
41
|
+
<%= render :partial => 'index_outbound_links' %>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<table class="tight-table index-table" style="clear: both;">
|
45
|
+
<% @show_help_icon_used = false
|
46
|
+
@edit_help_icon_used = false
|
47
|
+
@delete_help_icon_used = false
|
48
|
+
%>
|
49
|
+
|
50
|
+
<tr style="color: #b0b0ff;">
|
51
|
+
<th style="text-decoration: underline;">Subject</th>
|
52
|
+
<th style="text-decoration: underline;">Predicate</th>
|
53
|
+
<th style="text-decoration: underline;">Object</th>
|
54
|
+
</tr>
|
55
|
+
|
56
|
+
<% @connections.each do |connection| %>
|
57
|
+
<% content_tag :tr, :id => connection.id do %>
|
58
|
+
<td class='firstrow secondrow'><%=
|
59
|
+
link_with_tooltip "#{h filter_parenthetical connection.subject.title}",
|
60
|
+
h( connection.subject.name ), item_path(connection.subject) -%></td>
|
61
|
+
<td class='firstrow secondrow'><%=
|
62
|
+
link_with_tooltip(
|
63
|
+
"#{h filter_parenthetical connection.predicate.title}",
|
64
|
+
h( connection.predicate.name ), item_path(connection.predicate) )
|
65
|
+
-%></td>
|
66
|
+
<td class='firstrow secondrow'><%=
|
67
|
+
link_with_tooltip "#{h filter_parenthetical connection.obj.title}",
|
68
|
+
h( connection.obj.name ), item_path(connection.obj) -%></td>
|
69
|
+
<td class='firstrow secondrow' style="font-size: 80%">
|
70
|
+
<% generate_connection_links(connection) %></td>
|
71
|
+
<!--
|
72
|
+
<td><%= unless connection.connection_desc.nil?
|
73
|
+
link_to "#{h connection.connection_desc.name}",
|
74
|
+
item_path(connection.connection_desc)
|
75
|
+
end %></td>
|
76
|
+
-->
|
77
|
+
<% end %>
|
78
|
+
<% end %>
|
79
|
+
</table>
|
80
|
+
|
81
|
+
|
82
|
+
<div class="horizontal-link-list">
|
83
|
+
<%= render :partial => 'index_outbound_links' %>
|
84
|
+
</div>
|