$tool_content .= '<a class="item" href="page.php?course=' . $course_code . '&wikiId=' . $entry->id . '&action=show' . '">' . $entry->title . '</a>'; $tool_content .= '</td>' . "\n"; $tool_content .= '<td class="text-center">'; if (!empty($entry->description)) { $tool_content .= $entry->description; } else { $tool_content .= "<span class='not_visible'>$langWikiNoDescription</span>"; } $tool_content .= " </td> <td class='text-center'> <a href='page.php?course=$course_code&wikiId=$entry->id&action=all'> " . $wikiStore->getNumberOfPagesInWiki($entry->id) . " </a> </td>"; if ($is_editor) { $tool_content.= "<td class='option-btn-cell'>"; $tool_content .= action_button(array( array( 'title' => $langEditChange, 'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&gid=$groupId&wikiId=$entry->id&action=rqEdit", 'icon' => 'fa-edit'), array( 'title' => $langWikiRecentChanges, 'url' => "page.php?course=$course_code&wikiId=$entry->id &action=recent", 'icon' => "fa-clock-o"), array( 'title' => $langWikiExport,
} $out .= '<tbody>' . "\n"; // wiki list not empty if (count($wikiList) > 0) { foreach ($wikiList as $entry) { $out .= '<tr>' . "\n"; // display title for all users //modify style if the wiki is recently added or modified since last login if (claro_is_user_authenticated() && $claro_notifier->is_a_notified_ressource(claro_get_current_course_id(), $date, claro_get_current_user_id(), claro_get_current_group_id(), claro_get_current_tool_id(), $entry['id'])) { $classItem = " hot"; } else { $classItem = ""; } $out .= '<td style="text-align: left;">'; // display direct link to main page $out .= '<a class="item' . $classItem . '" href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=show')) . '">' . '<img src="' . get_icon_url('wiki') . '" alt="' . get_lang("Wiki") . '" /> ' . $entry['title'] . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=all')) . '">' . $wikiStore->getNumberOfPagesInWiki($entry['id']) . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">'; // display direct link to main page $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=recent')) . '">' . '<img src="' . get_icon_url('history') . '" alt="' . get_lang("Recent changes") . '" />' . '</a>' . '</td>' . "\n"; // if admin, display edit and delete links if ($groupId && claro_is_group_member() || $is_allowedToAdmin) { // edit link $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqEdit')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang("Edit properties") . '" />' . '</a>' . '</td>' . "\n"; // delete link $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqDelete')) . '">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang("Delete") . '" />' . '</a>' . '</td>' . "\n"; if (true === $is_allowedToAdmin) { $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=exExport')) . '">' . '<img src="' . get_icon_url('export') . '" alt="' . get_lang("Export") . '" />' . '</a>' . '</td>' . "\n"; } } $out .= '</tr>' . "\n"; if (!empty($entry['description'])) { $out .= '<tr>' . "\n";
$tool_content .= "\n <tr>\n <th class='text-left'>{$langTitle}</th>\n <th class='text-center'>{$langDescription}</th>\n <th class='text-center'>{$langPages}</th>\n <th class='text-center'>" . icon('fa-gears') . "</th>\n </tr>"; } else { $tool_content .= "\n <tr>\n <th class='text-left'>{$langTitle}</th>\n <th class='text-center'>{$langDescription}</th>\n <th class='text-center'>{$langWikiNumberOfPages}</th>\n <th class = 'text-center'>{$langWikiRecentChanges}</th>\n </tr>"; } $k = 0; foreach ($wikiList as $entry) { // display title for all users $tool_content .= '<tr><td>'; // display direct link to main page $tool_content .= '<a class="item" href="page.php?course=' . $course_code . '&wikiId=' . $entry->id . '&action=show' . '">' . $entry->title . '</a>'; $tool_content .= '</td>' . "\n"; $tool_content .= '<td>'; if (!empty($entry->description)) { $tool_content .= '' . $entry->description . ''; } $tool_content .= " </td>\n <td>\n <a href='page.php?course={$course_code}&wikiId={$entry->id}&action=all'>\n " . $wikiStore->getNumberOfPagesInWiki($entry->id) . "\n </a>\n </td>"; if ($is_editor) { $tool_content .= "<td class='option-btn-cell'>"; $tool_content .= action_button(array(array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&gid={$groupId}&wikiId={$entry->id}&action=exDelete", 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $langConfirmDelete), array('title' => $langModify, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&gid={$groupId}&wikiId={$entry->id}&action=rqEdit", 'icon' => 'fa-edit'), array('title' => $langWikiExport, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&gid={$groupId}&wikiId={$entry->id}&action=exExport", 'icon' => "fa-download"), array('title' => $langWikiRecentChanges, 'url' => "page.php?course={$course_code}&wikiId={$entry->id} &action=recent", 'icon' => "fa-clock-o"))); $tool_content .= "</td>"; } $tool_content .= '</tr>' . "\n"; $k++; } $tool_content .= '</table></div></div></div>' . "\n" . "\n"; } else { $tool_content .= '<div class="alert alert-warning">' . $langWikiNoWiki . '</div>' . "\n"; } break; default: trigger_error("Invalid action supplied to " . $_SERVER['SCRIPT_NAME'], E_USER_ERROR);