-
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.
Improved properties and relations managment interfaces.
- Loading branch information
Showing
22 changed files
with
247 additions
and
81 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
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,12 +1,12 @@ | ||
<tr id='column<%= li[:id] %>'> | ||
<td class="adm_icon"><%= (li.new_record? || !li.errors.empty?) ? _('column_error_img') : link_to_remote( _('column_img'), | ||
<td class="adm_icon"><%= (li.new_record? || !li.errors.empty?) ? _('column_error_img') : link_to_remote(_("img_#{li.ptype}"), | ||
:update =>"column#{li[:id]}", | ||
:url => edit_column_path(li), | ||
:method => :get) %></td> | ||
<td class='ruby'> | ||
<span class='spacer'><%= (li.role.kind_of?(VirtualClass) ? '+ ' : '<span>* </span>') %></span> | ||
<span class='constant'><%= li.role.name %></span> | ||
<span class='text'>p.<%= li.ptype %></span> | ||
<span class='string'>'<%= li.name %>'<span><% if !li.index.blank? -%>, <span class='symbol'>:index</span> => <span class='symbol'>:<%= li.index_name %></span><% end -%> | ||
<td class='name'> | ||
<%= li.name %> | ||
</td> | ||
<td class='index'> | ||
<%= li.index_name %> | ||
</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,7 +1,16 @@ | ||
<h2 class='title'><%= _('properties') %></h2> | ||
|
||
<table id='column_list' class='admin' cellspacing="0"> | ||
<tr><th class='nav' colspan='7'><%= will_paginate @columns %></th></tr> | ||
<%= render :partial=>'columns/li', :collection=>@columns %> | ||
<tr><th class='nav' colspan='3'><%= will_paginate @columns %></th></tr> | ||
<% role = nil; @columns.each do |col| -%> | ||
<% if col.role != role; role = col.role -%> | ||
<tr> | ||
<th class='nav sub <%= role.class %>' colspan='3'> | ||
<span class='kpath'><%= role.kpath %></span> <%= role.name %> | ||
</th> | ||
</tr> | ||
<% end -%> | ||
<%= render :partial=>'columns/li', :collection=>[col] %> | ||
<% end -%> | ||
<%= render :partial=>'columns/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
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,14 +1,28 @@ | ||
<tr id='relation<%= li[:id] %><%= show_dir %>'> | ||
<td class="dark"><%= link_to_remote(_('edit'), | ||
<td class='adm_icon'><%= link_to_remote(_('img_relation'), | ||
:update =>"relation#{li[:id]}#{show_dir}", | ||
:url => edit_relation_path(li, :dir => show_dir), | ||
:method => :get) %></td> | ||
<td class="ruby relation" colspan='7'> | ||
<% 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> | ||
<td class='adm_icon'> | ||
<%= li.target_unique? ? _('img_has_one') : _('img_has_many') %> | ||
</td> | ||
<td class='name'> | ||
<%= li.target_role %> | ||
</td> | ||
<td class='other'> | ||
<%= VirtualClass.find_by_kpath(li.target_kpath).to_s %> | ||
</td> | ||
<% 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/> | ||
<td class='adm_icon'> | ||
<%= li.source_unique? ? _('img_has_one') : _('img_has_many') %> | ||
</td> | ||
<td class='name'> | ||
<%= li.source_role %> | ||
</td> | ||
<td class='other'> | ||
<%= VirtualClass.find_by_kpath(li.source_kpath).to_s %> | ||
</td> | ||
<% 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,8 +1,15 @@ | ||
<h2 class='title'><%= _('relations') %></h2> | ||
<table id='relation_list' class='admin' cellspacing="0"> | ||
<tr><th class='nav' colspan='9'><%= will_paginate @relations %></th></tr> | ||
<%= @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} %> | ||
<tr><th class='nav' colspan='4'><%= will_paginate @relations %></th></tr> | ||
<% @classes.keys.sort.each do |kpath| -%> | ||
<tr> | ||
<th class='nav sub VirtualClass' colspan='4'> | ||
<span class='kpath'><%= kpath %></span> <%= VirtualClass.find_by_kpath(kpath).to_s %> | ||
</th> | ||
</tr> | ||
<% @classes[kpath].each do |dir, rel| -%> | ||
<%= @show_dir = dir; render :partial=>'relations/li', :collection=>[rel] %> | ||
<% end -%> | ||
<% end -%> | ||
<%= 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
Binary file not shown.
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.
Binary file not shown.
Oops, something went wrong.