This repository was archived by the owner on Mar 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAP-ListComponentsAll.php
More file actions
88 lines (65 loc) · 3.25 KB
/
AP-ListComponentsAll.php
File metadata and controls
88 lines (65 loc) · 3.25 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php /* Template Name: AP-ListComponentsAll */ ?>
<? get_header(); ?>
<div id="main-content" class="main-content">
<?php
if (is_front_page() && twentyfourteen_has_featured_posts()) {
// Include the featured content template.
get_template_part('featured-content');
}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<article id="post-1" class="post-1 post type-post status-publish format-standard hentry category-uncategorized">
<header class="entry-header">
<h1 class="entry-title">All Components</h1>
<!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<!-- Displaying list ofall components -->
<?php
$query = new AirpressQuery();
$query->setConfig($GLOBALS['config_name']);
$query->table("Components")->view("All Components");
$query->sort("Component Name", "asc");
//$query->sort("ComponentName","asc");
$components = new AirpressCollection($query);
if (!is_airpress_empty($components)) {
// Set up dividers for groups
$New_Components = "<tr><td colspan=2 ><h3>New Components</h3><hr></td></tr>";
$Old_Components = "<tr><td colspan=2 ><h3>Old Components</h3><hr></td></tr>";
$num_components = count($components);
echo "<h2>" . $num_components . " Component(s)</h2>";
echo "<table>";
$components_display = "";
foreach ($components as $e) {
//description
$C_Description = $e["Component Description"];
//base type
$C_Base_Type = $e["Base Type"];
//links
$C_View_Link = $GLOBALS['components_base_folder'] . $e["Slug"] . "/";
$C_Record_ID = $e["Record ID"];
$C_Edit_Link = $GLOBALS['components_edit_link'] . $C_Record_ID . "?blocks=hide";
$C_Edit_Link = "<a href='" . $C_Edit_Link . "' target='new'>" . $GLOBALS['icon_edit'] . "</a>";
// Grouping by type
$temp_row = return_project_item_row($C_View_Link, $e["Component Name"], $C_Description);
if ($e["Deprecated"] == "False") {
$New_Components .= $temp_row;
} else {
$Old_Components .= $temp_row;
}
}
echo $New_Components;
echo $Old_Components;
echo "</table>";
}
?>
</div>
</article>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar('content'); ?>
</div><!-- #main-content -->
<?php
get_sidebar();
get_footer();