Minor - format code

pull/2487/head
jmontoyaa 10 years ago
parent a13b5fc905
commit 0e992bfcbe
  1. 6
      main/template/default/auth/courses_list.php
  2. 2
      main/template/default/auth/lost_password.tpl
  3. 42
      main/template/default/course_description/index.tpl

@ -17,7 +17,8 @@ $courses_without_category = isset($courses_in_category[0]) ? $courses_in_categor
<!-- Actions: The menu with the different options in cathe course management -->
<div id="actions" class="actions">
<?php if ($action != 'createcoursecategory') { ?>
<a href="<?php echo api_get_self(); ?>?action=createcoursecategory"><?php echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'),'','32'); ?></a>
<a href="<?php echo api_get_self(); ?>?action=createcoursecategory">
<?php echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'),'','32'); ?></a>
<?php } ?>
</div>
@ -183,11 +184,9 @@ echo '<table class="data_table">';
if (!empty($courses_without_category)) {
$number_of_courses = count($courses_without_category);
$key = 0;
foreach ($courses_without_category as $course) {
echo '<tr>';
?>
<td>
<a name="course<?php echo $course['code']; ?>"></a>
<strong><?php echo $course['title']; ?></strong><br />
@ -198,7 +197,6 @@ if (!empty($courses_without_category)) {
?>
</td>
<td valign="top">
<!-- the edit icon OR the edit dropdown list -->
<?php if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) {
$edit_course = Security::remove_XSS($_GET['edit']);

@ -1,7 +1,5 @@
{% extends template ~ "/layout/layout_1_col.tpl" %}
{% block content %}
{{ form }}
{% endblock %}

@ -1,20 +1,18 @@
{{javascript}}
<script type="text/javascript">
<script>
{% if is_allowed_to_edit %}
var sec_token = '{{sec_token}}';
{% endif %}
function delete_entry(name, btn){
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 id = item.attr('data-id');
var c_id = item.attr('data-c_id');
var f = function(data){
if(data.success){
@ -25,13 +23,13 @@
};
CourseDescription.del(c_id, id, f);
$(btn).addClass("loading");
}
}
function delete_all(){
function delete_all(){
if(!confirm("{{'ConfirmYourChoice'|get_lang}}")){
return false;
}
}
var f = function(data){
if(data.success){
var item = $('.course_descriptions');
@ -40,9 +38,7 @@
message.update(data);
};
CourseDescription.delete_by_course({{c_id}}, {{session_id}}, f);
}
}
</script>
{% for message in messages %}
@ -50,12 +46,12 @@
{% endfor %}
{% if is_allowed_to_edit %}
<div class="btn-toolbar actions-bar" >
<div class="btn-toolbar actions-bar">
<div class="btn-group edit new">
{% for type in types %}
{% for type in types %}
<a href="{{root}}&amp;action=add&amp;description_type={{type.id}}" class="btn btn-default">
<img title="{{type.title}}" alt="{{type.title}}" src="{{type.icon|icon(32)}} " width="32" height="32">
</a>
</a>
{% endfor %}
</div>
<div class="btn-group edit">
@ -78,26 +74,26 @@
<div class="title sectiontitle">
{% if is_allowed_to_edit %}
<div class="pull-right element-actions">
{% if session_id == description.session_id %}
<a href="{{root}}&amp;action=delete&amp;id={{description.id}}"
{% if session_id == description.session_id %}
<a href="{{root}}&amp;action=delete&amp;id={{description.id}}"
onclick="delete_entry('description_{{description.id}}', this); return false;"
title="{{'Delete'|get_lang}}">
<em class="size-22 icon-delete"></em>
</a>
<a href="{{root}}&amp;action=edit&amp;id={{description.id}}"
<a href="{{root}}&amp;action=edit&amp;id={{description.id}}"
title="{{'Edit'|get_lang}}">
<em class="size-22 icon-edit"></em>
</a>
{% else %}
<img title="{{'EditionNotAvailableFromSession'|get_lang}}"
alt="{{'EditionNotAvailableFromSession'|get_lang}}"
<img title="{{'EditionNotAvailableFromSession'|get_lang}}"
alt="{{'EditionNotAvailableFromSession'|get_lang}}"
src="{{'edit_na.png'|icon(22)}}" width="22" height="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>

Loading…
Cancel
Save