From 7eb7d3752748e3ca6db611e29a5d8c1aaac1195b Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 1 Oct 2008 12:31:22 +0000 Subject: [PATCH] Add icons for plugins actions. git-svn-id: http://piwigo.org/svn/trunk@2631 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/plugins_list.php | 42 ++--------- admin/template/goto/default-layout.css | 21 ++++-- admin/template/goto/icon/plug_activate.png | Bin 0 -> 432 bytes .../template/goto/icon/plug_activate_grey.png | Bin 0 -> 388 bytes admin/template/goto/icon/plug_deactivate.png | Bin 0 -> 475 bytes .../goto/icon/plug_deactivate_grey.png | Bin 0 -> 399 bytes admin/template/goto/icon/plug_delete.png | Bin 0 -> 425 bytes admin/template/goto/icon/plug_delete_grey.png | Bin 0 -> 436 bytes admin/template/goto/icon/plug_install.png | Bin 0 -> 417 bytes .../template/goto/icon/plug_install_grey.png | Bin 0 -> 376 bytes admin/template/goto/icon/plug_uninstall.png | Bin 0 -> 429 bytes .../goto/icon/plug_uninstall_grey.png | Bin 0 -> 387 bytes admin/template/goto/plugins_list.tpl | 70 ++++++++++++++---- admin/template/goto/plugins_new.tpl | 9 ++- admin/template/goto/plugins_update.tpl | 6 +- 15 files changed, 86 insertions(+), 62 deletions(-) create mode 100644 admin/template/goto/icon/plug_activate.png create mode 100644 admin/template/goto/icon/plug_activate_grey.png create mode 100644 admin/template/goto/icon/plug_deactivate.png create mode 100644 admin/template/goto/icon/plug_deactivate_grey.png create mode 100644 admin/template/goto/icon/plug_delete.png create mode 100644 admin/template/goto/icon/plug_delete_grey.png create mode 100644 admin/template/goto/icon/plug_install.png create mode 100644 admin/template/goto/icon/plug_install_grey.png create mode 100644 admin/template/goto/icon/plug_uninstall.png create mode 100644 admin/template/goto/icon/plug_uninstall_grey.png diff --git a/admin/plugins_list.php b/admin/plugins_list.php index ddae73ce3..bc9425092 100644 --- a/admin/plugins_list.php +++ b/admin/plugins_list.php @@ -89,42 +89,16 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) $tpl_plugin = array('NAME' => $display_name, 'VERSION' => $fs_plugin['version'], - 'DESCRIPTION' => $desc); - - $action_url = $base_url.'&plugin='.$plugin_id; + 'DESCRIPTION' => $desc, + 'U_ACTION' => $base_url.'&plugin='.$plugin_id); if (isset($plugins->db_plugins_by_id[$plugin_id])) { $tpl_plugin['STATE'] = $plugins->db_plugins_by_id[$plugin_id]['state']; - switch ($plugins->db_plugins_by_id[$plugin_id]['state']) - { - case 'active': - $tpl_plugin['actions'][] = - array('U_ACTION' => $action_url . '&action=deactivate', - 'L_ACTION' => l10n('Deactivate')); - break; - - case 'inactive': - $tpl_plugin['actions'][] = - array('U_ACTION' => $action_url . '&action=activate', - 'L_ACTION' => l10n('Activate')); - $tpl_plugin['actions'][] = - array('U_ACTION' => $action_url . '&action=uninstall', - 'L_ACTION' => l10n('Uninstall'), - 'CONFIRM' => l10n('Are you sure?')); - break; - } } else { - $tpl_plugin['actions'][] = - array('U_ACTION' => $action_url . '&action=install', - 'L_ACTION' => l10n('Install'), - 'CONFIRM' => l10n('Are you sure?')); - $tpl_plugin['actions'][] = - array('U_ACTION' => $action_url . '&action=delete', - 'L_ACTION' => l10n('plugins_delete'), - 'CONFIRM' => l10n('plugins_confirm_delete')); + $tpl_plugin['STATE'] = 'uninstalled'; } $template->append('plugins', $tpl_plugin); } @@ -142,12 +116,10 @@ foreach($missing_plugin_ids as $plugin_id) 'NAME' => $plugin_id, 'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'], 'DESCRIPTION' => "ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW !", - 'actions' => array ( array ( - 'U_ACTION' => $action_url . '&action=uninstall', - 'L_ACTION' => l10n('Uninstall'), - ) ) - ) - ); + 'U_ACTION' => $base_url.'&plugin='.$plugin_id, + 'STATE' => 'missing' + ) + ); } $template->assign_var_from_handle('ADMIN_CONTENT', 'plugins'); diff --git a/admin/template/goto/default-layout.css b/admin/template/goto/default-layout.css index 74d3790df..52b8befae 100644 --- a/admin/template/goto/default-layout.css +++ b/admin/template/goto/default-layout.css @@ -40,20 +40,31 @@ TABLE#detailedStats { } /* Plugins tables */ -TABLE.table2 TR TD.pluginState { - padding-left: 16px; -} +TABLE.plugins a { border: 0; } +TABLE.plugins TR TD { padding: 4px 10px; } +TABLE.plugins TR TD.pluginState { padding: 4px 16px; } -TABLE.table2 TR TD.active { +TABLE.plugins TR TD.active { background: url(icon/plugin_active.gif) no-repeat center left; background-color: inherit; /* IE need it */ } -TABLE.table2 TR TD.inactive { +TABLE.plugins TR TD.inactive { background: url(icon/plugin_inactive.gif) no-repeat center left; background-color: inherit; /* IE need it */ } +TABLE.plugins ul.pluginsActions { + float: left; + padding: 0; + margin: 0; + width: 60px; + list-style: none; + text-align: center; +} + +TABLE.plugins ul.pluginsActions li { display: inline; } + /* categoryOrdering */ SELECT.categoryList { width: 100%; diff --git a/admin/template/goto/icon/plug_activate.png b/admin/template/goto/icon/plug_activate.png new file mode 100644 index 0000000000000000000000000000000000000000..feb97a1c92f4af80f7ab28cb545d3bff339dcd19 GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIMI(fP{hE&{2^7#EfUasS-YIJL0k%E4h$R5B&Gb}Si;@d^z(o3WXCqn z10s3zwss~iD>UjlIQ#M+iERc3It;INb39^Z5m4Twa-rdG|J4-PeIJVww?_WBDa|(V zdA_v7`E$7~os293+`ATq9u?%--g9-M)C1;{iTVP{%nb}lNecuRfRaHT_6Y`_ie>^2 zs~DI#L^=xoGcfBkN-$6O3Y2w|IB}<@C0JQQ;3A^~!$Ro-#Xb3|itIKH&w!F={C_#@ zk!#;!x2=Umn4LpGEg*<(sf&giJJShHZcY=2;Po~R42Dd?=WEuSV`_44EPL=IYx_R| zv&so~m>L+ES`RWmnbOL1?%YvHf&U9VWfU4B7R;$Kx+HKSo11~DmdKI;Vst07aCTXaE2J literal 0 HcmV?d00001 diff --git a/admin/template/goto/icon/plug_activate_grey.png b/admin/template/goto/icon/plug_activate_grey.png new file mode 100644 index 0000000000000000000000000000000000000000..bf2a9be53885d1081d0c1fc9c20c0691036f46c4 GIT binary patch literal 388 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIMig~&?hE&{2^6>Va%$`)sro*5S zcfNs{;prbo69)!E#*gd@ehgeUj0HFwvVJ#CVd~%&aOm-9`swhBL4aFfWobj#!e;)> zX=itFBr&iED9<|i+tSifcE-$^8*lx2eO+H5k0C3srIV3GfP0rxWMm{;TwL55Hk;~i zJr93=ey)+kzO@t8OS zueSkuf~oUoMUn%fKTqQmF`y9|JaP){TAYEL=d6L&cjzA%WKdYI3v|P=|Ns97PZ45d a;$hJ331Nxk{}=)cMg~t;KbLh*2~7b05qv}d literal 0 HcmV?d00001 diff --git a/admin/template/goto/icon/plug_deactivate.png b/admin/template/goto/icon/plug_deactivate.png new file mode 100644 index 0000000000000000000000000000000000000000..8401ad8b986403968f38dcd50f936001b06972c4 GIT binary patch literal 475 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIM=6bp~hE&{2`t$$4J+mrNWHrE%xPdq zax@oPF;U(lmm!H+VIPC28ADg|4MvA%JEhg^913bWv-lZ4GAo2JXqB-f3P^YHJ6t`$ z=)kaW_X37jcU(+9aw-&R_&H2t;7}-GmRZm>G1gT6l`Ol4p2IYdZWCsn1?P@m;Q9KS z{fhxJNR6Ju-!5Nc=AbnoQ#LNJ_`h-%L-UKnZU0$)ICU*YYr4#e#H>N ze`7TR;}H%Yk&h?TnnYjAXe0>Kd}OqgHP|yrm?6tef@`Y;Fq9UqmdKI;Vst0MkIDwEzGB literal 0 HcmV?d00001 diff --git a/admin/template/goto/icon/plug_deactivate_grey.png b/admin/template/goto/icon/plug_deactivate_grey.png new file mode 100644 index 0000000000000000000000000000000000000000..a7e55e669c361229d54664dd9b76ef28e65ab2a1 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIMDtfv&hE&{2`t$$4J+mrp?Sw3a!1agML~iC|ViDk;@2RVh6 ztkt4GFEwsEet1srk{t}Ieli8!;7BOE$Ov?K~)vryP994789(gsFjnX=eiC omGe&;m>C$4cx0BbaTqXY%?j6?0v z(btiIVdK0+AII-NzCyA`kS_y6l_~>6Lo)-z&;LOB1p`A62Lq#M1OtQBbOr|T{OeKj z6Brm6-Ln?0FnY`cYaDYhre(B_^iiXMUJTt9bZyof#@34?RVF{mIn|{$kyM_f1 zmUzE@Ql!|-FJSI?P-DlI*2fpBojcfCa{f)Tp7Z(lx%sC9m7K(XGI(h+q*z!o_BDRV z`#9^4{(X+A=XYFBf56TkTIV$Sx7HTkw}C$HNPX={d_>c45vSMsQ{AGpKFwSYxwfsqyOp9P#6 zZ!IbqPQ6H1SlxIlNR_1jra_A5W* zNqL)->lsqN++ov?a?lgId1tG?%c|r}?4>FHt#TQP5|;JsTUoR^`PG8=j0`KUMXE0n RQUirOgQu&X%Q~loCIEppp%nlC literal 0 HcmV?d00001 diff --git a/admin/template/goto/icon/plug_delete_grey.png b/admin/template/goto/icon/plug_delete_grey.png new file mode 100644 index 0000000000000000000000000000000000000000..d3d070bfcbf45efb9739433736776311fa562b5c GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIMx_P=dhE&{2`t$$4J+mr>gsT=_3``D5)u;=Crp}@^x)~!S_YB*3`eBX&d%B@utYA! z(t*LSspHF+k~)R|3?9lJkN*Dt&LgfLmoj1UNzm8Ib6TR{IZ#Wk;Rzd$sT?O9fn5- zOb#(z`1yjZrlG2xQK4am1IqBidNsc=Xu&S3Puiv9gGJmY&oXp z97q)K@ncve#>2qGF-JUMCg-e$e-;+zHl#6VXz??c=C^P*d|_e{P+oddQsDrDOG4Db UWrfa*fx*t;>FVdQ&MBb@0IQ0Z zCL0<)zPZ!Rz<7k^sl|j02POgS1_>aqNu`1zBT3nCSEF8AG@F2fPKD?+;}6U$88rSK zxN&kq$2vBJhKPa;me!Lj3T6()W^4=`3TiUb;uV5=7!?`{Bn2AMtWW$D->As~6xTWT zo!wRNiW{SfSr~(W!;M1>PrkD+$Y8zoOVC4|iFfMpR0anIMd=G4?jK&-*qF%Ad^j|k zt?hZ1{6A^u)Nc)o_;xcgFt)t=Q>F0F->V2{qFBPB8T_S2%!g0c^6@?AV zQ+6;YG&sanFnBlqk6m!`R_Z&J75_gjbqk0}1iDU4gFWf-+S6=2S<59P}?#wV06Mz$BpEAOYkxsZ=mzBqn8zopr0As9n&j0`b literal 0 HcmV?d00001 diff --git a/admin/template/goto/icon/plug_uninstall.png b/admin/template/goto/icon/plug_uninstall.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd420ad7ce286e1cc9def0851a3727fc43deef4 GIT binary patch literal 429 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIM+IzYD!A|TAz`^SN2(_01s zb%vY2USu&ab#V5lRVsXCcoLrRL&KoVD8?n6UBE%7LS_S_T*O=+_Cif24h1opZO554 znHBU7ESF?qVB(lA&gF29J!_taMgt=g$4yqg11}O29{k`*S!a|`p_5uAfbk3i(0qsJ#}j>11gh8)?L+@N9QexVu$LX^7{Mt$ zj+z1@&jW&4FU;lU>29|OO0jidXxyW~kaENL4dW)Bav6pyMTT{c_8wtu+kB7ffA7SY z4mOZCUdeM*EU;&MW^Pb>z9WDw8fZ(zWd?!&>`C=WpEw;D9(o=7dSn$VhXI3LU4*Dh TBD)DNycs-Q{an^LB{Ts54GWN? literal 0 HcmV?d00001 diff --git a/admin/template/goto/icon/plug_uninstall_grey.png b/admin/template/goto/icon/plug_uninstall_grey.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6291cee7dc79fa245d3c9df32d04cb0d155b23 GIT binary patch literal 387 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+AuIMih8;@hE&{2N?~Z)vSmw^!qo!~ zQUx_Pkvb**jvOc%PvFJ1+z;+A92ap2R5>0)5&U~PZ<(cu(B2lt0eHpT{q zLr+_oCVXz3r7pyk(7@nS*2sJzO+q^5H*3bP18gD*JPiy@k_8OiPgrfl^c&a=m>n1l zm4AxgEMr}<(Efu&QbJD783q9doeM8AS&mv>31M7PkkD|-{)pg>uMCVVMh*;9E=|}Y z)Ubr@NI1hO?FU6{K>dz?nVE$X>Y6XL7~Nn3`tQg@HitGghPnGD2AD9h2&_wq@m~|w cz`)F4TjDvRSbkPHFccX)UHx3vIVCg!0II-)UH||9 literal 0 HcmV?d00001 diff --git a/admin/template/goto/plugins_list.tpl b/admin/template/goto/plugins_list.tpl index 0f2cc43e4..2b0f9bb06 100644 --- a/admin/template/goto/plugins_list.tpl +++ b/admin/template/goto/plugins_list.tpl @@ -10,30 +10,70 @@ {if isset($plugins)} - +
+ - {foreach from=$plugins item=plugin name=plugins_loop} - - - - - + + + + + {/foreach}
{'Name'|@translate}{'Actions'|@translate} {'Version'|@translate} {'Description'|@translate}{'Actions'|@translate}
- {$plugin.NAME} - {$plugin.VERSION}{$plugin.DESCRIPTION} - {foreach from=$plugin.actions item=action} - {$action.L_ACTION} - {/foreach} -
+ {$plugin.NAME} + +
    + {if $plugin.STATE == 'active'} +
  • + + {'Deactivate'|@translate} + +
  • +
  • + {'Uninstall'|@translate} +
  • + {/if} + {if $plugin.STATE == 'inactive'} +
  • + + {'Activate'|@translate} + +
  • + {/if} + {if $plugin.STATE == 'inactive' or $plugin.STATE == 'missing'} +
  • + + {'Uninstall'|@translate} + +
  • + {/if} + {if $plugin.STATE == 'uninstalled'} +
  • + {'Activate'|@translate} +
  • +
  • + + {'Install'|@translate} + +
  • +
  • + + {'plugins_delete'|@translate} + +
  • + {elseif $plugin.STATE != 'missing'} +
  • + {'plugins_delete'|@translate} +
  • + {/if} +
+
{$plugin.VERSION}{$plugin.DESCRIPTION}
diff --git a/admin/template/goto/plugins_new.tpl b/admin/template/goto/plugins_new.tpl index b1827190c..0d3f4e1ba 100644 --- a/admin/template/goto/plugins_new.tpl +++ b/admin/template/goto/plugins_new.tpl @@ -12,17 +12,18 @@ jQuery().ready(function(){ldelim}
-

{'Plugins'|@translate}

-
- + {'Sort order'|@translate} : + +

{'Plugins'|@translate}

+ {if isset($plugins)}
- +
diff --git a/admin/template/goto/plugins_update.tpl b/admin/template/goto/plugins_update.tpl index fbfe04afb..c21e01e18 100644 --- a/admin/template/goto/plugins_update.tpl +++ b/admin/template/goto/plugins_update.tpl @@ -18,7 +18,7 @@ jQuery().ready(function(){ldelim} {if isset($plugins_not_uptodate)}
{'plugins_need_update'|@translate} -
{'Name'|@translate}
+
@@ -43,7 +43,7 @@ jQuery().ready(function(){ldelim} {if isset($plugins_uptodate)}
{'plugins_dontneed_update'|@translate} -
{'Name'|@translate}
+
@@ -63,7 +63,7 @@ jQuery().ready(function(){ldelim} {if isset($plugins_cant_check)}
{'plugins_cant_check'|@translate} -
{'Name'|@translate}
+
{'Name'|@translate}