From 89dc215d9b00df49ba930acf47dc33c8acc8f909 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 24 Sep 2010 16:15:45 -0700 Subject: [PATCH] Pretty up the Yammer import status display a bit --- .../YammerImport/actions/yammeradminpanel.php | 31 ++++++----- plugins/YammerImport/css/admin.css | 49 +++++++++++++++++- plugins/YammerImport/css/done.png | Bin 0 -> 991 bytes plugins/YammerImport/css/icon_processing.gif | Bin 0 -> 673 bytes 4 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 plugins/YammerImport/css/done.png create mode 100644 plugins/YammerImport/css/icon_processing.gif diff --git a/plugins/YammerImport/actions/yammeradminpanel.php b/plugins/YammerImport/actions/yammeradminpanel.php index 2c9f412a24..12df3c2022 100644 --- a/plugins/YammerImport/actions/yammeradminpanel.php +++ b/plugins/YammerImport/actions/yammeradminpanel.php @@ -175,32 +175,37 @@ class YammerAdminPanelForm extends AdminForm $steps = array_keys($labels); $currentStep = array_search($runner->state(), $steps); + $this->out->elementStart('div', array('class' => 'yammer-import')); foreach ($steps as $step => $state) { if ($step < $currentStep) { // This step is done - $this->progressBar($labels[$state]['label'], - $labels[$state]['complete'], - 'complete'); + $this->progressBar($state, + 'complete', + $labels[$state]['label'], + $labels[$state]['complete']); } else if ($step == $currentStep) { // This step is in progress - $this->progressBar($labels[$state]['label'], - $labels[$state]['progress'], - 'progress'); + $this->progressBar($state, + 'progress', + $labels[$state]['label'], + $labels[$state]['progress']); } else { // This step has not yet been done. - $this->progressBar($labels[$state]['label'], - _m("Waiting..."), - 'waiting'); + $this->progressBar($state, + 'waiting', + $labels[$state]['label'], + _m("Waiting...")); } } + $this->out->elementEnd('div'); } - private function progressBar($label, $status, $class) + private function progressBar($state, $class, $label, $status) { // @fixme prettify ;) - $this->out->elementStart('div', array('class' => $class)); - $this->out->element('p', array(), $label); - $this->out->element('p', array(), $status); + $this->out->elementStart('div', array('class' => "import-step import-step-$state $class")); + $this->out->element('div', array('class' => 'import-label'), $label); + $this->out->element('div', array('class' => 'import-status'), $status); $this->out->elementEnd('div'); } diff --git a/plugins/YammerImport/css/admin.css b/plugins/YammerImport/css/admin.css index c1462237a5..28d52d07c6 100644 --- a/plugins/YammerImport/css/admin.css +++ b/plugins/YammerImport/css/admin.css @@ -1,11 +1,58 @@ +.yammer-import { + background-color: #eee; + + border: solid 1px; + border-radius: 8px; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + -opera-border-radius: 8px; + + padding: 16px; +} + +.import-step { + padding: 8px; +} +.import-label { + font-weight: bold; +} +.import-status { + margin-left: 20px; + padding-left: 20px; +} + + .waiting { color: #888; } .progress { + background-color: #fff; + border-radius: 8px; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + -opera-border-radius: 8px; +} + +.progress .import-label { color: blue; } -.done { +.progress .import-status { + background-image: url(icon_processing.gif); + background-repeat: no-repeat; +} + +.complete { color: black; } + +.complete .import-status { + background-image: url(done.png); + background-repeat: no-repeat; +} + +.import-step-done .import-status { + /* override */ + background: none !important; +} diff --git a/plugins/YammerImport/css/done.png b/plugins/YammerImport/css/done.png new file mode 100644 index 0000000000000000000000000000000000000000..1f3f4115014653df14a79c51bfaa86340bbe2e03 GIT binary patch literal 991 zcmV<510ei~P)ma9mi6K=}4q%MH*rRO%S0%qN!987bXUXNm5K>%x*)bti$qbxQsm#HQYf{pojXVOj=;2xg`66+g6X-tY=34?vtNI^>FN)E^#V!& zv~F;_1A8Xp%QA)lVHyYvOxwVYiz>T?xNY0)?dYN7u^sGq`RzB-tIX8^LYP>q*XMT? zrmpMR>Ziqh0x2cF?-K+8XRm$3WTnsmU@1u;r9?@Hq{h*4UR}GNxShl>3>p#{ zx;Gs`YfThIl*?sGr6R}A_t5vtQC#t`1cV4Zt}7L(NNS=`<5fHke7=oKg>xvS&|0IE zA`C-{#UfMFcRAeu4*i#o;+P4h?-a)XWy*OfxwXlz$n=&=xgb|RoM&+KEAs9d>YNAg zJdaYT#GjKlIrQyYT)K6RDAZ)!CN2+7d{UfH7fitL{Bqd#Z1$C6aSkOH8Xkl`L!&3j z)U2e|bQv4J$e~kjQkc9-B*978Bt-4h&%M)oR6u9~x;&+RYg}n>P3IC>-}jM$Mo9?6 zkdZ%5Q}N0i8~Tu$;uMAf@uWp_QymX zsL*Ob)WTd)c|2*+Soa_oPELF}db-k$W*$&xb>5uFCo23@8i*y$M_bw&bG6HC>>6-V zCN=dIDK}0!vkbgMW$?4{k8XVL_W(W+0>&aE0mOkCAd_5fbmZ67bUyTWvMo_>x++4> zP6XpOFZ?}x`(pTo^tcSn0rP-dER7{QNdOiQtGZQnRRsh~!Bva`_y_%#tFU>{Dfj>Y N002ovPDHLkV1mlL*&P4? literal 0 HcmV?d00001 diff --git a/plugins/YammerImport/css/icon_processing.gif b/plugins/YammerImport/css/icon_processing.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0bce1542342e912da81a2c260562df172f30d73 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nnmm28Kh24mmkF0U1e2Nli^nlO|14{Lk&@8WQa67~pE8 zXTZz|lvDgC+Z`3#dv5h=E26FfcG1 zbL_hF&)}42ws10s6^G;;cE1^EoUR)U5A70}d2pLv!jVIT7j&Z~EblI3x0K*v_sV|m z0kj3v921Z^em#l`(k(o@H$3ZdDRc@9NidXDNbqrumReCGv$gd8+e8WW28HVqkJ_9i zH>s*<31KtHjANIPvi2#*6BEu%3Dak5O_t&NBI)H?V$TxT}#l{vOTn5naXTfF^&~Hhq+NX@#Ccc>y7T?;vjI&jdhsDsPJyAw*m0Qz>i}K7# zL9w50Ng{fT}A5JUe8lRK1h7_Y2;BWJDd=c6f&i?Wv5(5q?6|P zQw{>maxZP<537OA37Uk}7@%_$4o$EWe_Zl>&#id|lE-BpDC#+Fn|msJ%_2h{Hg1vP z#N8WAzfWasG}yq|xqE)DrWaOofX=z|?*pgc%{ig5vl!pqDlC|q&~Z0$&Rvsft&VO- z4MZj+%-+Vx%W}v;V76hyp=;+R;x+~t^Q%*xuFTQAF2})fSfTHDAs>sO!OBw`)&)o$ c0!CNZt))x~rAZP^^P&YOFfdqy5)K#u0POD40{{R3 literal 0 HcmV?d00001 -- 2.39.5