2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or*/
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /****************************************************************/
\r
13 // $Id: index.tmpl.php 6614 2006-09-27 19:32:29Z greg $
\r
16 <form action="<?php echo $_SERVER['PHP_SELF']; ?>#search_results" method="post" name="form">
\r
17 <div class="input-form">
\r
19 <div style="padding:1em;">
\r
20 <?php echo _AT('tile_howto'); ?>
\r
22 <table width="100%">
\r
24 <td width="20%"><label for="words2"><?php echo _AT('keywords'); ?></label></td>
\r
25 <td><input type="text" name="keywords" size="100" id="words2" value="<?php echo $_REQUEST['keywords']; ?>" /></td>
\r
30 <label for="results_per_page"><?php echo _AT('merlot_results_per_page'); ?></label>
\r
31 <select name="results_per_page">
\r
32 <option value="5" <?php if ($_REQUEST["results_per_page"] == 5) echo 'selected="selected"' ?>>5</option>
\r
33 <option value="10" <?php if ($_REQUEST["results_per_page"] == 10) echo 'selected="selected"' ?>>10</option>
\r
34 <option value="15" <?php if ($_REQUEST["results_per_page"] == 15) echo 'selected="selected"' ?>>15</option>
\r
35 <option value="20" <?php if ($_REQUEST["results_per_page"] == 20) echo 'selected="selected"' ?>>20</option>
\r
36 <option value="25" <?php if ($_REQUEST["results_per_page"] == 25) echo 'selected="selected"' ?>>25</option>
\r
43 <div class="row buttons">
\r
44 <input type="submit" name="submit" value="<?php echo _AT('search'); ?>" />
\r
50 if (isset($this->result_list))
\r
52 if ($this->result_list['status'] == 'fail') // failed, display error
\r
54 echo ' <div id="search_results"><span style="color:red">'._AT('error').': <br /></div>';
\r
55 if (is_array($this->result_list['error']))
\r
57 foreach ($this->result_list['error'] as $error)
\r
58 echo $error."<br />";
\r
62 else // success, display results
\r
64 if (is_array($this->result_list))
\r
66 $num_results = $this->result_list["summary"]["numOfTotalResults"];
\r
67 $num_pages = max(ceil($num_results / $this->results_per_page), 1);
\r
69 echo ' <div id="search_results">';
\r
70 echo " <h2>". _AT('results')." <small>(".$this->startRecNumber. " - " .$this->result_list["summary"]["lastResultNumber"]." out of ".$num_results.")</small></h2>";
\r
72 print_paginator($page, $num_results, htmlspecialchars($this-> page_str), $this->results_per_page);
\r
74 foreach ($this->result_list as $key=>$result)
\r
80 <dl class="browse-result">
\r
81 <?php if (isset($this->instructor_role)) { ?>
\r
82 <dt class="tr_results_tools">
\r
83 <a href="<?php echo AT_TILE_EXPORT_CP_URL.$result['courseID']; ?>">
\r
84 <img src="<?php echo AT_BASE_HREF. 'images/download.png'?>" alt="<?php echo _AT('download_content_package'); ?>" title="<?php echo _AT("download_content_package").' '.$result['title']; ?>" border="0">
\r
86 <a href="mods/_standard/tile_search/import.php?tile_course_id=<?php echo $result['courseID']; ?>&title=<?php echo urlencode($result['title']); ?>">
\r
87 <img src="<?php echo AT_BASE_HREF. 'images/archive.gif'?>" alt="<?php echo _AT('import'); ?>" title="<?php echo _AT("import").' '.$result['title']; ?>" border="0">
\r
92 <h3 style="margin-left:-2.5em;">
\r
93 <a href="<?php echo AT_TILE_VIEW_COURSE_URL.$result['courseID']; ?>" target="_new" ><?php echo htmlspecialchars($result['title']); ?></a>
\r
96 <dt><?php echo _AT("author"); ?></dt>
\r
97 <dd><?php if ($result['authorName']=='') echo _AT('unknown'); else echo htmlspecialchars($result['authorName']); ?></dd>
\r
99 <dt><?php echo _AT("creation_date"); ?></dt>
\r
100 <dd><?php echo $result['creationDate']; ?></dd>
\r
102 <dt><?php echo _AT("description"); ?></dt>
\r
103 <dd><?php if ($result['description']=='') echo _AT('na'); else if (strlen($result['description']) > 120) echo substr(htmlspecialchars($result['description']), 0, 120). "..."; else echo htmlspecialchars($result['description']); ?></dd>
\r
105 <dt><?php echo _AT("creative_commons"); ?></dt>
\r
106 <dd><?php if ($result['creativeCommons'] == "true") echo _AT('yes'); else echo _AT('no'); ?></dd>
\r