Merge pull request #825 from aragonc/bootstrap

Bootstrap
1.10.x
Julio 9 years ago
commit d3d07325dd
  1. 37
      app/Resources/public/css/base.css
  2. BIN
      main/img/icons/16/check-circle.png
  3. BIN
      main/img/icons/16/closed-circle.png
  4. BIN
      main/img/icons/22/check-circle.png
  5. BIN
      main/img/icons/22/closed-circle.png
  6. BIN
      main/img/icons/32/check-circle.png
  7. BIN
      main/img/icons/32/closed-circle.png
  8. 154
      main/img/icons/svg/check-circle.svg
  9. 114
      main/img/icons/svg/closed-circle.svg
  10. 6
      main/inc/ajax/model.ajax.php
  11. 50
      main/inc/lib/link.lib.php
  12. 16
      main/work/add_user.php
  13. 4
      main/work/work.lib.php
  14. 7
      main/work/work_list_all.php

@ -221,20 +221,40 @@ ul#navigation .report a {
#results .file_upload_highlight { #results .file_upload_highlight {
background: #F4D364; background: #F4D364;
} }
.file_upload{
position: relative;
}
.work_correction_file_upload .button-load { .work_correction_file_upload .button-load {
position: absolute; position: relative;
top: -60px;
left: -30px;
font-size: 10px; font-size: 10px;
width: 100px; font-weight: normal;
padding-top: 0px; width: 100%;
padding-top: 5px;
background: none; background: none;
} }
.file_upload_small{
line-height: 15px;
border: 1px solid #AFDDE9;
background: #D4E6F0;
width: 100%;
}
.work_correction_file_upload { .work_correction_file_upload {
height: 40px; height: 40px !important;
margin-bottom: 5px;
margin-top: 5px;
}
.file_upload input{
position: relative;
border: none;
}
#results .jqgrid_whitespace .date-time{
font-size: 12px;
color: #666666;
text-align: center;
}
.list-work-results{
margin-top: 20px;
} }
.impress-content{ .impress-content{
position: relative; position: relative;
width: 100%; width: 100%;
@ -2261,6 +2281,7 @@ div.admin_section h4 {
.ui-jqgrid tr.jqgrow td { .ui-jqgrid tr.jqgrow td {
height:38px !important; height:38px !important;
white-space: inherit;
} }
.exercise_overview_options { .exercise_overview_options {

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
viewBox="0 0 64.000001 64.000001"
id="svg4418"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="check-circle.svg">
<defs
id="defs4420">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4169"
id="linearGradient4175"
x1="221.45618"
y1="140.61165"
x2="227.5798"
y2="108.38836"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4169">
<stop
style="stop-color:#549200;stop-opacity:1"
offset="0"
id="stop4171" />
<stop
style="stop-color:#89b824;stop-opacity:0.99215686"
offset="1"
id="stop4173" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4153"
id="linearGradient4159"
x1="222.50554"
y1="141.53989"
x2="224.80658"
y2="109.184"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0464932,0,0,1.0464932,-10.500239,-5.8099907)" />
<linearGradient
inkscape:collect="always"
id="linearGradient4153">
<stop
style="stop-color:#a4cc3e;stop-opacity:1"
offset="0"
id="stop4155" />
<stop
style="stop-color:#e5fa96;stop-opacity:1"
offset="1"
id="stop4157" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4161"
id="linearGradient4167"
x1="222.9527"
y1="139.28558"
x2="228.4702"
y2="111.83612"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4161">
<stop
style="stop-color:#97d600;stop-opacity:1"
offset="0"
id="stop4163" />
<stop
style="stop-color:#98c400;stop-opacity:1"
offset="1"
id="stop4165" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.75"
inkscape:cx="32"
inkscape:cy="32"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="712"
inkscape:window-x="1920"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata4423">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-988.36216)">
<g
id="check-circle"
transform="matrix(1.7349701,0,0,1.7349701,-359.83268,803.55314)"
inkscape:label="#g4380"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45">
<circle
r="18.444122"
cy="124.96413"
cx="225.84406"
id="path4147"
style="opacity:1;fill:url(#linearGradient4175);fill-opacity:1;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<circle
r="17.232113"
style="opacity:1;fill:url(#linearGradient4159);fill-opacity:1;stroke:none;stroke-width:0.37318179;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4149"
cx="225.84406"
cy="124.96413" />
<circle
r="15.488939"
cy="124.96413"
cx="225.84406"
id="circle4151"
style="opacity:1;fill:url(#linearGradient4167);fill-opacity:1;stroke:none;stroke-width:0.32836357;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="fill:#ffffff"
inkscape:connector-curvature="0"
id="path4233"
d="m 236.78583,120.9292 -13.39628,13.39628 c -0.27392,0.27548 -0.71908,0.27548 -0.99144,0 l -1.9798,-2 c -0.27236,-0.27396 -0.71908,-0.7222 -0.98988,-0.99924 l -4.60708,-4.84364 c -0.1354,-0.13543 -0.207,-0.32688 -0.207,-0.50896 0,-0.179 0.0716,-0.35332 0.207,-0.48872 l 2.01872,-1.81948 c 0.13696,-0.14008 0.31904,-0.20856 0.4996,-0.20856 0.17744,0.001 0.35488,0.0716 0.49028,0.20856 l 4.56972,4.66152 c 0.27236,0.27704 0.71752,0.27704 0.99144,0 L 233.8177,117.9284 c 0.27393,-0.27548 0.71751,-0.27548 0.98989,0 l 1.9798,2 c 0.27236,0.27396 0.27236,0.72532 -10e-4,1.0008 z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.3 KiB

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
viewBox="0 0 64.000001 64.000001"
id="svg4418"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="closed-circle.svg">
<defs
id="defs4420">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4355"
id="linearGradient4361"
x1="231.57208"
y1="156.25917"
x2="215.87262"
y2="193.91931"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4355">
<stop
style="stop-color:#d40000;stop-opacity:1"
offset="0"
id="stop4357" />
<stop
style="stop-color:#ef5d5d;stop-opacity:1"
offset="1"
id="stop4359" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.75"
inkscape:cx="32"
inkscape:cy="32"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="712"
inkscape:window-x="1920"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata4423">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-988.36216)">
<g
id="close-circle"
transform="matrix(1.7349701,0,0,1.7349701,-364.43402,730.39162)"
inkscape:label="#g4386"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<g
id="g4375">
<circle
r="18.444122"
cy="167.13287"
cx="228.49617"
id="circle4330"
style="opacity:1;fill:#d40000;fill-opacity:1;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<circle
r="17.232113"
style="opacity:1;fill:#ff5555;fill-opacity:1;stroke:none;stroke-width:0.37318179;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4332"
cx="228.49617"
cy="167.13287" />
<circle
r="15.488939"
cy="167.13287"
cx="228.49617"
id="circle4334"
style="opacity:1;fill:url(#linearGradient4361);fill-opacity:1;stroke:none;stroke-width:0.32836357;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<path
id="path4317"
d="m 219.54644,160.71419 6.39282,6.50908 -6.39282,6.32828 2.557,2.53132 6.39246,-6.32828 6.39336,6.32828 2.55664,-2.53132 -6.39336,-6.32828 6.39336,-6.50908 -2.55664,-2.53132 -6.39336,6.32828 -6.39246,-6.32828 -2.557,2.53132 z"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

@ -1373,9 +1373,9 @@ switch ($action) {
foreach ($result as $item) { foreach ($result as $item) {
$item['display_text'] = $item['displayText']; $item['display_text'] = $item['displayText'];
$item['field_type'] = $obj->get_field_type_by_id($item['fieldType']); $item['field_type'] = $obj->get_field_type_by_id($item['fieldType']);
$item['changeable'] = $item['changeable'] ? Display::return_icon('right.gif') : Display::return_icon('wrong.gif'); $item['changeable'] = $item['changeable'] ? Display::return_icon('check-circle.png', get_lang('Invisible')) : Display::return_icon('closed-circle.png', get_lang('Visible'), null, ICON_SIZE_SMALL);
$item['visible'] = $item['visible'] ? Display::return_icon('right.gif') : Display::return_icon('wrong.gif'); $item['visible'] = $item['visible'] ? Display::return_icon('check-circle.png', get_lang('Invisible')) : Display::return_icon('closed-circle.png', get_lang('Visible'), null, ICON_SIZE_SMALL);
$item['filter'] = $item['filter'] ? Display::return_icon('right.gif') : Display::return_icon('wrong.gif'); $item['filter'] = $item['filter'] ? Display::return_icon('check-circle.png', get_lang('Invisible')) : Display::return_icon('closed-circle.png', get_lang('Visible'), null, ICON_SIZE_SMALL);
$new_result[] = $item; $new_result[] = $item;
} }
$result = $new_result; $result = $new_result;

@ -1528,10 +1528,10 @@ class Link extends Model
$count = count($categories); $count = count($categories);
if (!empty($count)) { if (!empty($count)) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=list&show=none">'; echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=list&show=none">';
echo Display::return_icon('view_remove.png', get_lang('shownone'), '', ICON_SIZE_MEDIUM).'</a>'; echo Display::return_icon('forum_listview.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM). get_lang('FlatView') . ' </a>';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=list&show=all">'; echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=list&show=all">';
echo Display::return_icon('view_tree.png', get_lang('showall'), '', ICON_SIZE_MEDIUM).'</a>'; echo Display::return_icon('forum_nestedview.png', get_lang('NestedView'), '', ICON_SIZE_MEDIUM) . get_lang('NestedView') . '</a>';
} }
echo '</div>'; echo '</div>';
@ -1543,10 +1543,12 @@ class Link extends Model
$count = Database::num_rows($result); $count = Database::num_rows($result);
if ($count !== 0) { if ($count !== 0) {
echo '<table class="data_table">'; echo '<div class="panel panel-default">';
echo '<tr><th style="font-weight: bold; text-align:left;padding-left: 10px;">'.get_lang('General').'</th></tr>'; echo '<div class="panel-heading">'.get_lang('General').'</div>';
echo '</table>'; echo '<div class="panel-body">';
self::showlinksofcategory(0); self::showlinksofcategory(0);
echo '</div>';
echo '</div>';
} }
$i = 0; $i = 0;
@ -1576,10 +1578,11 @@ class Link extends Model
Display :: return_icon('invisible.png', get_lang('Show'), array (), ICON_SIZE_SMALL) . '</a>'; Display :: return_icon('invisible.png', get_lang('Show'), array (), ICON_SIZE_SMALL) . '</a>';
} }
echo '<tr>';
echo '<table class="data_table">';
echo '<tr>';
echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;">'; echo '<div class="panel panel-default">';
echo '<div class="panel-heading">';
if ($showChildren) { if ($showChildren) {
echo '<a class="'.$visibilityClass.'" href="'.api_get_self().'?'.api_get_cidreq().'&category_id=">'; echo '<a class="'.$visibilityClass.'" href="'.api_get_self().'?'.api_get_cidreq().'&category_id=">';
@ -1589,31 +1592,30 @@ class Link extends Model
echo Display::return_icon('view_tree.png'); echo Display::return_icon('view_tree.png');
} }
echo '&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).'</a> echo Security::remove_XSS($myrow['category_title']).'</a>';
<br />&nbsp;&nbsp;&nbsp;'.$myrow['description']; echo '<div class="pull-right">';
echo '</th>';
if (api_is_allowed_to_edit(null, true)) { if (api_is_allowed_to_edit(null, true)) {
if ($session_id == $myrow['session_id']) { if ($session_id == $myrow['session_id']) {
echo '<th>';
echo $strVisibility; echo $strVisibility;
Link::showCategoryAdminTools($myrow, $counter, count($categories)); Link::showCategoryAdminTools($myrow, $counter, count($categories));
echo '</th>';
} else { } else {
echo '<th>'.get_lang('EditionNotAvailableFromSession'); echo get_lang('EditionNotAvailableFromSession');
} }
} }
echo '</tr>'; echo '</div>';
echo '</table>'; echo '</div>';
echo '<div class="panel-body">';
echo $myrow['description'];
if ($showChildren) { if ($showChildren) {
echo Link::showlinksofcategory($myrow['id']); echo Link::showlinksofcategory($myrow['id']);
} }
echo '</tr>';
echo '</div>';
echo '</th>'; echo '</div>';
echo '</tr>';
echo '</table>';
echo '</tr>';
$counter++; $counter++;
/* /*
@ -1705,7 +1707,7 @@ class Link extends Model
//} //}
// Displaying the link of the category // Displaying the link of the category
} }
echo '</table>';
} }
/** /**

@ -68,16 +68,16 @@ $items = getAllUserToWork($workId, api_get_course_int_id());
$usersAdded = array(); $usersAdded = array();
if (!empty($items)) { if (!empty($items)) {
echo Display::page_subheader(get_lang('UsersAdded')); echo Display::page_subheader(get_lang('UsersAdded'));
echo '<div class="well">'; echo '<ul class="list-group">';
foreach ($items as $data) { foreach ($items as $data) {
$myUserId = $data['user_id']; $myUserId = $data['user_id'];
$usersAdded[] = $myUserId; $usersAdded[] = $myUserId;
$userInfo = api_get_user_info($myUserId); $userInfo = api_get_user_info($myUserId);
$url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=delete&id='.$workId.'&user_id='.$myUserId; $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=delete&id='.$workId.'&user_id='.$myUserId;
$link = Display::url(get_lang('Delete'), $url, array('class' => 'btn btn-danger')); $link = Display::url('<i class="fa fa-trash"></i> ' . get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm'));
echo $userInfo['complete_name_with_username'].' '.$link.'<br />'; echo '<li class="list-group-item">' . $userInfo['complete_name_with_username'] . '<div class="pull-right">' . $link . '</div></li>';
} }
echo '</div>'; echo '</ul>';
} }
@ -104,14 +104,14 @@ foreach ($userList as $user) {
if (!empty($userToAddList)) { if (!empty($userToAddList)) {
echo Display::page_subheader(get_lang('UsersToAdd')); echo Display::page_subheader(get_lang('UsersToAdd'));
echo '<div class="well">'; echo '<ul class="list-group">';
foreach ($userToAddList as $user) { foreach ($userToAddList as $user) {
$userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') '; $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';
$url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=add&id='.$workId.'&user_id='.$user['user_id']; $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=add&id='.$workId.'&user_id='.$user['user_id'];
$link = Display::url(get_lang('Add'), $url, array('class' => 'btn btn-primary')); $link = Display::url('<i class="fa fa-plus"></i> ' . get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm'));
echo $userName.' '.$link.'<br />'; echo '<li class="list-group-item">' . $userName . '<div class="pull-right"> ' . $link . '</div></li>';
} }
echo '</div>'; echo '</ul>';
} else { } else {
Display::display_warning_message(get_lang('NoUsersToAdd')); Display::display_warning_message(get_lang('NoUsersToAdd'));
} }

@ -2055,7 +2055,7 @@ function get_work_user_list(
$work_date = api_convert_and_format_date($work['sent_date']); $work_date = api_convert_and_format_date($work['sent_date']);
$work['sent_date_from_db'] = $work['sent_date']; $work['sent_date_from_db'] = $work['sent_date'];
$work['sent_date'] = date_to_str_ago(api_get_local_time($work['sent_date'])) . ' ' . $add_string . '<br />' . $work_date; $work['sent_date'] = '<div class="date-time">' . date_to_str_ago(api_get_local_time($work['sent_date'])) . ' ' . $add_string . ' ' . $work_date . '</div>';
// Actions. // Actions.
$correction = ''; $correction = '';
@ -2064,7 +2064,7 @@ function get_work_user_list(
if (api_is_allowed_to_edit()) { if (api_is_allowed_to_edit()) {
if (!empty($work['url_correction'])) { if (!empty($work['url_correction'])) {
$action .= Display::url( $action .= Display::url(
Display::return_icon('check.png', get_lang('Correction'), null, ICON_SIZE_SMALL), Display::return_icon('check-circle.png', get_lang('Correction'), null, ICON_SIZE_SMALL),
api_get_path(WEB_CODE_PATH).'work/download.php?id='.$item_id.'&'.api_get_cidreq().'&correction=1' api_get_path(WEB_CODE_PATH).'work/download.php?id='.$item_id.'&'.api_get_cidreq().'&correction=1'
); );
} }

@ -389,12 +389,15 @@ $(function() {
echo $documentsAddedInWork; echo $documentsAddedInWork;
echo Display::grid_html('results'); echo Display::grid_html('results');
echo '<div class="list-work-results">';
echo '<table style="display:none; width:50%" class="files data_table"> echo '<div class="panel panel-default">';
echo '<div class="panel-body">';
echo '<table style="display:none; width:100%" class="files data_table">
<tr> <tr>
<th>'.get_lang('FileName').'</th> <th>'.get_lang('FileName').'</th>
<th>'.get_lang('Size').'</th> <th>'.get_lang('Size').'</th>
<th>'.get_lang('Status').'</th> <th>'.get_lang('Status').'</th>
</tr> </tr>
</table>'; </table>';
echo '</div></div></div>';
Display :: display_footer(); Display :: display_footer();

Loading…
Cancel
Save