Skip to content

Commit

Permalink
Including Tree view and improving compact view of the treeview
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmoSys BOT committed May 19, 2022
1 parent 57e50e0 commit 20eb922
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/views/cosmosys/menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<h2>CosmosysController#menu</h2>
<p>Actions:</p>
<p><%= link_to 'Directory', { :action => 'treeview'}, :method => :get %></p>
<p><%= link_to 'Tree', { :action => 'treeview'}, :method => :get %></p>
<p><%= link_to 'Directory', { :action => 'treeview', :includerpt => 'yes'}, :method => :get %></p>
<p><%= link_to 'MainReport', { :action => 'show'}, :method => :get %></p>
<p><%= link_to 'Exportable Report', { :action => 'show', :nochapters => 'yes'}, :method => :get %></p>

14 changes: 12 additions & 2 deletions app/views/cosmosys/treeview.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<%
if params[:includerpt]
show_rpt = true
else
show_rpt = false
end %>

<% content_for :header_tags do %>
<%= stylesheet_link_tag 'cosmosys', :plugin => 'cosmosys' %>
<%= stylesheet_link_tag 'treeview/index.9924afb6', :plugin => 'cosmosys' %>
<%= stylesheet_link_tag 'treeview/index.9924afb6', :plugin => 'cosmosys' %>
<% end %>

<% if show_rpt then %>
<table style="width: 100%; border-collapse: collapse;border-spacing:0px;">
<colgroup>
<col span="1" style="width: 30%;">
Expand All @@ -18,11 +26,12 @@
</th>
</tr>
<tr><td style="background-color:#eee;text-overflow: ellipsis;vertical-align: top;border: 2px solid black;padding: 0;margin: 0px;overflow: auto;">
<% end %>
<div id="app"></div>
<% if show_rpt then%>
</td><td>

<%

show_images = false

def calculate_heading(show_chapters,i)
Expand Down Expand Up @@ -209,6 +218,7 @@ end
</div>

</td></tr></tbody></table>
<% end %>
<script>thiskey="<%=@key%>"</script>
<script>treeviewpath="<%=@treeviewpath%>"</script>
<%= javascript_include_tag 'treeview/index.60fae44f', :plugin => 'cosmosys', :type => 'module' %>
2 changes: 1 addition & 1 deletion assets/javascripts/treeview/index.60fae44f.js
Original file line number Diff line number Diff line change
Expand Up @@ -8511,7 +8511,7 @@ var a1 = Qu((je, Be) => {
class: "node",
id: e.nodeId,
"data-node-type": e.node.nodetype,
style: Jn({ width: `${400 - e.deep * 8}px` }),
style: Jn({ width: `${`100%` - e.deep * 8}px` }),
},
[
e.isLeaf
Expand Down
10 changes: 10 additions & 0 deletions assets/stylesheets/treeview/index.9924afb6.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,18 @@
background-color: #0001;
}
.node .subtitle[data-v-3d096bee] {
margin-left: 26px;
white-space: break-spaces;
font-family: monospace;
}
.title .subtitle[data-v-3d096bee] {
margin-left: 26px;
white-space: nowrap;
display: inline-block; /* TODO: Find inline which really truncates */
font-weight:100;
overflow: hidden;
text-overflow: ellipsis;
max-inline-size:400px;
}
.node .children[data-v-3d096bee] {
margin-left: 8px;
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
permission :csys_hie_gv, :cosmosys => :hie_gv

menu :project_menu, :cosmosys_show, {:controller => 'cosmosys', :action => 'show' }, :caption => 'MainReport', :after => :activity, :param => :id
menu :project_menu, :cosmosys_treeview, {:controller => 'cosmosys', :action => 'treeview' }, :caption => 'Directory', :after => :activity, :param => :id
menu :project_menu, :cosmosys_treeview, {:controller => 'cosmosys', :action => 'treeview' }, :caption => 'Tree', :after => :activity, :param => :id
menu :project_menu, :cosmosys, {:controller => 'cosmosys', :action => 'menu' }, :caption => 'cosmoSys', :after => :activity, :param => :id
#menu :project_menu, :cosmosys_issues_index, {:controller => 'cosmosys_issues', :action => 'index' }, :caption => 'cSysIssues', :after => :issues, :param => :id

Expand Down

0 comments on commit 20eb922

Please sign in to comment.