_source_tree.rhtml
1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<% unless @content.errors[:base].nil? %>
<%= @content.errors[:base] %>
<% else %>
<h4><%= _('Source tree') %></h4>
<% module_name = @source_tree.module.name %>
<% module_label = "#{module_name} (#{@source_tree.module.granularity})" %>
<p><h2 class="path">
<% if module_name != @project_name %>
<a href="#" class="source-tree-link" data-module-name="<%= @project_name %>">
<%= @project_name %>
</a>
<% end %>
<% split_link = @source_tree.module.ancestor_names %>
<% split_link.each do |link| %>
/<a href="#" class="source-tree-link" data-module-name="<%= link %>">
<%= link.split(".").last %>
</a>
<% end %>
</h2></p>
<% if @source_tree.children %>
<table border="0" class="source-tree">
<% @source_tree.children.each do |child| %>
<% if child.module.granularity=='PACKAGE' %>
<tr>
<td class="icon"><%= image_tag('/plugins/mezuro/images/folder.png')%></td>
<td class="source-tree-text"><a href='#' class="source-tree-link" data-module-name="<%= child.module.name %>"><%= child.module.name %></a></td>
</tr>
<% else %>
<tr>
<td class="icon"><%= image_tag('/plugins/mezuro/images/file.png') %></td>
<td class="source-tree-text">
<a href='#' class="source-tree-link" data-module-name="<%= child.module.name %>">
<%= child.module.name %>
</a>
</td>
</tr>
<% end %>
<% end %>
</table>
<% end %>
<% end %>