Mercurial > hg > extraction-interface
changeset 117:e6b516fa7b60 extractapp
1. add new columns : book year and edition year.
2. remove duplicate column : time.
author | Calvin Yeh <cyeh@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 28 Sep 2017 17:45:30 +0200 |
parents | 0ef426b5a1b9 |
children | 3bca624e4ac2 |
files | views/Extractapp/ExportTable.php |
diffstat | 1 files changed, 34 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/views/Extractapp/ExportTable.php Thu Sep 28 17:43:13 2017 +0200 +++ b/views/Extractapp/ExportTable.php Thu Sep 28 17:45:30 2017 +0200 @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License * along with Extraction-interface. If not, see <http://www.gnu.org/licenses/>. */ -/*! \file +/*! \file * This is the view for ExportTable. - * It shows a html table with each row as a topic object and each column as a tag/attribute. + * It shows a html table with each row as a topic object and each column as a tag/attribute. */ // --- initialize --- @@ -34,41 +34,53 @@ <html> <head> <title></title> +<?php include 'views/maintemplate.php'; ?> +<style> +td { + padding: 0px 5px; + white-space: nowrap; +} +</style> </head> <body> <table width="100%" border="1" id="tableMain"> - + <?php $count=1; foreach ( $outputTableArray as $trIndex =>$trValue ) { echo "<tr>"; if ( $trIndex==0 ) { - echo "<td>#</td>"; + echo "<td align='center'>#</td>"; echo "<td>Book ID</td>"; echo "<td>Section ID</td>"; echo "<td>方志</td>"; echo "<td>部</td>"; + echo "<td>Book Year</td>"; + echo "<td>Edition Year</td>"; echo "<td>方志地點</td>"; echo "<td>經度(x)</td>"; // longitude echo "<td>緯度(y)</td>"; // latitude echo "<td>Description</td>"; // description - + } else { - echo "<td>".$count++."</td>"; + echo "<td align='center'>".$count++."</td>"; echo "<td>".$bookId."</td>"; echo "<td>".$sectionid."</td>"; echo "<td>".$bookName."</td>"; echo "<td>".$sectionName."</td>"; + echo "<td>".$bookMeta->book_year."</td>"; + echo "<td>".$bookMeta->edition_year."</td>"; + echo "<td>".$sectionName."</td>"; echo "<td>".$bookMeta->place_name."</td>"; echo "<td>".$bookMeta->x."</td>"; echo "<td>".$bookMeta->y."</td>"; echo "<td>".$bookName."_".$sectionName."</td>"; // description for LGMap - + } if ( isset( $trValue["page"] ) ) { - echo "<td>".$trValue["page"]."</td>"; + echo "<td >".$trValue["page"]."</td>"; } else { echo "<td> </td>"; } @@ -82,24 +94,24 @@ } */ foreach ( $outputTableArray[0][0] as $index => $value ) { - if ( $index == "time" ) { + //if ( $index == "time" ) { + //if ( isset( $trValue[0][$index] ) ) { + // echo "<td>".$trValue[0][$index]."</td>"; + // echo "<td>".$trValue[0][$index]."</td>"; + //} else { + // echo "<td> </td>"; + // echo "<td> </td>"; + //} + //} else { if ( isset( $trValue[0][$index] ) ) { - echo "<td>".$trValue[0][$index]."</td>"; - echo "<td>".$trValue[0][$index]."</td>"; - } else { - echo "<td> </td>"; - echo "<td> </td>"; - } - } else { - if ( isset( $trValue[0][$index] ) ) { - echo "<td>".$trValue[0][$index]."</td>"; + echo "<td >".$trValue[0][$index]."</td>"; } else { echo "<td> </td>"; } - } + //} } - + /* remove other, full columns if ( isset( $trValue["other"] ) ) { echo "<td>".$trValue["other"]."</td>"; } else { @@ -110,7 +122,8 @@ } else { echo "<td> </td>"; } - + */ + echo "</tr>"; }