From 0ce316e0ebcbbce3831062c9493d22b16409c20e Mon Sep 17 00:00:00 2001 From: aragonc Date: Thu, 10 Sep 2015 18:09:36 -0500 Subject: [PATCH] add icons addworkuser and fix list links course CT#7539 --- app/Resources/public/css/base.css | 160 +-- main/img/icons/22/addworkuser.png | Bin 0 -> 1098 bytes main/img/icons/22/url.png | Bin 0 -> 651 bytes main/img/icons/32/addworkuser.png | Bin 0 -> 1750 bytes main/img/icons/48/addworkuser.png | Bin 0 -> 2984 bytes main/img/icons/svg/addworkuser.svg | 1334 +++++++++++++++++++++++ main/img/icons/svg/forum_listview.svg | 184 ++++ main/img/icons/svg/forum_nestedview.svg | 208 ++++ main/img/icons/svg/url.svg | 206 ++++ main/inc/ajax/link.ajax.php | 4 +- main/inc/lib/link.lib.php | 214 ++-- main/work/work_list_all.php | 2 +- 12 files changed, 2092 insertions(+), 220 deletions(-) create mode 100644 main/img/icons/22/addworkuser.png create mode 100644 main/img/icons/22/url.png create mode 100644 main/img/icons/32/addworkuser.png create mode 100644 main/img/icons/48/addworkuser.png create mode 100644 main/img/icons/svg/addworkuser.svg create mode 100644 main/img/icons/svg/forum_listview.svg create mode 100644 main/img/icons/svg/forum_nestedview.svg create mode 100644 main/img/icons/svg/url.svg diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 22d1f6418e..b23b6cfd5c 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -370,34 +370,36 @@ ul#navigation .report a { padding: 6px; border: 1px solid #DDD } -/* .actions a img{ - margin-right: 5px; -} .actions a{ - border: 1px solid #ddd; - border-radius: 5px; - display: inline-block; - margin-left: 5px; - padding: 5px; - background: #ffffff; - background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); - background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); - background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); - background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); - background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=0 ); + text-decoration: none; + margin-right: 5px; } .actions a:hover{ - background: #f4f4f4; - background: -moz-linear-gradient(top, #f4f4f4 0%, #dddddd 71%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f4f4f4), color-stop(71%,#dddddd)); - background: -webkit-linear-gradient(top, #f4f4f4 0%,#dddddd 71%); - background: -o-linear-gradient(top, #f4f4f4 0%,#dddddd 71%); - background: -ms-linear-gradient(top, #f4f4f4 0%,#dddddd 71%); - background: linear-gradient(to bottom, #f4f4f4 0%,#dddddd 71%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#dddddd',GradientType=0 ); -}*/ + text-decoration: none; +} +.actions img{ + padding: 3px; + border: 1px solid #dcdcdc; + border-radius: 5px; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ +} +.actions img:hover{ + background: #ededed; /* Old browsers */ + background: -moz-linear-gradient(top, #ededed 2%, #f6f6f6 49%, #ffffff 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(2%,#ededed), color-stop(49%,#f6f6f6), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ededed 2%,#f6f6f6 49%,#ffffff 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ededed 2%,#f6f6f6 49%,#ffffff 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #ededed 2%,#f6f6f6 49%,#ffffff 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ededed 2%,#f6f6f6 49%,#ffffff 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */ +} .actions .btn-toolbar { margin : 0px; } @@ -4255,111 +4257,21 @@ li.annoucement{ margin-bottom: 5px; } -.link_category .head { - background-color: #EFEFEF; - border: 1px solid #CCCCCC; - margin-bottom: 5px; - padding-top: 2px; - padding-right: 2px; - padding-bottom: 2px; - vertical-align: middle; -} - -.link_category .body{ - margin-left: 32px; -} - -.link:nth-child(2n) { - background-color: #F9F9F9; -} - .link{ - border-top: 1px solid #DDDDDD; - border-left: 1px solid #DDDDDD; - border-right: 1px solid #DDDDDD; -} - -.link:last-child{ - border-bottom: 1px solid #DDDDDD; - border-left: 1px solid #DDDDDD; - border-right: 1px solid #DDDDDD; -} - -.link{ - border-collapse: collapse; - /*border: 1px solid #CCCCCC;*/ - padding-top: 6px; - padding-right: 6px; - padding-bottom: 6px; - padding-left: 6px; - vertical-align: middle; -} - -.link .icon{ - position: absolute; - float: left; -} - -.link:hover{ - background-color: #E5EDF9; -} - -.link .title, -.link .description{ - margin-left: 32px; -} - -.link .description{ - font-weight: normal; - color: #000000; -} - -.link.invisible img{ - opacity:0.4; - filter:alpha(opacity=40); /* For IE8 and earlier */ + margin-top: 15px; } - -.link.invisible .description{ - color: #999999; -} - -.link .status{ - border:none; - border-radius: 0; - background-color: transparent; - width:22px; - height:22px; - margin:0; - padding:0; - display:inline-block; - background-repeat: no-repeat; - background-position:center center; - box-shadow:none; +.link .list-group-item-heading a{ + text-decoration: none; } - -.link.invalid .status{ - background-image: url('../../main/img/icons/22/error.png'); +.link .list-group-item-heading .invisible{ + color: #666666; } - -.link.valid .status{ - background-image: url('../../main/img/icons/22/accept.png'); +.link .list-group-item-text{ + font-size: 12px; } - -.btn.validate_link{ - border:none; - border-radius: 0; - background-color: transparent; - width:22px; - height:22px; - margin:0; - padding:0; - display:inline-block; - background-image: url('../../main/img/icons/22/preview_view.png'); - background-repeat: no-repeat; - background-position:center center; - box-shadow:none; +.link .check-link{ + margin-left: 5px; } - /* Glossary */ diff --git a/main/img/icons/22/addworkuser.png b/main/img/icons/22/addworkuser.png new file mode 100644 index 0000000000000000000000000000000000000000..207dc2043c4e37dd7c64753de93a0ce896e6e896 GIT binary patch literal 1098 zcmV-Q1hxB#P)4kP1O%16w zsh5(fwTULiXf*MuYGdMq5B>p$Crvap?Mt<4A55CY7$Qw*sx2*s009xX7Emq)c6R5s zGdsVZ54&wzyA*uzBN#>#THVb`g` z=BAeL_HAJ=9`|ovyEZ@H+uN~lsr#K*z+cZ`cg63~=E~8JKA1`^&r6Y5k^a)0OwEo< zZ>(Qhmw%F1+Ya`8587(=>ZA+C0zQ(RrK>Fw$*wb_h7wnZ;L5RzUpJ!!xL6cBzIc9WR~E~=&}hE#&K6X}?ch%+`~$d9czda~6+mUGy6bTIdc z8oT$UgO$Cdghe*7?#o0~Zn4KXmBAiDdZmhS1AQGM+Ez^ZWF zkt>hA{6f{|e@_0UT(DmyI9I}+`h9HOyn&q!o7um;lt+qHs>2FW1y9kiJd~If+&|d0 z)DA=PF1YG2^|UgX2%kRQ{a3p>;(kMMlVr^PnIe53kw_g91;+FwAt9B4 z9Up8Drl*%=QvZA69#{x^3TM%MO$n(=POhpc#EO&1zKyg*FJNd9EF)du%k+JA1te1t zTQTJ?Uz}UpsBYnlo{M!*5zE^h#2qe z7`K-$e(3wX=kE&xP*hYHR0`j7mKzEorv&7`AF_nhGR$;B|3$#a>ii$^57#{K7b%6c Q*Z=?k07*qoM6N<$f~;lyO8@`> literal 0 HcmV?d00001 diff --git a/main/img/icons/22/url.png b/main/img/icons/22/url.png new file mode 100644 index 0000000000000000000000000000000000000000..c80ec2044e41f99d70653ddc69f348a952c63f15 GIT binary patch literal 651 zcmV;60(AX}P)MoK%G4%(L&zxA3opq$xW1;BtS%2M(aWe|2k+528<_4}Z3vGiktHT|UV8ry`cER(Io^ zB4RkPSc|hFaIw|n(tsBW_g|>Wh^kxn>hS8&<~`OviQ4Qq4EF#>6YoU)V%c6E*k2iQ zX7>!RrsF?ayMV*+Jn#s}CGuv4fq~@@-n&aChBLvOlGMrL>U2B_I7F^u_8#Xvs`bIa zr3GnZ->P!l#5RCUr?Ga{6+8$$VQT7jD=~C)Jol^K`$~k91{>oySJ1A-lB?M2@G7x- zb|F~xnWEPqzv-|xu4Pr{y$>)Ab_B9P#INq-rG)pMO##J z-#_m9(Kqh`9q!m|#f<#7iP;iR+IQ!Q1me!5cFfpZy|&(STGc&o8^6*p@+)h7D}>>7 zfTgjy#};KK(}MxRuvUwDM!ZU>8oY}dL4Ivw_A_u77;cr7$8Rm9UPT*RBe>C#?b^GQ zgWkUZN5ENTX7+YPPEQ{OP5|}oN;=1R0~Cm&uY_TFn;yaYAs`F9P7A(%gi7#8Ae@niOy`Ki9_5nCn78DDgrHSk(a)4 zX?x%AJ#WwR+aKq)6h^spZ1I=;a&k_d^ZY*N`}>~fIR`%FFy?zh7c>T&SA1Vrl;16p zNL0I?mP}@f$@tz(EcW}2;Qc>9`2z%cZ*P5JVAn(Axx;@Kb#Yj{u`}YHKPC3bqjGW2 zFWj#6Up#$a$)bDz=fwrg<9D>blRD7psN{s`)Rd^iMNt!@;*EYH?%9*#4D^U|?2w%L z_QT0{+L|A~-nj$UGidwWckXT4y?aZvy`#hkhB1O6zyQ&p6=;Q_6^N#4?QLPsp4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UQ#xy_y) z8n*1||9leo&0GL8WG354i8yx%MF>DjBkoME*$j!s`X#Mes%t`fH?)mR3ev|k8be>C z=hlBF5DJ(2pcx)evsa>GUnKp5CwdRd13!4qF~=ut$9&;m-NGvm0&}hjE^tYis52tB zJ}R`%4T;5X1mxPE8sRL|+jrBw@jC<}H6_urdY}TJm{0vcuVc--pi*BwaTftZ@23@mx)j!PB0c0dN6R_ zizunEvN^15UQG;~RE5m60;QB1AHY5IvUKgDm zYllz-LQ!v9^1KKNEE5W*!kk77A4b0YDr61=2dQ$0=3?yBhkz&$!`mXdkYNFS4XaM@ e|BwG| + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main/img/icons/svg/forum_listview.svg b/main/img/icons/svg/forum_listview.svg new file mode 100644 index 0000000000..d147eab0e1 --- /dev/null +++ b/main/img/icons/svg/forum_listview.svg @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/main/img/icons/svg/forum_nestedview.svg b/main/img/icons/svg/forum_nestedview.svg new file mode 100644 index 0000000000..e3d7b69378 --- /dev/null +++ b/main/img/icons/svg/forum_nestedview.svg @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main/img/icons/svg/url.svg b/main/img/icons/svg/url.svg new file mode 100644 index 0000000000..18012a589f --- /dev/null +++ b/main/img/icons/svg/url.svg @@ -0,0 +1,206 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main/inc/ajax/link.ajax.php b/main/inc/ajax/link.ajax.php index 1f13f45d79..e6bda1fc4b 100755 --- a/main/inc/ajax/link.ajax.php +++ b/main/inc/ajax/link.ajax.php @@ -40,9 +40,9 @@ switch ($action) { curl_close($ch); if ($result) { - echo Display::return_icon('accept.png', get_lang('Ok')); + echo Display::return_icon('check-circle.png', get_lang('Ok'), null, ICON_SIZE_TINY); } else { - echo Display::return_icon('wrong.gif', get_lang('Wrong')); + echo Display::return_icon('closed-circle.png', get_lang('Wrong'), null, ICON_SIZE_TINY); } } break; diff --git a/main/inc/lib/link.lib.php b/main/inc/lib/link.lib.php index 424beba727..119bd34dc2 100755 --- a/main/inc/lib/link.lib.php +++ b/main/inc/lib/link.lib.php @@ -890,7 +890,7 @@ class Link extends Model $result = Database:: query($sql); $numberoflinks = Database:: num_rows($result); if ($numberoflinks > 0) { - $content .= ''; + $content .= ''; - $content .= ' - '; - $content .= ''; } - $content .= ''; $i++; } - $content .= '
'; - $content .= ' - ' . get_lang('Link') . ' - - '; - $content .= Security:: remove_XSS($myrow['title']); - $content .= ''; - $content .= $link_validator; - $content .= $session_img; - $content .= '
' . $myrow['description']; - } else { - if (api_is_allowed_to_edit(null, true)) { - $content .= '
- '; - $content .= ' - "; - $content .= $link_validator; - $content .= $session_img.'
'.$myrow['description']; - } - } - + if (api_is_allowed_to_edit(null, true)) { - $content .= '
'; + if ($session_id == $myrow['session_id']) { $url = api_get_self() . '?' . api_get_cidreq() . '&action=editlink&category=' . (!empty ($category) ? $category : '') . '&id=' . $myrow['id'] . '&category_id=' . $myrow['id']; - - $content .= ''. - Display:: return_icon( - 'edit.png', - get_lang('Modify'), - array(), - ICON_SIZE_SMALL - ) . ''; - + $toolbar .= Display::toolbarButton( + '', + $url, + 'pencil', + 'default btn-sm' + ); + // DISPLAY MOVE UP COMMAND only if it is not the top link. /* commented at least since 2014-10-11 if ($i != 1) { @@ -984,50 +951,111 @@ class Link extends Model }*/ if ($myrow['visibility'] == '1') { - $content .= '' . - Display:: return_icon( - 'visible.png', - get_lang('Hide'), - array(), - ICON_SIZE_SMALL - ) . ''; + '&scope=link&category_id=' . $myrow['category_id']; + $toolbar .= Display::toolbarButton( + '', + $url, + 'eye', + 'default btn-sm' + ); + } if ($myrow['visibility'] == '0') { - $content .= ' ' . - Display:: return_icon( - 'invisible.png', - get_lang('Show'), - array(), - ICON_SIZE_SMALL - ) . ''; + $url .= 'link.php?' . api_get_cidreq() .'&sec_token=' . $token .'&action=visible&id=' . $myrow['id'] .'&scope=link&category_id=' . $myrow['category_id']; + $toolbar .= Display::toolbarButton( + '', + $url, + 'eye-slash', + 'primary btn-sm' + ); } - $content .= ' ' . - Display:: return_icon( - 'delete.png', - get_lang('Delete'), - array(), - ICON_SIZE_SMALL - ) . ''; + + $url .= api_get_self() . '?' . api_get_cidreq() .'&sec_token=' . $token .'&action=deletelink&id=' . $myrow['id'] .'&category_id=' . $myrow['category_id']; + $event = "javascript: if(!confirm('" . get_lang('LinkDelconfirm') . "'))return false;"; + $title = get_lang('Delete'); + + $toolbar .= Display::toolbarButton( + '', + $url, + 'trash', + 'default btn-sm', + array( + 'onclick' => $event, + 'title' => $title + ) + ); + } else { - $content .= Display:: return_icon( - 'edit_na.png', - get_lang('EditionNotAvailableFromSession'), - array(), - ICON_SIZE_SMALL - ); //get_lang('EditionNotAvailableFromSession'); + $title = get_lang('EditionNotAvailableFromSession'); + $toolbar .= Display::toolbarButton( + '', + '#', + 'trash-o', + 'default btn-sm', + array( + 'title' => $title + ) + ); + } + + } + $iconLink = Display::return_icon( + 'url.png', + get_lang('Link'), + null, + ICON_SIZE_SMALL + ); + + if ($myrow['visibility'] == '1') { + $content .= '
'; + $content .= '
'.$toolbar.'
'; + $content .= '

'; + $content .= $iconLink; + $url = 'link_goto.php?' . api_get_cidreq() .'&link_id=' . $myrow['id'] .'&link_url=' . urlencode($myrow['url']); + $content .= Display::tag( + 'a', + Security:: remove_XSS($myrow['title']), + array( + 'href' => $url, + 'target' => $myrow['target'] + ) + ); + $content .= $link_validator; + $content .= $session_img; + $content .= '

'; + + $content .= '

' . $myrow['description'] . '

'; + $content .= '
'; + } else { + if (api_is_allowed_to_edit(null, true)) { + $content .= '
'; + $content .= '
'.$toolbar.'
'; + $content .= '

'; + $content .= $iconLink; + $url = 'link_goto.php?' . api_get_cidreq() .'&link_id=' . $myrow['id'] . "&link_url=" . urlencode($myrow['url']); + $content .= Display::tag( + 'a', + Security:: remove_XSS($myrow['title']), + array( + 'href' => $url, + 'target' => '_blank', + 'class' => 'invisible' + ) + ); + $content .= $link_validator; + $content .= $session_img; + $content .= '

'; + $content .= '

' . $myrow['description'] . '

'; + $content .= '
'; } - $content .= '
'; + $content .= ''; } return $content; @@ -1563,10 +1591,10 @@ class Link extends Model $header = ''; if ($showChildren) { $header .= ''; - $header .= Display::return_icon('view_remove.png'); + $header .= Display::return_icon('forum_nestedview.png'); } else { $header .= ''; - $header .= Display::return_icon('view_tree.png'); + $header .= Display::return_icon('forum_listview.png'); } $header .= Security::remove_XSS($myrow['category_title']).''; diff --git a/main/work/work_list_all.php b/main/work/work_list_all.php index 6a23c78c12..b53cee1ec9 100755 --- a/main/work/work_list_all.php +++ b/main/work/work_list_all.php @@ -165,7 +165,7 @@ if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfC echo Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM).''; echo ''; - echo Display::return_icon('user.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).''; + echo Display::return_icon('addworkuser.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).''; echo ''; echo Display::return_icon('pdf.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'';