Commit d63dc049 authored by Romain Therville's avatar Romain Therville
Browse files

Update to the admin scripts

This update was made to recover the redirection page id dynamically from
the typo3 template values.

Issue #146
parent c3e82abf
......@@ -510,6 +510,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</p>
</div>
<input type="hidden" id="tx_nG6_pi6_redirection_page" value="{$tx_nG6_pi6_redirection_page}"/>
<div class="tx-nG6-wait" id="all_project_wait">Please wait while processing ...</div>
<div class="alert alert-danger" id="all_project_error"></div>
<div id="all_project_list">
......
......@@ -99,9 +99,9 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$smarty->assign('ng6_superadmin_users', tx_nG6_db::get_ng6_superadmin_users() );
$smarty->assign('is_current_user_superadmin', tx_nG6_db::is_user_ng6_superadmin($GLOBALS['TSFE']->fe_user->user['uid']) );
$smarty->assign('available_space_ids', tx_nG6_utils::get_available_space_ids());
$smarty->assign('tx_nG6_pi6_redirection_page',$this->conf['redirection_page']);
$smarty->assign('ng6_purge_delay',$this->conf['delay_purge']);
return $smarty->fetch('administration_view.tpl');
}
......
......@@ -695,6 +695,7 @@ $(function () {
function refreshAllProjectDatatable(allproject_datatble){
$("#all_project_error").hide();
$("#all_project_wait").show();
tx_nG6_pi6_redirection_page = $("#tx_nG6_pi6_redirection_page").val();
$.ajax({
url: "index.php?eID=tx_nG6&type=get_all_project",
dataType: 'json',
......@@ -703,7 +704,7 @@ $(function () {
oTable.clear();
$.each(val, function(key,values){
var checkbox = '<center><input id="chk_allproject_"'+values["pid"]+'" type="checkbox" value="' + values["pid"] + '" class="chk_allproject"></center>' ;
var row=[checkbox, "<a href='index.php?id=55&tx_nG6_pi1[project_id]="+values["pid"]+"'>"+values["project_name"]+"</a>"];
var row=[checkbox, "<a href='index.php?id="+tx_nG6_pi6_redirection_page+"&tx_nG6_pi1[project_id]="+values["pid"]+"'>"+values["project_name"]+"</a>"];
oTable.row.add(row);
});
oTable.draw();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment