Diff
Modified: branches/neiss/app/controllers/relationships_controller.rb (2557 => 2558)
--- branches/neiss/app/controllers/relationships_controller.rb 2011-02-09 17:00:50 UTC (rev 2557)
+++ branches/neiss/app/controllers/relationships_controller.rb 2011-02-10 16:03:28 UTC (rev 2558)
@@ -44,7 +44,7 @@
raise("Invalid form data") if subject.nil? || objekt.nil? || label.nil?
- @relationship = Relationship.new(:pack => @context, :concept => label.concept)
+ @relationship = Relationship.new(:pack => @context, :concept => label.concept, :user => current_user)
@relationship.subject = subject
@relationship.objekt = objekt
Modified: branches/neiss/app/models/concept.rb (2557 => 2558)
--- branches/neiss/app/models/concept.rb 2011-02-09 17:00:50 UTC (rev 2557)
+++ branches/neiss/app/models/concept.rb 2011-02-10 16:03:28 UTC (rev 2558)
@@ -7,6 +7,8 @@
acts_as_structured_data
+ format_attribute :description
+
def preferred_label
preferred_labels.first
end
Modified: branches/neiss/config/schema.d/packs.xml (2557 => 2558)
--- branches/neiss/config/schema.d/packs.xml 2011-02-09 17:00:50 UTC (rev 2557)
+++ branches/neiss/config/schema.d/packs.xml 2011-02-10 16:03:28 UTC (rev 2558)
@@ -43,17 +43,20 @@
<table name="relationships">
- <column type="integer" name="pack_id"/>
- <column type="integer" name="concept_id"/>
- <column type="string" name="subject_type"/>
- <column type="integer" name="subject_id"/>
- <column type="string" name="objekt_type"/>
- <column type="integer" name="objekt_id"/>
+ <column type="integer" name="pack_id"/>
+ <column type="integer" name="user_id"/>
+ <column type="integer" name="concept_id"/>
+ <column type="string" name="subject_type"/>
+ <column type="integer" name="subject_id"/>
+ <column type="string" name="objekt_type"/>
+ <column type="integer" name="objekt_id"/>
+ <column type="datetime" name="created_at"/>
<belongs-to target="subjects" polymorphic="true"/>
<belongs-to target="objekts" polymorphic="true"/>
<belongs-to target="packs"/>
+ <belongs-to target="users"/>
<belongs-to target="concepts"/>
</table>
Modified: branches/neiss/config/schema.d/skos.xml (2557 => 2558)
--- branches/neiss/config/schema.d/skos.xml 2011-02-09 17:00:50 UTC (rev 2557)
+++ branches/neiss/config/schema.d/skos.xml 2011-02-10 16:03:28 UTC (rev 2558)
@@ -19,6 +19,7 @@
<table name="concepts">
<column type="integer" name="vocabulary_id"/>
+ <column type="string" name="title"/>
<column type="text" name="description"/>
<column type="text" name="description_html"/>
<column type="datetime" name="created_at"/>
Modified: branches/neiss/config/tables.xml
(Binary files differ)
Modified: branches/neiss/lib/load_vocabulary.rb (2557 => 2558)
--- branches/neiss/lib/load_vocabulary.rb 2011-02-09 17:00:50 UTC (rev 2557)
+++ branches/neiss/lib/load_vocabulary.rb 2011-02-10 16:03:28 UTC (rev 2558)
@@ -27,7 +27,9 @@
data["concepts"].each do |concept|
- c = Concept.create(:description => concept["description"])
+ c = Concept.create(
+ :title => concept["title"],
+ :description => concept["description"])
c.labels << Label.create(
:vocabulary => vocabulary,