From ca51ebc08c9d9e16427f494b86e6427e117de0d1 Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Thu, 10 Jan 2013 18:00:58 +0800 Subject: [PATCH] apply view --- .../images/module/default_widgets/style01.png | Bin 0 -> 1825 bytes .../images/module/default_widgets/style02.png | Bin 0 -> 2187 bytes .../images/module/default_widgets/style03.png | Bin 0 -> 2183 bytes .../images/module/default_widgets/style04.png | Bin 0 -> 2154 bytes .../images/module/default_widgets/style05.png | Bin 0 -> 2142 bytes app/helpers/admin/page_parts_helper.rb | 25 ++++++ .../_default_widget_setting.html.erb | 18 ++++ .../_default_widget_style_panel.html.erb | 45 ++++++++++ .../admin/page_parts/_module_widget.html.erb | 80 ++++++++---------- .../_widget_data_source_category.html.erb | 12 +++ .../_widget_data_source_tag.html.erb | 12 +++ .../admin/page_parts/_widget_setting.html.erb | 7 ++ .../_widget_categories.html.erb | 0 .../_widget_fields.html.erb | 0 .../_widget_options.html.erb | 0 .../{ => old_partials}/_widget_tags.html.erb | 0 config/locales/zh_tw.yml | 18 ++++ 17 files changed, 172 insertions(+), 45 deletions(-) create mode 100755 app/assets/images/module/default_widgets/style01.png create mode 100755 app/assets/images/module/default_widgets/style02.png create mode 100755 app/assets/images/module/default_widgets/style03.png create mode 100755 app/assets/images/module/default_widgets/style04.png create mode 100755 app/assets/images/module/default_widgets/style05.png create mode 100644 app/views/admin/page_parts/_default_widget_setting.html.erb create mode 100644 app/views/admin/page_parts/_default_widget_style_panel.html.erb create mode 100644 app/views/admin/page_parts/_widget_data_source_category.html.erb create mode 100644 app/views/admin/page_parts/_widget_data_source_tag.html.erb create mode 100644 app/views/admin/page_parts/_widget_setting.html.erb rename app/views/admin/page_parts/{ => old_partials}/_widget_categories.html.erb (100%) rename app/views/admin/page_parts/{ => old_partials}/_widget_fields.html.erb (100%) rename app/views/admin/page_parts/{ => old_partials}/_widget_options.html.erb (100%) rename app/views/admin/page_parts/{ => old_partials}/_widget_tags.html.erb (100%) diff --git a/app/assets/images/module/default_widgets/style01.png b/app/assets/images/module/default_widgets/style01.png new file mode 100755 index 0000000000000000000000000000000000000000..ff8c4cd6ec47550698c6e5c355de8d26c8bfde03 GIT binary patch literal 1825 zcmaJ?3s4hR6b<5Fr9cO@N*UB`02PIVgpinp03iVhV~~bGP!J8th6G49O%{Sti!Ba; zqC~A=fuVi|MM|++WB|iw3ZlqIN(DrVS``C@5(W_vhEF#L=uAs@cK7|xIrqMI&(5X? z2ko*nw>8ILFqW(UCI@X}jL%1A=zAkQauRJmL;S*#5Lkq$_zDO^7sAmHz>@M~AP&SA z9{Tbg z5G0O>m6UkZu9AW%uZ zR3>GS%Y+39Qb>j@a)s}?lx4X_D@f&NWG1ALBtk-e1uO;Tw+u>_&xN$C-U3&+d@khK>Komg` z(!=&e`&xWTKx$0Vt5Ph>R=@B^9+^)UDU=OzWz}6 zty}5+6AcrNg*J9J(?{>mD4n;so)5_av%u3}HhA_i@l-aiXjjqcj_Qt*4$`2e^Rk-r zaZ%dT>wVov1|<#1W#1Lf1-^L`-YcKpu;TGJF@}tj{`CmB@j-0a?$Spj4-XFuj#Exs zpU87l-gCKlYNjS<_m){F3a2me?csBA4`WNhGR#uwHzRTOZ$Z+Y*3i*0!=*tssFp}d}YG3ylDpSL{Dk~50hKEb=#W_t7)ojFEgEHtzM^A{GikB#h*)X zKK`P;ry5EO<;8gyeAQ6=i$=3*?Mjp8;%}_I_5J;g`x|C{>dv1t-;cAuVnXa*cqF3HZU5@&rL~5Nx)xwK_*O$j|W_3R!x_$(1GE5 z0)uCJ)|TdvojfJ=%T67-xuK$>qH(DCKva}|Y7&YH`T4u-4n?9$rJQkmJv%+DXm#M) z#Mj^(=~loh>M=VXD+Pwy_;p=CXV#UG$z%t~5s@KqYqgKQcHLyO-`pRUuEvQb>qX&$ z`zF1>s#B(myvE;Z?&)g7{O1h1af`o7+9OQ$cD)#*))G#ba;Na(NX||N+w&H2EoiI{ z*Ku#UEUL?Hf8HJ;_?Nc)V!5cl#L+7KscpTj^20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zh+^xc)!IbO7wXk(-rn_C#PGB}rV0a_fAnG+J@ zyyH0GlKiWoGN*W}u3w8LE8{#F|Hr2G5`5BF zn(2%BI>pgSd0SiC`4HpFJDRnKo`A#B9Zz znVF4DOlUh?yBmJn> z85}eYa(s|{@?)V~E^l_3FK(9C)ZnAVVv3X2p^BMTjkby>XY?P`4?2by%}$J2M-(+# z=hmry#hs1jmYCR3g_wW-{1oC>1#ZvL=Z6%2 zk4j6eltV+-U0429SRwT$?46F&Xsm>I?B=GQ&ZEq0PTC2~|VwYf)wgBLl(KT!NroTUF%oaTi(i z1Cp`4-ahZZOjy-?iH}Xs{g<<{3V+u1*9PwpvTsgzKy|HE-?K3b%7K5L+=zm72hN@_ Tv@7dT{~ma{)2Y|V$G-b7y^Wbu literal 0 HcmV?d00001 diff --git a/app/assets/images/module/default_widgets/style03.png b/app/assets/images/module/default_widgets/style03.png new file mode 100755 index 0000000000000000000000000000000000000000..5620f2bac6a7d61a2cf9a860ff001cf6daacdc38 GIT binary patch literal 2183 zcmaJ@c~leU77yZ6RJ1^qO_mVEjgVwQ77|GENCFihl0u4zU>lNwL`)_m0|}e7E-Xbr z+k+y-BVa8B7wW=Nk;MfBkzJtnfIeg`peW))0?M1H*!Rcd&6$~Rnfv?w?sva?zcZ=) zU0-(Kv;;@$PUO=bPWUZo|lgFb<=nZ z`n?Gp!N7cQDv-xVb08&%CgYr)L<9gpQz$rqM5a&xESg9FhT+iB5=xlPX3I3pGx1mHi?E z7gULqQUxr97TdwU*_?j={jLb(X^;xaG@15PRxBhhpr0%S6c>`vqYfCtfqMkR6pEyG|oY!qtwoEO(!p!sv+OsjWj zi21$D@*H*nI>p32((V|6aNQ)#6t`T}gIUeiywyKc_QS@=fy*8XoEFc5kcucEjdH8@ zTm5w@0ojIZ*65aVGgVJqANNmZ}P6yef^O;{crwysX18D_q-K%%JKBh^VQX(p;rPYI9u0iFNX-a zY^FwE>4oIu;pdIn5|Xx2UhaQa&#KKLwtVW=X4Z~PCQwF3Mz#3bqw=Ykk{(CQi4=q7 z%WjXnN^NZP8ZNSl(P)fjZ%moppmRa#0d3g9_)PjATkpIIy^PB%%!zres z@~#~)ir4sU%G-b3-@-oZh4H4sieGGNwC2ADd*U`7UU{Plq{M&O_KhXaq4;W7*HE>$m;=fdQ*SmbjObSfC$cn#WS7RZ4Ha{PX#bWsm zX}<JC?kNx&$ly=GhBZkxY?F#7dG#J-%ql9 zIyN>|CvoukFW3eQwEdy@1b;n`tw%9-VED-_B%cj zg86#n7z_o$x`*9&#>XQf6^gtPxtp7tco1%|3BkWWf;2WYb#;Gqa;fQ2E&D`T+M3Iw zqrcT2c4Q_yWkuF)@s_exl6CpCyAQ3GJ-4t9K1+I+W46U7LZ|=Xi>?=1yy_plV@#Kd zt}}c4emc8c9yQ5qGLT2v;y4vu33rRhkJH1p@gAJ)C<&kt=@v8{CWB`B@Qr<(Ytr7n z)7=K%QcpzX$Z(t0ZRSW~Z=oSpS<%&Z=(7v|3Yf|N-bx-d5}*#HD6^;c?EE~3qcUi= zL-Zabn3UgezGR%^e1Ew2$rFF$HM1q}R=F6QY+HjhLKl-2DbQZ zf7(-|Zp^nRf4ACj)o4%Rn*v=8)u+PrX1_uYctTn3}QaYqZ7V@{IynUOn9n@>H z)@~eF8{ckwgq=TGK)W@7B!1AP`aLCj%c}A#``tS;zdk?R(b2(*t_-1$O-%S)EGe0h zT|)h32q!&mv#wqF=H;MQyJY&u5RhnNlk literal 0 HcmV?d00001 diff --git a/app/assets/images/module/default_widgets/style04.png b/app/assets/images/module/default_widgets/style04.png new file mode 100755 index 0000000000000000000000000000000000000000..1ea44651f6deb3da38994a9c0be1adfbc488f242 GIT binary patch literal 2154 zcmaJ?c~lek7LEo5K{42hB343BM3Jl{KuSWh7(@vmn;?s386bp7VlqgGoG4U8ARL~L zQWOdZ9F9jUQsk*DRjgJ)S;Pe&BJdSWv7?HE^U<2(9gMy?nP!dlLAQ(a^A3*znyjUO* z;0cqDJp?=v2qZ=n90rAPeW?N|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#Vex3_T4Q5lm1S>KbS@LDXzlI} zX<4_ek9Cw-|4ZJg6=fbqKg4bRX3@yvD#2AfzS^pgr7-J&{p(Qh>}*3RN<&IWjJ@(@ zME{A@>VG?)fuHmbqtLz5wZ)NR*->WVnxTnr=Uw^IAw!h2;fHS=HE{58mSrB_={0)K z^mC+@J)@GzRu~Y`|8i6k(=*zccFLGwoTW|fPLrAyHyTN>XHuumlTHt`LeADKn5$`# zrcEQ6aMi`lqmsIp>d~FoUhdgQM1`N6DX)*bYG=swb!4TlWxuey?c{gqU7Z?p!S|Xk zMb?R&hgGA6yT(wT*EaO?;Gq2nE&VpJ`gR;{W$K-zCt(LS_1P(^Z+g%O$re7TDD1S2iieJ0g`Ezr-$=Nyn<>12aL$9=l(9#+#wmm$m%U$EB hBN)FQP1AGEcMz>PlNl4*osjYG@3YsBeU*7M?Y~epknI2f literal 0 HcmV?d00001 diff --git a/app/assets/images/module/default_widgets/style05.png b/app/assets/images/module/default_widgets/style05.png new file mode 100755 index 0000000000000000000000000000000000000000..bcb38f2526d8e47db228abef83627e882f3d4c45 GIT binary patch literal 2142 zcmaJ?YgiLk8jgxo#l)B;*1l;T{%9SaAh0Boh)anUD++C>INhTmq%a zQWOf3`cPUcTESXH)~xUdT1=qOu+&E(R1}b zomUkYfSe~2Ng)v^K^YafNnkoeLBmdeOF=AsCo7S^ohEp~unMjei^t%MDXjuotUrf} z#qZE^CIQn zO+>jK6iN7CrhMNDp2Z@CO5_k%!UIAX6f~@W5sCODZ#pwD(1%X&4j?e_cqZWhfrtz6 zA_U?I0d!&j6SvA`fV^}uAc0o7{NK5rYjTaHAeO?B8GuZb0q}!lpcu81GD)M=gPD_gkpuJ8c~T6T@Q9U&QL<40WDiw>H9 zFuBd${hGc&SacU{D9mdm`OO~MOP#3&+CO@kt3FzCrrUC4HmjlUMULRp%ca2~F5AHU z)nTpin0(jjFm1{=r29fIlc|qRp0pg3UC(=!bJOw2rTMm=N1;uFQRx=T5~>{!aUxv}t8=9iqOS7+84?2)Zs zNxnVYD`@+B+mAnlygA;`zw_01+20z#v)_%|$HwZOz9dz@F7{8Hbe~>6Sk~3(Qi)$U z?r?$wBK(toL@h`!h4|}G&4i$PdgqYHG!I(dJYIIaJU+zK9IEL(w(wcwEw8#T4xm&j z-CNud?eu&EO|LA_jy_oTxK$%K7qbiTP^I3S6ODVHC-HZrU!V^;-W>jT^xl<>oE&$7 zK=8#W<_{^}ct5`ne5{)9RGqG>s^Z)UgP6?gdXqt^+x{QCB?Pj$N3%W8Gy zG_`XIqRvM2tKaDL{>Q}P-P3h-b$_WWZjJEK)jpJ1O;1l>+comS%F)50tfFG8D)`a4 z*j_g4&FJ4!o12@vbsc#XR)d3sKRthbYV7;UlnP4!mM@1)W14>9A3aN#Z_(q>BAFW_c?Xd4DH#or@U=(Ztf~Ju{@Pt)+s;7o3luW z-y9no8=sI+T2xfjke98<%fn=3WR%~qg+Gc@fyL1BxGg#5n_41`cIoA-EvXb_g)K8O zGExy7Tx?5L^h{U;n^jT6r}7iS)ZJeskN4X>KR;lj+#Y16fy48(Uw<-yU8fE6Y_a@g zpxiDHcB=CIN3PkgcAZy(h9__`WB;GWpIFqwNhEJlu$`QXpIB%uj4xLBh_I;|1okTa zPx<Cc}h6qs7z`wtEM>v7j81AVff!#U8SPLrY$RE5o1PHs+k%sJ82 z^u~T(&{TL!@3+)v+f=o&>$~e7&Sdz>W31|FHW3EAYfW_Z znL_mr>(NH_#oUQPrz?gB{~7FcxkeU$s5Sq*wYa3`(QLH0;Z?UeX2xm~nX7t1cOYl0 zs3$`@S~zZZW!GP;IBvdQ>7EMDeSh@g(`^RK=~Dp{m8RQsBS`hj_oqD7Cf11hMx"radio inline" do + op = radio_button("page_part", tag_or_cate, nil, :checked => eval("#{tag_or_cate}_checked_value(part,nil)")) + op << I18n.t("default_widget.no_value") + end + end + + def show_default_widget_setting_panel + binding.pry + false + end + + def show_custom_widget_setting_panel + end end \ No newline at end of file diff --git a/app/views/admin/page_parts/_default_widget_setting.html.erb b/app/views/admin/page_parts/_default_widget_setting.html.erb new file mode 100644 index 00000000..5f001851 --- /dev/null +++ b/app/views/admin/page_parts/_default_widget_setting.html.erb @@ -0,0 +1,18 @@ + + + + + +<% @module_app.widget_fields.each_with_index do |widget_field, i| %> + <%= i+1 %> + <%= select_tag "page_part[widget_field][]", widget_field_options(i), :include_blank => true %> + <%= select_tag "page_part[widget_field_type][]", widget_fiield_type_options(i), :include_blank => true %>
+<% end %> +

+ + <%= label_tag t("default_widget.widget_data_count") %> + <%= text_field_tag :widget_data_count,@part.widget_data_count %> + +
+ +
diff --git a/app/views/admin/page_parts/_default_widget_style_panel.html.erb b/app/views/admin/page_parts/_default_widget_style_panel.html.erb new file mode 100644 index 00000000..b6a60139 --- /dev/null +++ b/app/views/admin/page_parts/_default_widget_style_panel.html.erb @@ -0,0 +1,45 @@ + +
+
    +
  • + + <%=image_tag 'module/default_widgets/style01.png'%> + <%= t("default_widget.caption.typeA") %> +
  • +
  • + + <%=image_tag 'module/default_widgets/style02.png'%> + <%= t("default_widget.caption.typeA") %> +
  • +
  • + + <%=image_tag 'module/default_widgets/style03.png'%> + <%= t("default_widget.caption.typeB_style3") %> +
  • +
  • + + <%=image_tag 'module/default_widgets/style04.png'%> + <%= t("default_widget.caption.typeB_style4") %> +
  • +
  • + + <%=image_tag 'module/default_widgets/style05.png'%> + <%= t("default_widget.caption.typeC") %> +
  • +
+
\ No newline at end of file diff --git a/app/views/admin/page_parts/_module_widget.html.erb b/app/views/admin/page_parts/_module_widget.html.erb index a1cec8d0..77590997 100644 --- a/app/views/admin/page_parts/_module_widget.html.erb +++ b/app/views/admin/page_parts/_module_widget.html.erb @@ -1,51 +1,41 @@ -
- <%= f.fields_for :title_translations do |f| %> - <% @site_valid_locales.each do |locale| %> -

- <%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %> - <%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil) %> -

- <% end %> -<% end %> -
+
+
+ <%= f.fields_for :title_translations do |f| %> + <% @site_valid_locales.each do |locale| %> +

+ <%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %> + <%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil),:size=>30 %> +

+ <% end %> + <% end %> +
- - <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> - +

+ + <%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> +

+ +

+ + <%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> +

- - <%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %> - <%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> - +
+
+ <%= render :partial => 'widget_data_source_category' %> +
+
+ <%= render :partial => 'widget_data_source_tag' %> +
- - <%#= f.select :widget_style, @widget_style, :selected => @part.widget_style %> - <%= select('page_part','widget_style', @widget_style, :selected => @part[:widget_style], :include_blank => true ) rescue ''%> - + +
-: +
+ <%= render :partial => 'widget_setting' %> +
+ - - - <%= render 'widget_fields' %> - - <%#= f.label :widget_field %> - <%# @module_app.widget_fields.each_with_index do |widget_field, i| %> - <%#= i+1 %> - <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part.widget_field ? @part.widget_field[i] : nil) ), :include_blank => true %>
- <%# end %> - - <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %> -
- - - <%= render 'widget_options' %> - +
\ No newline at end of file diff --git a/app/views/admin/page_parts/_widget_data_source_category.html.erb b/app/views/admin/page_parts/_widget_data_source_category.html.erb new file mode 100644 index 00000000..15cec6c2 --- /dev/null +++ b/app/views/admin/page_parts/_widget_data_source_category.html.erb @@ -0,0 +1,12 @@ + +<% if @categories %> +
+ <%= nil_radio_button(@part,:category) %> + <%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%> + <%= radio_button("page_part", "category", category.id, :checked => category_checked_value(@part,category.id) )%> + <%= category.title%> + <% end %> +
+<% else %> + <%= t("default_widget.no_support_setting")%> +<% end %> \ No newline at end of file diff --git a/app/views/admin/page_parts/_widget_data_source_tag.html.erb b/app/views/admin/page_parts/_widget_data_source_tag.html.erb new file mode 100644 index 00000000..c54657ec --- /dev/null +++ b/app/views/admin/page_parts/_widget_data_source_tag.html.erb @@ -0,0 +1,12 @@ + +<% if @categories %> +
+ <%= nil_radio_button(@part,:tag) %> + <%= content_tag_for(:label, @tags,:class=>"radio inline") do |tag|%> + <%= radio_button("page_part", "tag", tag.id, :checked => tag_checked_value(@part,tag.id) )%> + <%= tag[I18n.locale]%> + <% end %> +
+<% else %> + <%= t("default_widget.no_support_setting")%> +<% end %> \ No newline at end of file diff --git a/app/views/admin/page_parts/_widget_setting.html.erb b/app/views/admin/page_parts/_widget_setting.html.erb new file mode 100644 index 00000000..75ac6a50 --- /dev/null +++ b/app/views/admin/page_parts/_widget_setting.html.erb @@ -0,0 +1,7 @@ +<% if show_default_widget_setting_panel %> +
+ <%= render :partial => 'default_widget_style_panel',:locals=>{:f=>f} %> + <%= render :partial => 'default_widget_setting' %> +
+<% elsif show_custom_widget_setting_panel %> +<% end %> diff --git a/app/views/admin/page_parts/_widget_categories.html.erb b/app/views/admin/page_parts/old_partials/_widget_categories.html.erb similarity index 100% rename from app/views/admin/page_parts/_widget_categories.html.erb rename to app/views/admin/page_parts/old_partials/_widget_categories.html.erb diff --git a/app/views/admin/page_parts/_widget_fields.html.erb b/app/views/admin/page_parts/old_partials/_widget_fields.html.erb similarity index 100% rename from app/views/admin/page_parts/_widget_fields.html.erb rename to app/views/admin/page_parts/old_partials/_widget_fields.html.erb diff --git a/app/views/admin/page_parts/_widget_options.html.erb b/app/views/admin/page_parts/old_partials/_widget_options.html.erb similarity index 100% rename from app/views/admin/page_parts/_widget_options.html.erb rename to app/views/admin/page_parts/old_partials/_widget_options.html.erb diff --git a/app/views/admin/page_parts/_widget_tags.html.erb b/app/views/admin/page_parts/old_partials/_widget_tags.html.erb similarity index 100% rename from app/views/admin/page_parts/_widget_tags.html.erb rename to app/views/admin/page_parts/old_partials/_widget_tags.html.erb diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 9de7cc63..2ed3225e 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -150,6 +150,23 @@ zh_tw: deadline: 最後期限 default: Default default_css: 預設樣式表 + default_widget: + no_support_setting: 沒有可以使用的設定 + no_value: 不設定(全部) + fields_order: 輸出欄位順序 + select_module_app: 外掛模組選擇 + select_widget_path: 外掛樣版選擇 + select_widget_style: 排版樣式 + widget_data_count: 模組輸出則數 + caption: + typeA: 表格式排版,簡單明瞭呈現內容 + typeB_style2: 一圖一文式,輸出欄位水平排列 + typeB_style3: 一圖一文式,輸出欄位垂直排列,圖片在左方 + typeB_style4: 一圖一文式,輸出欄位垂直排列,圖片在右方 + typeC: 一圖多文式,輸出欄位垂直排列 + data_source: + category: 資料來源:類別 + tag: 資料來源:標籤 delete: file: 刪除檔案 success: @@ -407,3 +424,4 @@ zh_tw: visitors_this_year: 今年造訪人次 visitors_today: 今日造訪人次 yes_: "是" +