Fixing elfinder + ckeditor + course and session loaders see #7006 + BT#7058
parent
14fb89e5b1
commit
08840adb8f
@ -1,34 +1,34 @@ |
||||
{{javascript}} |
||||
|
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
|
||||
{% if is_allowed_to_edit %} |
||||
<div class="btn-toolbar actions-bar" > |
||||
<div class="btn-group"> |
||||
<a href="{{root}}&action=listing" class="btn" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
<div class="btn-group edit new"> |
||||
{% for type in types %} |
||||
<a href="{{root}}&action=add&description_type={{type.id}}" class="btn "> |
||||
<img title="{{type.title}}" alt="{{type.title}}" src="{{type.icon|icon(32)}} "> |
||||
</a> |
||||
{% endfor %} |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
|
||||
{% if type.question %} |
||||
<div class="normal-message"> |
||||
<div> |
||||
<strong>{{'QuestionPlan'|get_lang}}</strong> |
||||
</div> |
||||
{{type.question}} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{{javascript}} |
||||
|
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
|
||||
{% if is_allowed_to_edit %} |
||||
<div class="btn-toolbar actions-bar" > |
||||
<div class="btn-group"> |
||||
<a href="{{root}}&action=listing" class="btn" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
<div class="btn-group edit new"> |
||||
{% for type in types %} |
||||
<a href="{{root}}&action=add&description_type={{type.id}}" class="btn "> |
||||
<img title="{{type.title}}" alt="{{type.title}}" src="{{type.icon|icon(32)}} "> |
||||
</a> |
||||
{% endfor %} |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
|
||||
{% if type.question %} |
||||
<div class="normal-message"> |
||||
<div> |
||||
<strong>{{'QuestionPlan'|get_lang}}</strong> |
||||
</div> |
||||
{{type.question}} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{{form.return_form()}} |
||||
@ -1,109 +1,109 @@ |
||||
{{javascript}} |
||||
|
||||
<script type="text/javascript"> |
||||
|
||||
{% if is_allowed_to_edit %} |
||||
var sec_token = '{{sec_token}}'; |
||||
{% endif %} |
||||
|
||||
|
||||
function delete_entry(name, btn){ |
||||
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){ |
||||
return false; |
||||
} |
||||
|
||||
var item = $('#'+name); |
||||
var id = item.attr('data-id'); |
||||
var c_id = item.attr('data-c_id'); |
||||
|
||||
var f = function(data){ |
||||
if(data.success){ |
||||
item.remove(); |
||||
} |
||||
message.update(data); |
||||
$(btn).removeClass("loading"); |
||||
}; |
||||
CourseDescription.del(c_id, id, f); |
||||
$(btn).addClass("loading"); |
||||
} |
||||
|
||||
function delete_all(){ |
||||
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){ |
||||
return false; |
||||
} |
||||
|
||||
var f = function(data){ |
||||
if(data.success){ |
||||
var item = $('.course_descriptions'); |
||||
item.remove(); |
||||
} |
||||
message.update(data); |
||||
}; |
||||
CourseDescription.delete_by_course({{c_id}}, {{session_id}}, f); |
||||
|
||||
} |
||||
|
||||
</script> |
||||
|
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
|
||||
{% if is_allowed_to_edit %} |
||||
<div class="btn-toolbar actions-bar" > |
||||
<div class="btn-group edit new"> |
||||
{% for type in types %} |
||||
<a href="{{root}}&action=add&description_type={{type.id}}" class="btn "> |
||||
<img title="{{type.title}}" alt="{{type.title}}" src="{{type.icon|icon(32)}} "> |
||||
</a> |
||||
{% endfor %} |
||||
</div> |
||||
<div class="btn-group edit"> |
||||
<a href="{{root}}&action=import_csv" class="btn import_csv" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-import-csv"></i> |
||||
</a> |
||||
<a href="{{root}}&action=export_csv" class="btn export_csv" title="{{'ExportAsCSV'|get_lang}}"> |
||||
<i class="size-32 icon-export-csv"></i> |
||||
</a> |
||||
<a href="javascript:void(0)" onclick="delete_all();return false;" class="btn delete_all" title="{{'DeleteAll'|get_lang}}"> |
||||
<i class="size-32 icon-delete-all"></i> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<ul style="list-style: none; margin-left:0;" class="course_descriptions"> |
||||
{% for description in descriptions %} |
||||
<li id="description_{{description.id}}" class="course_description" data-id="{{description.id}}" data-c_id="{{description.c_id}}" data-type="course_description"> |
||||
<div class="title sectiontitle"> |
||||
{% if is_allowed_to_edit %} |
||||
<div class="pull-right element-actions"> |
||||
{% if session_id == description.session_id %} |
||||
<a href="{{root}}&action=delete&id={{description.id}}" |
||||
onclick="delete_entry('description_{{description.id}}', this); return false;" |
||||
title="{{'Delete'|get_lang}}"> |
||||
<i class="size-22 icon-delete"></i> |
||||
</a> |
||||
|
||||
<a href="{{root}}&action=edit&id={{description.id}}" |
||||
title="{{'Edit'|get_lang}}"> |
||||
<i class="size-22 icon-edit"></i> |
||||
</a> |
||||
{% else %} |
||||
<img title="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
alt="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
src="{{'edit_na.png'|icon(22)}}" |
||||
style="vertical-align:middle;"> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<img title="{{description.type.title}}" alt="{{description.type.title}}" src="{{description.type.icon|icon(32)}}" class="icon"> |
||||
{{description.title}} |
||||
</div> |
||||
<div class="sectioncomment"> |
||||
{{description.content}} |
||||
</div> |
||||
</li> |
||||
{% endfor %} |
||||
{{javascript}} |
||||
|
||||
<script type="text/javascript"> |
||||
|
||||
{% if is_allowed_to_edit %} |
||||
var sec_token = '{{sec_token}}'; |
||||
{% endif %} |
||||
|
||||
|
||||
function delete_entry(name, btn){ |
||||
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){ |
||||
return false; |
||||
} |
||||
|
||||
var item = $('#'+name); |
||||
var id = item.attr('data-id'); |
||||
var c_id = item.attr('data-c_id'); |
||||
|
||||
var f = function(data){ |
||||
if(data.success){ |
||||
item.remove(); |
||||
} |
||||
message.update(data); |
||||
$(btn).removeClass("loading"); |
||||
}; |
||||
CourseDescription.del(c_id, id, f); |
||||
$(btn).addClass("loading"); |
||||
} |
||||
|
||||
function delete_all(){ |
||||
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){ |
||||
return false; |
||||
} |
||||
|
||||
var f = function(data){ |
||||
if(data.success){ |
||||
var item = $('.course_descriptions'); |
||||
item.remove(); |
||||
} |
||||
message.update(data); |
||||
}; |
||||
CourseDescription.delete_by_course({{c_id}}, {{session_id}}, f); |
||||
|
||||
} |
||||
|
||||
</script> |
||||
|
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
|
||||
{% if is_allowed_to_edit %} |
||||
<div class="btn-toolbar actions-bar" > |
||||
<div class="btn-group edit new"> |
||||
{% for type in types %} |
||||
<a href="{{root}}&action=add&description_type={{type.id}}" class="btn "> |
||||
<img title="{{type.title}}" alt="{{type.title}}" src="{{type.icon|icon(32)}} "> |
||||
</a> |
||||
{% endfor %} |
||||
</div> |
||||
<div class="btn-group edit"> |
||||
<a href="{{root}}&action=import_csv" class="btn import_csv" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-import-csv"></i> |
||||
</a> |
||||
<a href="{{root}}&action=export_csv" class="btn export_csv" title="{{'ExportAsCSV'|get_lang}}"> |
||||
<i class="size-32 icon-export-csv"></i> |
||||
</a> |
||||
<a href="javascript:void(0)" onclick="delete_all();return false;" class="btn delete_all" title="{{'DeleteAll'|get_lang}}"> |
||||
<i class="size-32 icon-delete-all"></i> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<ul style="list-style: none; margin-left:0;" class="course_descriptions"> |
||||
{% for description in descriptions %} |
||||
<li id="description_{{description.id}}" class="course_description" data-id="{{description.id}}" data-c_id="{{description.c_id}}" data-type="course_description"> |
||||
<div class="title sectiontitle"> |
||||
{% if is_allowed_to_edit %} |
||||
<div class="pull-right element-actions"> |
||||
{% if session_id == description.session_id %} |
||||
<a href="{{root}}&action=delete&id={{description.id}}" |
||||
onclick="delete_entry('description_{{description.id}}', this); return false;" |
||||
title="{{'Delete'|get_lang}}"> |
||||
<i class="size-22 icon-delete"></i> |
||||
</a> |
||||
|
||||
<a href="{{root}}&action=edit&id={{description.id}}" |
||||
title="{{'Edit'|get_lang}}"> |
||||
<i class="size-22 icon-edit"></i> |
||||
</a> |
||||
{% else %} |
||||
<img title="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
alt="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
src="{{'edit_na.png'|icon(22)}}" |
||||
style="vertical-align:middle;"> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<img title="{{description.type.title}}" alt="{{description.type.title}}" src="{{description.type.icon|icon(32)}}" class="icon"> |
||||
{{description.title}} |
||||
</div> |
||||
<div class="sectioncomment"> |
||||
{{description.content}} |
||||
</div> |
||||
</li> |
||||
{% endfor %} |
||||
</ul> |
||||
@ -1,15 +1,15 @@ |
||||
{{javascript}} |
||||
|
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
|
||||
<div class="btn-toolbar actions-bar" > |
||||
<div class="btn-group"> |
||||
<a href="{{root}}&action=listing" class="btn" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
|
||||
{{javascript}} |
||||
|
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
|
||||
<div class="btn-toolbar actions-bar" > |
||||
<div class="btn-group"> |
||||
<a href="{{root}}&action=listing" class="btn" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
|
||||
{{form.return_form()}} |
||||
@ -1,9 +1,9 @@ |
||||
{% include app.template_style ~ '/glossary/header.tpl' %} |
||||
|
||||
<div class="actions-bar btn-toolbar" > |
||||
<a href = "{{root}}&action=index" class="btn"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
|
||||
{% include app.template_style ~ '/glossary/header.tpl' %} |
||||
|
||||
<div class="actions-bar btn-toolbar" > |
||||
<a href = "{{root}}&action=index" class="btn"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
|
||||
{{form.return_form()}} |
||||
@ -1,7 +1,7 @@ |
||||
{{javascript}} |
||||
|
||||
<div id="messages"> |
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
{{javascript}} |
||||
|
||||
<div id="messages"> |
||||
{% for message in messages %} |
||||
{{ message }} |
||||
{% endfor %} |
||||
</div> |
||||
@ -1,39 +1,39 @@ |
||||
{% include app.template_style ~ '/glossary/header.tpl' %} |
||||
{% include app.template_style ~ '/glossary/javascript.tpl' %} |
||||
|
||||
<div class="btn-toolbar actions-bar" > |
||||
{% if is_allowed_to_edit %} |
||||
<div class="btn-group edit"> |
||||
<a href="{{root}}&action=add" class=" glossary btn" title="{{'Add'|get_lang}}"> |
||||
<i class="size-32 icon-new-glossary-term"></i> |
||||
</a> |
||||
<a href="{{root}}&action=import_csv" class="btn import_csv" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-import-csv"></i> |
||||
</a> |
||||
<a href="{{root}}&action=export_csv" class="btn export_csv" title="{{'ExportAsCSV'|get_lang}}"> |
||||
<i class="size-32 icon-export-csv"></i> |
||||
</a> |
||||
<a href="javascript:void(0)" onclick="ui.remove_by_course('entries', this);return false;" class="btn delete_all" title="{{'DeleteAll'|get_lang}}"> |
||||
<i class="size-32 icon-delete-all"></i> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
<div class="btn-group edit"> |
||||
{% if view == 'table' %} |
||||
<a href="{{root}}&view=list" class="btn" title="{{'ViewList'|get_lang}}"> |
||||
<i class="size-32 icon-view-text"></i> |
||||
</a> |
||||
{% else %} |
||||
<a href="{{root}}&view=table" class="btn" title="{{'ViewTable'|get_lang}}"> |
||||
<i class="size-32 icon-view-detailed"></i> |
||||
</a> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
{% if view == 'table' %} |
||||
{% include app.template_style ~ '/glossary/table.tpl' %} |
||||
{% else %} |
||||
{% include app.template_style ~ '/glossary/list.tpl' %} |
||||
{% endif %} |
||||
{% include app.template_style ~ '/glossary/header.tpl' %} |
||||
{% include app.template_style ~ '/glossary/javascript.tpl' %} |
||||
|
||||
<div class="btn-toolbar actions-bar" > |
||||
{% if is_allowed_to_edit %} |
||||
<div class="btn-group edit"> |
||||
<a href="{{root}}&action=add" class=" glossary btn" title="{{'Add'|get_lang}}"> |
||||
<i class="size-32 icon-new-glossary-term"></i> |
||||
</a> |
||||
<a href="{{root}}&action=import_csv" class="btn import_csv" title="{{'ImportCSV'|get_lang}}"> |
||||
<i class="size-32 icon-import-csv"></i> |
||||
</a> |
||||
<a href="{{root}}&action=export_csv" class="btn export_csv" title="{{'ExportAsCSV'|get_lang}}"> |
||||
<i class="size-32 icon-export-csv"></i> |
||||
</a> |
||||
<a href="javascript:void(0)" onclick="ui.remove_by_course('entries', this);return false;" class="btn delete_all" title="{{'DeleteAll'|get_lang}}"> |
||||
<i class="size-32 icon-delete-all"></i> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
<div class="btn-group edit"> |
||||
{% if view == 'table' %} |
||||
<a href="{{root}}&view=list" class="btn" title="{{'ViewList'|get_lang}}"> |
||||
<i class="size-32 icon-view-text"></i> |
||||
</a> |
||||
{% else %} |
||||
<a href="{{root}}&view=table" class="btn" title="{{'ViewTable'|get_lang}}"> |
||||
<i class="size-32 icon-view-detailed"></i> |
||||
</a> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
{% if view == 'table' %} |
||||
{% include app.template_style ~ '/glossary/table.tpl' %} |
||||
{% else %} |
||||
{% include app.template_style ~ '/glossary/list.tpl' %} |
||||
{% endif %} |
||||
@ -1,28 +1,28 @@ |
||||
<script type="text/javascript" src="{{www}}/main/glossary/resources/js/proxy.js"></script> |
||||
<script type="text/javascript" src="{{www}}/main/glossary/resources/js/ui.js"></script> |
||||
<script type="text/javascript" src="{{www}}/main/glossary/resources/js/jquery.dataTables.js"></script> |
||||
|
||||
<script type="text/javascript"> |
||||
|
||||
$(function() { |
||||
|
||||
ui.proxy = glossary; |
||||
|
||||
window.context = {}; |
||||
|
||||
context.sec_token = '{{sec_token}}'; |
||||
context.c_id = '{{c_id}}'; |
||||
context.session_id = '{{session_id}}'; |
||||
context.www = '{{www}}'; |
||||
context.ajax = '{{www}}/main/inc/ajax/glossary.ajax.php'; |
||||
|
||||
if(typeof(lang) == "undefined") |
||||
{ |
||||
window.lang = {}; |
||||
} |
||||
|
||||
lang.ConfirmYourChoice = "{{'ConfirmYourChoice'|get_lang}}"; |
||||
|
||||
}); |
||||
|
||||
<script type="text/javascript" src="{{www}}/main/glossary/resources/js/proxy.js"></script> |
||||
<script type="text/javascript" src="{{www}}/main/glossary/resources/js/ui.js"></script> |
||||
<script type="text/javascript" src="{{www}}/main/glossary/resources/js/jquery.dataTables.js"></script> |
||||
|
||||
<script type="text/javascript"> |
||||
|
||||
$(function() { |
||||
|
||||
ui.proxy = glossary; |
||||
|
||||
window.context = {}; |
||||
|
||||
context.sec_token = '{{sec_token}}'; |
||||
context.c_id = '{{c_id}}'; |
||||
context.session_id = '{{session_id}}'; |
||||
context.www = '{{www}}'; |
||||
context.ajax = '{{www}}/main/inc/ajax/glossary.ajax.php'; |
||||
|
||||
if(typeof(lang) == "undefined") |
||||
{ |
||||
window.lang = {}; |
||||
} |
||||
|
||||
lang.ConfirmYourChoice = "{{'ConfirmYourChoice'|get_lang}}"; |
||||
|
||||
}); |
||||
|
||||
</script> |
||||
@ -1,35 +1,35 @@ |
||||
|
||||
<ul id="entries" class="unstyled glossary entries" data-c_id="{{c_id}}" data-session_id="{{session_id}}" > |
||||
{% for item in items %} |
||||
<li id="glossary_{{item.id}}" class="glossary term" data-id="{{item.id}}" data-c_id="{{item.c_id}}" data-type="glossary"> |
||||
<div class="title sectiontitle"> |
||||
{% if is_allowed_to_edit %} |
||||
<div class="pull-right"> |
||||
{% if session_id == item.session_id %} |
||||
<a href="{{root}}&action=edit&id={{item.id}}" |
||||
title="{{'Edit'|get_lang}}"> |
||||
<i class="size-22 icon-edit"></i> |
||||
</a> |
||||
<a href="{{root}}&action=delete&id={{item.id}}" |
||||
onclick="ui.remove('glossary_{{item.id}}', this); return false;" |
||||
title="{{'Delete'|get_lang}}"> |
||||
<i class="size-22 icon-delete"></i> |
||||
</a> |
||||
|
||||
{% else %} |
||||
<img title="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
alt="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
src="{{'edit_na.png'|icon(22)}}" |
||||
style="vertical-align:middle;"> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{{item.name}} |
||||
</div> |
||||
<div class="sectioncomment"> |
||||
{{item.description}} |
||||
</div> |
||||
</li> |
||||
{% endfor %} |
||||
|
||||
<ul id="entries" class="unstyled glossary entries" data-c_id="{{c_id}}" data-session_id="{{session_id}}" > |
||||
{% for item in items %} |
||||
<li id="glossary_{{item.id}}" class="glossary term" data-id="{{item.id}}" data-c_id="{{item.c_id}}" data-type="glossary"> |
||||
<div class="title sectiontitle"> |
||||
{% if is_allowed_to_edit %} |
||||
<div class="pull-right"> |
||||
{% if session_id == item.session_id %} |
||||
<a href="{{root}}&action=edit&id={{item.id}}" |
||||
title="{{'Edit'|get_lang}}"> |
||||
<i class="size-22 icon-edit"></i> |
||||
</a> |
||||
<a href="{{root}}&action=delete&id={{item.id}}" |
||||
onclick="ui.remove('glossary_{{item.id}}', this); return false;" |
||||
title="{{'Delete'|get_lang}}"> |
||||
<i class="size-22 icon-delete"></i> |
||||
</a> |
||||
|
||||
{% else %} |
||||
<img title="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
alt="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
src="{{'edit_na.png'|icon(22)}}" |
||||
style="vertical-align:middle;"> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
{{item.name}} |
||||
</div> |
||||
<div class="sectioncomment"> |
||||
{{item.description}} |
||||
</div> |
||||
</li> |
||||
{% endfor %} |
||||
</ul> |
||||
@ -1,72 +1,72 @@ |
||||
<script type="text/javascript"> |
||||
|
||||
$(document).ready(function() { |
||||
$('#entries').dataTable( { |
||||
"oLanguage": { |
||||
"sLengthMenu": "_MENU_ " + "{{'DataTableLengthMenu'|get_lang}}", |
||||
"sZeroRecords": "{{'DataTableZeroRecords'|get_lang}}", |
||||
"sInfo": "{{'DataTableInfo'|get_lang}}", |
||||
"sInfoEmpty": "{{'DataTableInfoEmpty'|get_lang}}", |
||||
"sInfoFiltered": "{{'DataTableInfoFiltered'|get_lang}}", |
||||
"sSearch": "{{'DataTableSearch'|get_lang}}", |
||||
"oPaginate": { |
||||
"sPrevious": "", |
||||
"sNext": "" |
||||
} |
||||
} |
||||
}); |
||||
} ); |
||||
|
||||
</script> |
||||
|
||||
<table id="entries" class="data_table glossary entries" data-c_id="{{c_id}}" data-session_id="{{session_id}}" > |
||||
<thead> |
||||
<tr> |
||||
<th class="sorting"> |
||||
{{'TermName'|get_lang}} |
||||
</th> |
||||
<th class="sorting"> |
||||
{{'TermDefinition'|get_lang}} |
||||
</th> |
||||
{% if is_allowed_to_edit %} |
||||
<th> |
||||
{{'Actions'|get_lang}} |
||||
</th> |
||||
{% endif %} |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{% for item in items %} |
||||
<tr id="glossary_{{item.id}}" class="glossary term" data-id="{{item.id}}" data-c_id="{{item.c_id}}" data-type="glossary"> |
||||
<td class="title"> |
||||
{{item.name}} |
||||
</td> |
||||
<td class=""> |
||||
{{item.description}} |
||||
</td> |
||||
{% if is_allowed_to_edit %} |
||||
<td class="td_actions"> |
||||
{% if session_id == item.session_id %} |
||||
<a href="{{root}}&action=edit&id={{item.id}}" |
||||
title="{{'Edit'|get_lang}}"> |
||||
<i class="size-22 icon-edit"></i> |
||||
</a> |
||||
<a href="{{root}}&action=delete&id={{item.id}}" |
||||
onclick="ui.remove('glossary_{{item.id}}', this); return false;" |
||||
title="{{'Delete'|get_lang}}"> |
||||
<i class="size-22 icon-delete"></i> |
||||
</a> |
||||
{% else %} |
||||
<img title="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
alt="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
src="{{'edit_na.png'|icon(22)}}" |
||||
style="vertical-align:middle;"> |
||||
{% endif %} |
||||
</td> |
||||
{% endif %} |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
<div style="clear:both"></div> |
||||
|
||||
<script type="text/javascript"> |
||||
|
||||
$(document).ready(function() { |
||||
$('#entries').dataTable( { |
||||
"oLanguage": { |
||||
"sLengthMenu": "_MENU_ " + "{{'DataTableLengthMenu'|get_lang}}", |
||||
"sZeroRecords": "{{'DataTableZeroRecords'|get_lang}}", |
||||
"sInfo": "{{'DataTableInfo'|get_lang}}", |
||||
"sInfoEmpty": "{{'DataTableInfoEmpty'|get_lang}}", |
||||
"sInfoFiltered": "{{'DataTableInfoFiltered'|get_lang}}", |
||||
"sSearch": "{{'DataTableSearch'|get_lang}}", |
||||
"oPaginate": { |
||||
"sPrevious": "", |
||||
"sNext": "" |
||||
} |
||||
} |
||||
}); |
||||
} ); |
||||
|
||||
</script> |
||||
|
||||
<table id="entries" class="data_table glossary entries" data-c_id="{{c_id}}" data-session_id="{{session_id}}" > |
||||
<thead> |
||||
<tr> |
||||
<th class="sorting"> |
||||
{{'TermName'|get_lang}} |
||||
</th> |
||||
<th class="sorting"> |
||||
{{'TermDefinition'|get_lang}} |
||||
</th> |
||||
{% if is_allowed_to_edit %} |
||||
<th> |
||||
{{'Actions'|get_lang}} |
||||
</th> |
||||
{% endif %} |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{% for item in items %} |
||||
<tr id="glossary_{{item.id}}" class="glossary term" data-id="{{item.id}}" data-c_id="{{item.c_id}}" data-type="glossary"> |
||||
<td class="title"> |
||||
{{item.name}} |
||||
</td> |
||||
<td class=""> |
||||
{{item.description}} |
||||
</td> |
||||
{% if is_allowed_to_edit %} |
||||
<td class="td_actions"> |
||||
{% if session_id == item.session_id %} |
||||
<a href="{{root}}&action=edit&id={{item.id}}" |
||||
title="{{'Edit'|get_lang}}"> |
||||
<i class="size-22 icon-edit"></i> |
||||
</a> |
||||
<a href="{{root}}&action=delete&id={{item.id}}" |
||||
onclick="ui.remove('glossary_{{item.id}}', this); return false;" |
||||
title="{{'Delete'|get_lang}}"> |
||||
<i class="size-22 icon-delete"></i> |
||||
</a> |
||||
{% else %} |
||||
<img title="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
alt="{{'EditionNotAvailableFromSession'|get_lang}}" |
||||
src="{{'edit_na.png'|icon(22)}}" |
||||
style="vertical-align:middle;"> |
||||
{% endif %} |
||||
</td> |
||||
{% endif %} |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
<div style="clear:both"></div> |
||||
|
||||
@ -1,9 +1,9 @@ |
||||
{% include app.template_style ~ '/glossary/header.tpl' %} |
||||
|
||||
<div class="actions-bar btn-toolbar" > |
||||
<a href = "{{root}}&action=index" class="btn"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
|
||||
{% include app.template_style ~ '/glossary/header.tpl' %} |
||||
|
||||
<div class="actions-bar btn-toolbar" > |
||||
<a href = "{{root}}&action=index" class="btn"> |
||||
<i class="size-32 icon-back"></i> |
||||
</a> |
||||
</div> |
||||
|
||||
{{form.return_form()}} |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue