[Mobo-dev] Re: 月表示の構成

Back to archive index

Koichiro Ohba koich****@meado*****
2004年 1月 28日 (水) 18:11:49 JST


>>>>> <ubroo****@jelly*****>
>>>>>  Koichiro Ohba <koich****@meado*****> 曰く:

> 参考までに上記変更をしたパッチを添付します。

すみません。パッチの encoding が壊れていたので再送します。

-------------- next part --------------
Index: skel/month.rhtml
===================================================================
RCS file: /cvsroot/mobo/mobo/skel/month.rhtml,v
retrieving revision 1.24
diff -c -r1.24 month.rhtml
*** skel/month.rhtml    9 Nov 2003 05:52:56 -0000       1.24
--- skel/month.rhtml    28 Jan 2004 09:10:05 -0000
***************
*** 2,17 ****
    <table>
      <tr valign="top">
        <td>
        <table class="total">
!         <caption class="total"><%= "#{year}/#{month}" %>の支出</caption>
          <tr>
!           <th></th><th>(通常)</th><th>(全て)</th>
          </tr>
!         <% t1 = 0; t2 = 0; genre_expense.each do |genre| %>
          <tr>
!           <th class="diary"><a href="<%=****@conf***** %>?genre=<%= CGI::escape("e:#{genre}") %>&amp;date=<%= year + month %>"><%= genre %></a></th>
!           <td class="diary" align="right"><% p = -genre_total( year + month, "e:#{genre}", nil, account ); t1 += p %><%= p.to_disp_str %></td>
!           <td class="diary" align="right"><% p = -genre_total( year + month, "e:#{genre}", 1, account ); t2 += p %><%= p.to_disp_str %></td>
          </tr>
          <% end %>
          <tr>
--- 2,34 ----
    <table>
      <tr valign="top">
        <td>
+          <% if vaccount_name.length > 0 %>
+          <table class="total">
+            <caption class="total">仮想口座の残高</caption>
+         <tr>
+           <th>仮想口座</th><th>(現在)</th><th>(いずれ)</th>
+         </tr>
+         <% vaccount_name.each do |vaccount| %>
+         <tr>
+           <th class="diary"><a href="<%=****@conf***** %>?account=<%= CGI::escape( vaccount ) %>&amp;date=<%= year + month %>"><%= vaccount %></a></th>
+           <td class="diary" align="right"><%= balance( Time.now.strftime( '%Y%m%d' ), vaccount ).to_disp_str %></td>
+           <td class="diary" align="right"><%= grand_total( vaccount ).to_disp_str %></td>
+         </tr>
+         <% end %>
+         </table>
+         <% end %>
+       </td>
+       <td>
        <table class="total">
!         <caption class="total">各口座の残高</caption>
          <tr>
!           <th></th><th>(現在)</th><th>(いずれ)</th>
          </tr>
!         <% t1 = 0; t2 = 0; account_list.each do |account| %>
          <tr>
!           <th class="diary"><a href="<%=****@conf***** %>?account=<%= CGI::escape(account) %>&amp;date=<%= year + month %>"><%= account %></a></th>
!           <td class="diary" align="right"><% p = balance( Time.now.strftime( '%Y%m%d' ), account ); t1 += p %><%= p.to_disp_str %></td>
!           <td class="diary" align="right"><% p = grand_total( account_regexp( account ) ); t2 += p %><%= p.to_disp_str %></td>
          </tr>
          <% end %>
          <tr>
***************
*** 23,37 ****
        </td>
        <td>
        <table class="total">
!         <caption class="total"><%= "#{year}/#{month}" %>の収入</caption>
          <tr>
            <th></th><th>(通常)</th><th>(全て)</th>
          </tr>
!         <% t1 = 0; t2 = 0; genre_income.each do |genre| %>
          <tr>
!           <th class="diary"><a href="<%=****@conf***** %>?genre=<%= CGI::escape("i:#{genre}") %>&amp;date=<%= year + month %>"><%= genre %></a></th>
!           <td class="diary" align="right"><% p = genre_total( year + month, "i:#{genre}", nil, account ); t1 += p %><%= p.to_disp_str %></td>
!           <td class="diary" align="right"><% p = genre_total( year + month, "i:#{genre}", 1, account ); t2 += p %><%= p.to_disp_str %></td>
          </tr>
          <% end %>
          <tr>
--- 40,54 ----
        </td>
        <td>
        <table class="total">
!         <caption class="total"><%= "#{year}/#{month}" %>の支出</caption>
          <tr>
            <th></th><th>(通常)</th><th>(全て)</th>
          </tr>
!         <% t1 = 0; t2 = 0; genre_expense.each do |genre| %>
          <tr>
!           <th class="diary"><a href="<%=****@conf***** %>?genre=<%= CGI::escape("e:#{genre}") %>&amp;date=<%= year + month %>"><%= genre %></a></th>
!           <td class="diary" align="right"><% p = -genre_total( year + month, "e:#{genre}", nil, account ); t1 += p %><%= p.to_disp_str %></td>
!           <td class="diary" align="right"><% p = -genre_total( year + month, "e:#{genre}", 1, account ); t2 += p %><%= p.to_disp_str %></td>
          </tr>
          <% end %>
          <tr>
***************
*** 43,57 ****
        </td>
        <td>
        <table class="total">
!         <caption class="total">各口座の残高</caption>
          <tr>
!           <th></th><th>(現在)</th><th>(いずれ)</th>
          </tr>
!         <% t1 = 0; t2 = 0; account_list.each do |account| %>
          <tr>
!           <th class="diary"><a href="<%=****@conf***** %>?account=<%= CGI::escape(account) %>&amp;date=<%= year + month %>"><%= account %></a></th>
!           <td class="diary" align="right"><% p = balance( Time.now.strftime( '%Y%m%d' ), account ); t1 += p %><%= p.to_disp_str %></td>
!           <td class="diary" align="right"><% p = grand_total( account_regexp( account ) ); t2 += p %><%= p.to_disp_str %></td>
          </tr>
          <% end %>
          <tr>
--- 60,74 ----
        </td>
        <td>
        <table class="total">
!         <caption class="total"><%= "#{year}/#{month}" %>の収入</caption>
          <tr>
!           <th></th><th>(通常)</th><th>(全て)</th>
          </tr>
!         <% t1 = 0; t2 = 0; genre_income.each do |genre| %>
          <tr>
!           <th class="diary"><a href="<%=****@conf***** %>?genre=<%= CGI::escape("i:#{genre}") %>&amp;date=<%= year + month %>"><%= genre %></a></th>
!           <td class="diary" align="right"><% p = genre_total( year + month, "i:#{genre}", nil, account ); t1 += p %><%= p.to_disp_str %></td>
!           <td class="diary" align="right"><% p = genre_total( year + month, "i:#{genre}", 1, account ); t2 += p %><%= p.to_disp_str %></td>
          </tr>
          <% end %>
          <tr>
***************
*** 59,121 ****
            <td class="diary" align="right"><%= t1.to_disp_str %></td>
            <td class="diary" align="right"><%= t2.to_disp_str %></td>
          </tr>
-         <% if vaccount_name.length > 0 %>
-         <tr>
-           <th>仮想口座</th><th>(現在)</th><th>(いずれ)</th>
-         </tr>
-         <% vaccount_name.each do |vaccount| %>
-         <tr>
-           <th class="diary"><a href="<%=****@conf***** %>?account=<%= CGI::escape( vaccount ) %>&amp;date=<%= year + month %>"><%= vaccount %></a></th>
-           <td class="diary" align="right"><%= balance( Time.now.strftime( '%Y%m%d' ), vaccount ).to_disp_str %></td>
-           <td class="diary" align="right"><%= grand_total( vaccount ).to_disp_str %></td>
-         </tr>
-         <% end %>
-         <% end %>
        </table>
        </td>
      </tr>
    </table>
!   <div class="day">
!   <h2><span class="date"><%= "#{year}/#{month}" %>の明細</span></h2>
!   <div class="body">
!   <div class="section">
!   <h3><span class="sanchor">_</span>収入・支出</h3>
!   <table class="diary">
!     <tr><th>日</th><th>分類</th><th>入金額</th><th>出金額</th><th>口座</th><th>メモ</th><th>特別?</th></tr>
!     <% monthly( year + month ).each_notmove_item( 'account' => account_regexp( account ), 'genre' => genre ) do |item| %>
!     <tr>
!       <td class="diary"><%= item.date %></td>
!       <td class="diary"><%= CGI::escapeHTML(item.genre) %></td>
!       <td class="diary" align="right"><%= item.price > 0 ? item.price.to_disp_str : '' %></td>
!       <td class="diary" align="right"><%= item.price < 0 ? (-item.price).to_disp_str : '' %></td>
!       <td class="diary"><%= CGI::escapeHTML(item.account) %></td>
!       <td class="diary"><%= CGI::escapeHTML(item.note) %></td>
!       <td class="diary"><%= item.special %></td>
!     </tr>
!     <% end %>
!   </table>
!   </div>
!   <div class="section">
!   <h3><span class="sanchor">_</span>移動</h3>
!   <table class="diary">
!     <tr><th>日</th><th>分類</th><th>入金額</th><th>出金額</th><th>口座</th><th>メモ</th><th>特別?</th></tr>
!     <% monthly( year + month ).each_move_item( 'account' => account_regexp( account ), 'genre' => genre ) do |item| %>
!     <tr>
!       <td class="diary"><%= item.date %></td>
!       <td class="diary"><%= CGI::escapeHTML(item.genre) %></td>
!       <td class="diary" align="right"><%= item.price > 0 ? item.price.to_disp_str : '' %></td>
!       <td class="diary" align="right"><%= item.price < 0 ? (-item.price).to_disp_str : '' %></td>
!       <td class="diary"><%= CGI::escapeHTML(item.account) %></td>
!       <td class="diary"><%= CGI::escapeHTML(item.note) %></td>
!       <td class="diary"><%= item.special %></td>
!     </tr>
!     <% end %>
!   </table>
!   </div>
!   </div>
!   <div class="referer">
!   </div>
!   </div>

    <% d = month == (Time.now + (@conf.hour_offset * 3600).to_i).strftime( '%m' ) ? (Time.now + (@conf.hour_offset * 3600).to_i).strftime( '%d' ) : '' %>
    <form method="POST" action="<%=****@conf***** %>">
--- 76,87 ----
            <td class="diary" align="right"><%= t1.to_disp_str %></td>
            <td class="diary" align="right"><%= t2.to_disp_str %></td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
!
!   <!-- input form -->

    <% d = month == (Time.now + (@conf.hour_offset * 3600).to_i).strftime( '%m' ) ? (Time.now + (@conf.hour_offset * 3600).to_i).strftime( '%d' ) : '' %>
    <form method="POST" action="<%=****@conf***** %>">
***************
*** 213,217 ****
--- 179,227 ----
        <input type="submit" value=" 追加 ">
      </p>
    </form>
+
+   <!-- description -->
+   <div class="day">
+   <h2><span class="date"><%= "#{year}/#{month}" %>の明細</span></h2>
+   <div class="body">
+   <div class="section">
+   <h3><span class="sanchor">_</span>収入・支出</h3>
+   <table class="diary">
+     <tr><th>日</th><th>分類</th><th>入金額</th><th>出金額</th><th>口座</th><th>メモ</th><th>特別?</th></tr>
+     <% monthly( year + month ).each_notmove_item( 'account' => account_regexp( account ), 'genre' => genre ) do |item| %>
+     <tr>
+       <td class="diary"><%= item.date %></td>
+       <td class="diary"><%= CGI::escapeHTML(item.genre) %></td>
+       <td class="diary" align="right"><%= item.price > 0 ? item.price.to_disp_str : '' %></td>
+       <td class="diary" align="right"><%= item.price < 0 ? (-item.price).to_disp_str : '' %></td>
+       <td class="diary"><%= CGI::escapeHTML(item.account) %></td>
+       <td class="diary"><%= CGI::escapeHTML(item.note) %></td>
+       <td class="diary"><%= item.special %></td>
+     </tr>
+     <% end %>
+   </table>
+   </div>
+   <div class="section">
+   <h3><span class="sanchor">_</span>移動</h3>
+   <table class="diary">
+     <tr><th>日</th><th>分類</th><th>入金額</th><th>出金額</th><th>口座</th><th>メモ</th><th>特別?</th></tr>
+     <% monthly( year + month ).each_move_item( 'account' => account_regexp( account ), 'genre' => genre ) do |item| %>
+     <tr>
+       <td class="diary"><%= item.date %></td>
+       <td class="diary"><%= CGI::escapeHTML(item.genre) %></td>
+       <td class="diary" align="right"><%= item.price > 0 ? item.price.to_disp_str : '' %></td>
+       <td class="diary" align="right"><%= item.price < 0 ? (-item.price).to_disp_str : '' %></td>
+       <td class="diary"><%= CGI::escapeHTML(item.account) %></td>
+       <td class="diary"><%= CGI::escapeHTML(item.note) %></td>
+       <td class="diary"><%= item.special %></td>
+     </tr>
+     <% end %>
+   </table>
+   </div>
+   </div>
+   <div class="referer">
+   </div>
+   </div>
+
    <hr class="sep">
    <%=****@conf***** %>
-------------- next part --------------
--
koichiro <koich****@meado*****>


Mobo-dev メーリングリストの案内
Back to archive index