-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added link to rebuild_cache. Better relations listing.
- Loading branch information
Showing
32 changed files
with
682 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module RelationsHelper | ||
def show_dir | ||
@show_dir || params[:dir] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<tr id='relation<%= li[:id] %>'> | ||
<tr id='relation<%= li[:id] %><%= show_dir %>'> | ||
<td class="dark"><%= link_to_remote(_('edit'), | ||
:update =>"relation#{li[:id]}", | ||
:url => edit_relation_path(li), | ||
:update =>"relation#{li[:id]}#{show_dir}", | ||
:url => edit_relation_path(li, :dir => show_dir), | ||
:method => :get) %></td> | ||
<td class="ruby relation" colspan='7'> | ||
<span class='constant min_width'><%= VirtualClass.find_by_kpath(li.source_kpath) %></span> <span class='arity'><%= li.target_unique? ? _('has_one') : _('has_many') %></span> <span class='string'>'<%= li.target_role %>'</span>, <span class='symbol'>:class</span> => <span class='constant'><%= VirtualClass.find_by_kpath(li.target_kpath).to_s %></span><br/> | ||
<span class='constant min_width'><%= VirtualClass.find_by_kpath(li.target_kpath) %></span> <span class='arity'><%= li.source_unique? ? _('has_one') : _('has_many') %></span> <span class='string'>'<%= li.source_role %>'</span>, <span class='symbol'>:class</span> => <span class='constant'><%= VirtualClass.find_by_kpath(li.source_kpath).to_s %></span><br/> | ||
<% if show_dir == 'src' -%> | ||
<span class='constant min_width'> | ||
<%= VirtualClass.find_by_kpath(li.source_kpath) %></span> <span class='arity'><%= li.target_unique? ? _('has_one') : _('has_many') %></span> <span class='string'>'<%= li.target_role %>'</span>, <span class='symbol'>:class</span> => <span class='constant'><%= VirtualClass.find_by_kpath(li.target_kpath).to_s %></span> | ||
<% else -%> | ||
<span class='constant min_width'><%= VirtualClass.find_by_kpath(li.target_kpath) %></span> <span class='arity'><%= li.source_unique? ? _('has_one') : _('has_many') %></span> <span class='string'>'<%= li.source_role %>'</span>, <span class='symbol'>:class</span> => <span class='constant'><%= VirtualClass.find_by_kpath(li.source_kpath).to_s %></span><br/> | ||
<% end -%> | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<h2 class='title'><%= _('relations') %></h2> | ||
<table id='relation_list' class='admin' cellspacing="0"> | ||
<tr><th class='nav' colspan='9'><%= will_paginate @relations %></th></tr> | ||
<%= render :partial=>'relations/li', :collection=>@relations %> | ||
<%= @show_dir = 'src';render :partial=>'relations/li', :collection=>@relations %> | ||
<tr><th class='nav' colspan='9'><%= _('reverse relation') %></th></tr> | ||
<%= @show_dir = 'trg';render :partial=>'relations/li', :collection=>@relations.sort{|a,b| a.target_kpath <=> b.target_kpath} %> | ||
<%= render :partial=>'relations/add' %> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
page.replace "relation#{@relation[:id]}", :partial=>'relations/li', :collection=>[@relation] | ||
page.replace "relation#{@relation[:id]}#{show_dir}", :partial=>'relations/li', :collection=>[@relation] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
if @relation.errors.empty? | ||
page.replace "relation#{@relation[:id]}", :partial=>"relations/li", :collection=>[@relation] | ||
@show_dir = 'src' | ||
page.replace "relation#{@relation[:id]}src", :partial=>"relations/li", :collection=>[@relation] | ||
@show_dir = 'trg' | ||
page.replace "relation#{@relation[:id]}trg", :partial=>"relations/li", :collection=>[@relation] | ||
page.visual_effect :highlight, "relation#{@relation[:id]}src", :duration => 2.5 | ||
page.visual_effect :highlight, "relation#{@relation[:id]}trg", :duration => 2.5 | ||
else | ||
page.replace "relation#{@relation[:id]}", :partial=>"relations/form" | ||
page.replace "relation#{@relation[:id]}#{show_dir}", :partial=>"relations/form" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
page.replace_html "messages#{@site[:id]}", :inline => flash_messages | ||
page.visual_effect :highlight, "messages#{@site[:id]}", :duration => 1.5 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<% @node.schema.columns.each do |col_name, col| -%> | ||
<% next if %w{title text summary}.include?(col_name) || !@node.safe_method_type([col_name]) -%> | ||
<label for='<%= col_name %>'><%= _(col_name) %></label> | ||
<% @node.vclass.safe_columns.each do |col| -%> | ||
<label for='<%= col.name %>'><%= _(col.name) %></label> | ||
<% case col.ptype | ||
when :datetime %> | ||
<%= date_box(@node, col_name, :size=>15) %> | ||
<%= date_box(@node, col.name, :size=>15, :value => @node.prop[col.name]) %> | ||
<% else %> | ||
<%= text_area 'node', col_name, :cols => nil, :rows => 1, :value => @node.prop[col_name], :class => 'full_width' %> | ||
<%= text_area 'node', col.name, :cols => nil, :rows => 1, :value => @node.prop[col.name], :class => 'full_width' %> | ||
<% end %> | ||
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.