diff options
Diffstat (limited to 'vendor/plugins/gloc-1.1.0/doc/classes/ActionView')
3 files changed, 689 insertions, 0 deletions
diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html new file mode 100644 index 000000000..00767055d --- /dev/null +++ b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Base.html @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: ActionView::Base</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">ActionView::Base</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+<tt>initialize</tt> is overridden so that new instances of this class
+inherit the current language of the controller.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000046">new</a>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="../GLoc.html">GLoc</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+ <div id="aliases-list">
+ <h3 class="section-bar">External Aliases</h3>
+
+ <div class="name-list">
+ <table summary="aliases">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">initialize</td>
+ <td>-></td>
+ <td class="context-item-value">initialize_without_gloc</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000046" class="method-detail">
+ <a name="M000046"></a>
+
+ <div class="method-heading">
+ <a href="#M000046" class="method-signature">
+ <span class="method-name">new</span><span class="method-args">(base_path = nil, assigns_for_first_render = {}, controller = nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000046-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 109</span>
+109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base_path</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">assigns_for_first_render</span> = {}, <span class="ruby-identifier">controller</span> = <span class="ruby-keyword kw">nil</span>)
+110: <span class="ruby-identifier">initialize_without_gloc</span>(<span class="ruby-identifier">base_path</span>, <span class="ruby-identifier">assigns_for_first_render</span>, <span class="ruby-identifier">controller</span>)
+111: <span class="ruby-identifier">set_language</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">current_language</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">nil?</span>
+112: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html new file mode 100644 index 000000000..84ca8fae3 --- /dev/null +++ b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/DateHelper.html @@ -0,0 +1,348 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: ActionView::Helpers::DateHelper</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">ActionView::Helpers::DateHelper</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/gloc-rails-text_rb.html">
+ lib/gloc-rails-text.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000041">distance_of_time_in_words</a>
+ <a href="#M000042">select_day</a>
+ <a href="#M000043">select_month</a>
+ <a href="#M000044">select_year</a>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+ <div id="constants-list">
+ <h3 class="section-bar">Constants</h3>
+
+ <div class="name-list">
+ <table summary="Constants">
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_HELPERS</td>
+ <td>=</td>
+ <td class="context-item-value">true</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_MONTHNAMES</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">LOCALIZED_ABBR_MONTHNAMES</td>
+ <td>=</td>
+ <td class="context-item-value">{}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000041" class="method-detail">
+ <a name="M000041"></a>
+
+ <div class="method-heading">
+ <a href="#M000041" class="method-signature">
+ <span class="method-name">distance_of_time_in_words</span><span class="method-args">(from_time, to_time = 0, include_seconds = false)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method uses <tt>current_language</tt> to return a localized string.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000041-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 16</span>
+16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword kw">false</span>)
+17: <span class="ruby-identifier">from_time</span> = <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
+18: <span class="ruby-identifier">to_time</span> = <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
+19: <span class="ruby-identifier">distance_in_minutes</span> = (((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>)<span class="ruby-operator">/</span><span class="ruby-value">60</span>).<span class="ruby-identifier">round</span>
+20: <span class="ruby-identifier">distance_in_seconds</span> = ((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>).<span class="ruby-identifier">round</span>
+21:
+22: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_minutes</span>
+23: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">1</span>
+24: <span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">distance_in_minutes</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_less_than</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_single</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">include_seconds</span>
+25: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_seconds</span>
+26: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">5</span>)
+27: <span class="ruby-keyword kw">when</span> <span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">10</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">10</span>)
+28: <span class="ruby-keyword kw">when</span> <span class="ruby-value">11</span><span class="ruby-operator">..</span><span class="ruby-value">20</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_second_less_than</span>, <span class="ruby-value">20</span>)
+29: <span class="ruby-keyword kw">when</span> <span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">40</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_half</span>)
+30: <span class="ruby-keyword kw">when</span> <span class="ruby-value">41</span><span class="ruby-operator">..</span><span class="ruby-value">59</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute_less_than</span>)
+31: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute</span>)
+32: <span class="ruby-keyword kw">end</span>
+33:
+34: <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-value">45</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_minute</span>, <span class="ruby-identifier">distance_in_minutes</span>)
+35: <span class="ruby-keyword kw">when</span> <span class="ruby-value">46</span><span class="ruby-operator">..</span><span class="ruby-value">90</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_hour_about_single</span>)
+36: <span class="ruby-keyword kw">when</span> <span class="ruby-value">90</span><span class="ruby-operator">..</span><span class="ruby-value">1440</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_hour_about</span>, (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">60.0</span>).<span class="ruby-identifier">round</span>)
+37: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1441</span><span class="ruby-operator">..</span><span class="ruby-value">2880</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_day</span>, <span class="ruby-value">1</span>)
+38: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">lwr</span>(<span class="ruby-identifier">:actionview_datehelper_time_in_words_day</span>, (<span class="ruby-identifier">distance_in_minutes</span> <span class="ruby-operator">/</span> <span class="ruby-value">1440</span>).<span class="ruby-identifier">round</span>)
+39: <span class="ruby-keyword kw">end</span>
+40: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000042" class="method-detail">
+ <a name="M000042"></a>
+
+ <div class="method-heading">
+ <a href="#M000042" class="method-signature">
+ <span class="method-name">select_day</span><span class="method-args">(date, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method has been modified so that a localized string can be appended to
+the day numbers.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000042-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 43</span>
+43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_day</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
+44: <span class="ruby-identifier">day_options</span> = []
+45: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_day_prefix</span>
+46:
+47: <span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-value">31</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">day</span><span class="ruby-operator">|</span>
+48: <span class="ruby-identifier">day_options</span> <span class="ruby-operator"><<</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">day</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">day</span>) <span class="ruby-operator">?</span>
+49: <span class="ruby-node">%(<option value="#{day}" selected="selected">#{day}#{prefix}</option>\n)</span> <span class="ruby-operator">:</span>
+50: <span class="ruby-node">%(<option value="#{day}">#{day}#{prefix}</option>\n)</span>
+51: )
+52: <span class="ruby-keyword kw">end</span>
+53:
+54: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'day'</span>, <span class="ruby-identifier">day_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
+55: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000043" class="method-detail">
+ <a name="M000043"></a>
+
+ <div class="method-heading">
+ <a href="#M000043" class="method-signature">
+ <span class="method-name">select_month</span><span class="method-args">(date, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method has been modified so that
+</p>
+<ul>
+<li>the month names are localized.
+
+</li>
+<li>it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>,
+<tt>:start_month</tt>, <tt>:end_month</tt>
+
+</li>
+<li>a localized string can be appended to the month numbers when the
+<tt>:use_month_numbers</tt> option is specified.
+
+</li>
+</ul>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000043-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 61</span>
+61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_month</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
+62: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">current_language</span>)
+63: <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] = [<span class="ruby-value str">''</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_select_month_names</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>)
+64: <span class="ruby-constant">LOCALIZED_ABBR_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] = [<span class="ruby-value str">''</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">l</span>(<span class="ruby-identifier">:actionview_datehelper_select_month_names_abbr</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>)
+65: <span class="ruby-keyword kw">end</span>
+66:
+67: <span class="ruby-identifier">month_options</span> = []
+68: <span class="ruby-identifier">month_names</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:use_short_month</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">LOCALIZED_ABBR_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>] <span class="ruby-operator">:</span> <span class="ruby-constant">LOCALIZED_MONTHNAMES</span>[<span class="ruby-identifier">current_language</span>]
+69:
+70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:min_date</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:max_date</span>)
+71: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">year</span>
+72: <span class="ruby-identifier">start_month</span>, <span class="ruby-identifier">end_month</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">month</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">month</span>
+73: <span class="ruby-keyword kw">end</span>
+74: <span class="ruby-keyword kw">end</span>
+75: <span class="ruby-identifier">start_month</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_month</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">start_month</span>
+76: <span class="ruby-identifier">end_month</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_month</span>] <span class="ruby-operator">||</span> <span class="ruby-value">12</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">end_month</span>
+77: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_month_prefix</span>
+78:
+79: <span class="ruby-identifier">start_month</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">end_month</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">month_number</span><span class="ruby-operator">|</span>
+80: <span class="ruby-identifier">month_name</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:use_month_numbers</span>]
+81: <span class="ruby-node">"#{month_number}#{prefix}"</span>
+82: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:add_month_numbers</span>]
+83: <span class="ruby-identifier">month_number</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">' - '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">month_names</span>[<span class="ruby-identifier">month_number</span>]
+84: <span class="ruby-keyword kw">else</span>
+85: <span class="ruby-identifier">month_names</span>[<span class="ruby-identifier">month_number</span>]
+86: <span class="ruby-keyword kw">end</span>
+87:
+88: <span class="ruby-identifier">month_options</span> <span class="ruby-operator"><<</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">month</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">month_number</span>) <span class="ruby-operator">?</span>
+89: <span class="ruby-node">%(<option value="#{month_number}" selected="selected">#{month_name}</option>\n)</span> <span class="ruby-operator">:</span>
+90: <span class="ruby-node">%(<option value="#{month_number}">#{month_name}</option>\n)</span>
+91: )
+92: <span class="ruby-keyword kw">end</span>
+93:
+94: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'month'</span>, <span class="ruby-identifier">month_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
+95: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000044" class="method-detail">
+ <a name="M000044"></a>
+
+ <div class="method-heading">
+ <a href="#M000044" class="method-signature">
+ <span class="method-name">select_year</span><span class="method-args">(date, options = {})</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This method has been modified so that
+</p>
+<ul>
+<li>it uses options: <tt>:min_date</tt>, <tt>:max_date</tt>
+
+</li>
+<li>a localized string can be appended to the years numbers.
+
+</li>
+</ul>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000044-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails-text.rb, line 100</span>
+100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_year</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">options</span> = {})
+101: <span class="ruby-identifier">year_options</span> = []
+102: <span class="ruby-identifier">y</span> = <span class="ruby-identifier">date</span> <span class="ruby-value">? </span>(<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> (<span class="ruby-identifier">y</span> = (<span class="ruby-identifier">date</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>.<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">year</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>.<span class="ruby-identifier">year</span>
+103:
+104: <span class="ruby-identifier">start_year</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:min_date</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:min_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:start_year</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">5</span>)
+105: <span class="ruby-identifier">end_year</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:max_date</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_date</span>].<span class="ruby-identifier">year</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:end_year</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>)
+106: <span class="ruby-identifier">step_val</span> = <span class="ruby-identifier">start_year</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">end_year</span> <span class="ruby-value">? </span><span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">-1</span>
+107: <span class="ruby-identifier">prefix</span> = <span class="ruby-identifier">l</span> <span class="ruby-identifier">:actionview_datehelper_select_year_prefix</span>
+108:
+109: <span class="ruby-identifier">start_year</span>.<span class="ruby-identifier">step</span>(<span class="ruby-identifier">end_year</span>, <span class="ruby-identifier">step_val</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">year</span><span class="ruby-operator">|</span>
+110: <span class="ruby-identifier">year_options</span> <span class="ruby-operator"><<</span> ((<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">date</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">year</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">year</span>) <span class="ruby-operator">?</span>
+111: <span class="ruby-node">%(<option value="#{year}" selected="selected">#{year}#{prefix}</option>\n)</span> <span class="ruby-operator">:</span>
+112: <span class="ruby-node">%(<option value="#{year}">#{year}#{prefix}</option>\n)</span>
+113: )
+114: <span class="ruby-keyword kw">end</span>
+115:
+116: <span class="ruby-identifier">select_html</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:field_name</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'year'</span>, <span class="ruby-identifier">year_options</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:prefix</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:include_blank</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:discard_type</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:disabled</span>])
+117: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file diff --git a/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html new file mode 100644 index 000000000..a236e0e5d --- /dev/null +++ b/vendor/plugins/gloc-1.1.0/doc/classes/ActionView/Helpers/InstanceTag.html @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: ActionView::Helpers::InstanceTag</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">ActionView::Helpers::InstanceTag</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/gloc-rails-text_rb.html">
+ lib/gloc-rails-text.rb
+ </a>
+ <br />
+ <a href="../../../files/lib/gloc-rails_rb.html">
+ lib/gloc-rails.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+The private method <tt>add_options</tt> is overridden so that "Please
+select" is localized.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000045">current_language</a>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+ <div id="includes">
+ <h3 class="section-bar">Included Modules</h3>
+
+ <div id="includes-list">
+ <span class="include-name"><a href="../../GLoc.html">GLoc</a></span>
+ </div>
+ </div>
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000045" class="method-detail">
+ <a name="M000045"></a>
+
+ <div class="method-heading">
+ <a href="#M000045" class="method-signature">
+ <span class="method-name">current_language</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Inherits the current language from the template object.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000045-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/gloc-rails.rb, line 119</span>
+119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_language</span>
+120: <span class="ruby-ivar">@template_object</span>.<span class="ruby-identifier">current_language</span>
+121: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file |