Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce dependency list to be package link and arrow for walking up or down (with rkent changes) #427

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions _includes/package_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h3 class="panel-title">Wiki Tutorials</h3>

<div class="tab-pane" id="{{distro}}-deps">
<div class="row">
<div class="col-sm-5">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Package Dependencies</h3>
Expand All @@ -229,7 +229,6 @@ <h3 class="panel-title">Package Dependencies</h3>
<table class="table table-condensed table-striped">
<thead>
<th class="text-center">Deps</th>
<th class="text-center"><span class="glyphicon glyphicon-th" title="Package instances"></span></th>
<th style="width: 100%">Name</th>
</thead>
<tbody>
Expand All @@ -238,26 +237,16 @@ <h3 class="panel-title">Package Dependencies</h3>
{% if n_instances > 0 %}
<tr>
<td class="text-center">
{% assign n_2nd_order_pdeps = p[1].snapshots[distro].data.pkg_deps | size %}
{% assign n_2nd_order_sdeps = p[1].snapshots[distro].data.system_deps | size %}
{% assign n_2nd_order_deps = n_2nd_order_pdeps | plus: n_2nd_order_sdeps %}
<a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="inactive"{% endif %}>
{% assign n_2nd_order_deps = p[1].snapshots[distro].data.pkg_deps | size %}
<a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="endoftree"{% endif %}>
<span class="glyphicon glyphicon-arrow-left" title="Package dependencies"></span>
</a>
</td>
<td class="text-center">
<a href="{{site.baseurl}}/packages/{{p[0]}}" class="label label-{% if n_instances > 1 %}primary{% else %}default{% endif %}">
{{n_instances}}
</a>
</td>
<td><a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}">{{p[0]}}</a></td>
<td><a href="{{site.baseurl}}/p/{{p[0]}}#{{distro}}">{{p[0]}} {{n_2nd_order_pdeps}} {{n_2nd_order_sdeps}}</a></td>
</tr>
{% else %}
<tr>
<td class="text-center"></td>
<td class="text-center">
<span class="label label-danger">0</span>
</td>
<td>{{p[0]}}</td>
</tr>
{% endif %}
Expand Down Expand Up @@ -298,7 +287,7 @@ <h3 class="panel-title">System Dependencies</h3>
</div>
</div>

<div class="col-sm-7">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Dependant Packages</h3>
Expand All @@ -308,7 +297,6 @@ <h3 class="panel-title">Dependant Packages</h3>
<table class="table table-condensed table-striped">
<thead>
<th>Name</th>
<th>Repo</th>
<th class="text-center">Deps</th>
</thead>
<tbody>
Expand All @@ -317,10 +305,9 @@ <h3 class="panel-title">Dependant Packages</h3>
{% for dep_instance in d[1] %}
<tr>
<td><a href="{{site.baseurl}}/p/{{dep_name}}/{{dep_instance.id}}#{{distro}}">{{dep_name}}</a></td>
<td><a href="{{site.baseurl}}/r/{{dep_instance.repo.name}}/{{dep_instance.id}}">{{dep_instance.id}}</a></td>
<td class="text-center">
{% assign n_2nd_order_deps = dep_instance.package.data.dependants | size %}
<a href="{{site.baseurl}}/p/{{dep_name}}/{{dep_instance.id}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="inactive"{% endif %}>
<a href="{{site.baseurl}}/p/{{dep_name}}/{{dep_instance.id}}#{{distro}}-deps" {% if n_2nd_order_deps == 0 %}class="endoftree"{% endif %}>
<span class="glyphicon glyphicon-arrow-right"></span>
</a>
</td>
Expand Down
6 changes: 6 additions & 0 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ a.inactive {
text-decoration: none;
}

// Used in dependencies to denote no further 2nd order dependencies
a.endoftree {
color: #5e00c7;
text-decoration: none;
}

table.table a .glyphicon {
text-decoration: none;
}
Expand Down
Loading