Skip to content

Commit 6a13c1b

Browse files
committed
Add links to mapping
1 parent 7a871f4 commit 6a13c1b

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

head.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ function getTable($dimensions) {
124124
foreach ( $element as $activityName => $content ) {
125125
$content = getContentForLevelFromSubdimensions ( $i, $content, $activityName );
126126
if ($content != "") {
127-
$elementLink = "detail.php?dimension=" . urlencode ( $dimension ) . "&subdimension=" . urlencode ( $subdimension ) . "&element=" . urlencode ( $activityName );
128-
$tableContent .= "<a href='$elementLink' data-dimension='$dimension' data-subdimension='$subdimension' data-element='$activityName'";
127+
$activityLink = "detail.php?dimension=" . urlencode ( $dimension ) . "&subdimension=" . urlencode ( $subdimension ) . "&element=" . urlencode ( $activityName );
128+
$tableContent .= "<a href='$activityLink' data-dimension='$dimension' data-subdimension='$subdimension' data-element='$activityName'";
129129
if (elementIsSelected ( $activityName )) {
130130
$tableContent .= "class='selected'";
131131
}

mappings.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<th scope="col">Subdimension</th>
5454
<th scope="col">Actvity</th>
5555
<th scope="col">SAMM 2</th>
56-
<th scope="col">ISO 27001</th>
56+
<th scope="col">ISO 27001 Controls</th>
5757
</tr>
5858
</thead>
5959
<tbody>
@@ -65,7 +65,8 @@
6565
echo "<td>$dimension</td>";
6666
echo "<td>$subdimension</td>";
6767
$tooltip = "<div class='popoverdetails'>" . build_table_tooltip ( $content ) . "</div>";
68-
echo "<td><div data-toggle=\"popover\" data-title=\"$activityName\" data-content=\"$tooltip\" type=\"button\" data-html=\"true \">" . $activityName . "</div></td>";
68+
$activityLink = "detail.php?dimension=" . urlencode ( $dimension ) . "&subdimension=" . urlencode ( $subdimension ) . "&element=" . urlencode ( $activityName );
69+
echo "<td><a href='$activityLink'><div data-toggle=\"popover\" data-title=\"$activityName\" data-content=\"$tooltip\" type=\"button\" data-html=\"true \">" . $activityName . "</div></a></td>";
6970
echo "<td>" . getFlattenedArray($content, "samm2") . "</td>";
7071
echo "<td>" . getFlattenedArray($content, "iso27001-2017") . "</td>";
7172
}
@@ -76,7 +77,13 @@
7677
<table class="table">
7778
<thead>
7879
<tr>
79-
<th scope="col"><?php echo $sort;?></th>
80+
<?php
81+
if($sort == "iso27001-2017") {
82+
echo '<th scope="col">ISO 27001 Control</th>';
83+
}else {
84+
echo '<th scope="col">' . $sort . '</th>';
85+
}
86+
?>
8087
<th scope="col">Dimension</th>
8188
<th scope="col">Subdimension</th>
8289
<th scope="col">Actvity</th>
@@ -103,7 +110,6 @@
103110
}
104111
}
105112
}
106-
//var_dump($mapping);exit;
107113
ksort($mapping);
108114

109115
foreach($mapping as $mappingName => $mappingElement) {
@@ -113,7 +119,8 @@
113119
echo "<td>" . $activity['dimension'] . "</td>";
114120
echo "<td>" . $activity['subdimension'] . "</td>";
115121
$tooltip = "<div class='popoverdetails'>" . build_table_tooltip ( $activity ) . "</div>";
116-
echo "<td><div data-toggle=\"popover\" data-title=\"$activityName\" data-content=\"$tooltip\" type=\"button\" data-html=\"true \">" . $activityName . "</div></td>";
122+
$activityLink = "detail.php?dimension=" . urlencode ( $activity['dimension'] ) . "&subdimension=" . urlencode ( $activity['subdimension'] ) . "&element=" . urlencode ( $activityName );
123+
echo "<td><a href='$activityLink'><div data-toggle=\"popover\" data-title=\"$activityName\" data-content=\"$tooltip\" type=\"button\" data-html=\"true \">" . $activityName . "</div></></td>";
117124
echo "<td>" . getFlattenedArray($activity, "samm2") . "</td>";
118125
echo "<td>" . getFlattenedArray($content, "iso27001-2017") . "</td>";
119126
}

0 commit comments

Comments
 (0)