Changeset 226


Ignore:
Timestamp:
Sep 18, 2009, 4:11:11 PM (11 years ago)
Author:
kasey
Message:

update full patch cf : #1129

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ror-farm/redmine/Patchs-Redmine/redmine-full.patch

    r219 r226  
    1 diff -r prod/app/views/custom_fields/_form.rhtml redmine.org/app/views/custom_fields/_form.rhtml
    2 84a85
    3 > <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
    4 111a113
    5 > <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
    6 diff -r prod/app/views/issue_statuses/_form.rhtml redmine.org/app/views/issue_statuses/_form.rhtml
    7 13a14,15
    8 > <%= call_hook(:view_issue_statuses_form, :issue_status => @issue_status) %>
    9 >
    10 15c17
    11 < </div>
    12 \ No newline at end of file
    13 ---
    14 > </div>
    15 diff -r prod/app/views/issues/_form.rhtml redmine.org/app/views/issues/_form.rhtml
    16 5a6
    17 > <hr />
    18 6a8
    19 >
    20 8,9d9
    21 < <%= render :partial => 'form_custom_fields' %>
    22 < <% if @issue.tracker.id != 4 %>
    23 11,19c11
    24 < <% else %>
    25 < <p style="visibility:collapse;height:0px;"><%= f.text_field :subject, :size => 80, :required => true %></p>
    26 < <% if @issue.new_record? %>
    27 <   <script type='text/javascript' language='javascript'>
    28 <    document.getElementById('issue_subject').value = "Demande #<%=rand(99999999999) %>"
    29 <   </script>
    30 < <% end %>
    31 < <% end %>
    32 < <p><%= f.text_area :description, :required => true,
    33 ---
    34 > <p><%= f.text_area :description,
    35 25,45d16
    36 < <% if @issue.tracker.id == 4 %>
    37 <   <div><p style="font-size:10px"><i>Une description de la demande, modalite, etc ...</i></p></div>
    38 < <% end %>
    39 <
    40 < <!-- #### Slider Tranche de rorette ############################### -->
    41 <
    42 < <% if @issue.tracker.id == 4 %>
    43 < <p><label for="issue_custom_field_values_3">Nombre de tranches</label>
    44 <   <div id="slider" style="float:left;margin-left:198px;margin-top:-22px;margin-bottom:0px;" ></div>
    45 <   <input type="text" id="Slice" style="border:none;background-color:transparent;float:left;margin-left:310px;margin-top:-27px;" readonly="readonly" size="15" /><br />
    46 < </p>
    47 < <p style="margin-top:-30px;"><label for="issue_custom_field_values_3"></label>
    48 <   <input type="text" id="CPU" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
    49 <   <input type="text" id="RAM" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
    50 <   <input type="text" id="DD" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
    51 <   <input type="text" id="Cost" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
    52 < </p>
    53 < <div><p style="font-size:10px"><i>Sélectionnez le nombre de tranches de rorette que vous souhaitez acquérir.<br />Ce nombre détermine le nombre de core qui vous est alloué ainsi que la quantité de RAM et l'espace disque.</i></p></div>
    54 < <% end %>
    55 <
    56 < <!-- #### Option Plus Pour Adminsitrateur uniquement ############# -->
    57 47,48c18
    58 < <!--<div style="visibility:collapse;height:0px;">-->
    59 < <% if User.current.admin %>
    60 ---
    61 > <div class="splitcontentleft">
    62 50c20
    63 <  <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
    64 ---
    65 > <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
    66 52c22
    67 <  <p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
    68 ---
    69 > <p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
    70 56d25
    71 <
    72 58,63c27
    73 < <% if @issue.tracker.id == 4 %>
    74 < <script type='text/javascript' language='javascript'>
    75 < document.getElementById('issue_assigned_to_id').value = 4 ;
    76 < </script>
    77 < <% end %>
    78 <
    79 ---
    80 > <% unless @project.issue_categories.empty? %>
    81 68a33
    82 > <% end %>
    83 72,73c37
    84 < <!--/div>-->
    85 < <% end %>
    86 ---
    87 > </div>
    88 75,76c39
    89 < <% if User.current.admin %>
    90 < <!--<div style="visibility:collapse;height:0px;" class="splitcontentright">-->
    91 ---
    92 > <div class="splitcontentright">
    93 81,82c44
    94 < <!--</div>-->
    95 < <% end %>
    96 ---
    97 > </div>
    98 84a47
    99 > <%= render :partial => 'form_custom_fields' %>
    100 87,95c50,58
    101 <  <% if @issue.tracker.id == 4 %>                                                             
    102 <   <p><label>Clef SSH
    103 <  <% else %>
    104 <   <p><label><%=l(:label_attachment_plural)%>
    105 <  <% end %>
    106 < </label><%= render :partial => 'attachments/form' %></p>
    107 <   <% if @issue.tracker.id == 4 %>
    108 <     <div><p style="font-size:10px"><i>Clef SSH associée au compte permettant l'administration de la machine. Adresse d'exemple : ssh nom.ror.bearstech.com -l nom</i></p></div>
    109 <   <% end %>
    110 ---
    111 > <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
    112 > <% end %>
    113 >
    114 > <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%>
    115 > <p><label><%= l(:label_issue_watchers) %></label>
    116 > <% @issue.project.users.sort.each do |user| -%>
    117 > <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watcher_user_ids.include?(user.id) %> <%=h user %></label>
    118 > <% end -%>
    119 > </p>
    120 100,104c63
    121 < <% if ! @issue.new_record? %>
    122 < <script type="text/javascript">
    123 <   set_slide_def(document.getElementById('issue_custom_field_values_4').value);
    124 < </script>
    125 < <% end %>
    126 ---
    127 > <%= wikitoolbar_for 'issue_description' %>
    128 diff -r prod/app/views/issues/_form_custom_fields.rhtml redmine.org/app/views/issues/_form_custom_fields.rhtml
    129 0a1,3
    130 > <div class="splitcontentleft">
    131 > <% i = 0 %>
    132 > <% split_on = @issue.custom_field_values.size / 2 %>
    133 2,22c5,12
    134 < <% if value.custom_field.id == 4 %>
    135 <     <div style="visibility:collapse;height:0px;" class="splitcontentright">
    136 <         <p><%= custom_field_tag_with_label :issue, value %></p>
    137 <     </div>
    138 < <% end %>
    139 < <% if value.custom_field.id != 3 || User.current.admin %>
    140 <   <% if value.custom_field.id != 4 %>
    141 <    <p><%= custom_field_tag_with_label :issue, value %></p>
    142 <   <% end %>
    143 <    <% if value.custom_field.id == 1 %>
    144 <        <p style="font-size:10px"><i>Nom de la machine demandée, ne dois pas dépasser 10 caractères alphanumériques. Correspond aussi à l'adresse qui vous sera attribuée.<br />
    145 <        L'URL qui vous sera attribuée sera de la forme http://nom.ror.bearstech.com</i></p>
    146 <    <% end %>
    147 <    <% if value.custom_field.id == 2 %>
    148 <        <p style="font-size:10px"><i>Liste de nom de domaines supplémentaires désirés pour la machine.<br />
    149 <        Par exemple : http://www.monsiteror.com ou http://appli.client.com<br />
    150 <        </i></p>
    151 <    <% end %>
    152 < <% end %>
    153 < <% end %>
    154 < <hr />
    155 ---
    156 >       <p><%= custom_field_tag_with_label :issue, value %></p>
    157 > <% if i == split_on -%>
    158 > </div><div class="splitcontentright">
    159 > <% end -%>
    160 > <% i += 1 -%>
    161 > <% end -%>
    162 > </div>
    163 > <div style="clear:both;"> </div>
    164 diff -r prod/app/views/issues/show.rhtml redmine.org/app/views/issues/show.rhtml
    165 1d0
    166 < <% if User.current.admin || User.current.id == @issue.author.id %>
    167 128,131d128
    168 < <% else %>
    169 <   <%= "<h2>Forbidden access</h2>" %>
    170 < <% end %>
    171 <
    172 diff -r prod/app/views/layouts/base.rhtml redmine.org/app/views/layouts/base.rhtml
    173 20,24d19
    174 < <!-- Ajout pour les besoins de formulaire de rorette -->
    175 < <link rel="stylesheet" type="text/css" media="screen, projection" href="/stylesheets/style.css" />
    176 < <script type="text/javascript" src="/javascripts/slider.js"></script>
    177 < <script type="text/javascript" src="/javascripts/run.js"></script>
    178 < <!-- Ajout pour les besoins de formulaire de rorette -->
     1diff -ur site/original/app/views/issues/_form.rhtml site/prod/app/views/issues/_form.rhtml
     2--- site/original/app/views/issues/_form.rhtml  2009-09-18 15:33:36.000000000 +0200
     3+++ site/prod/app/views/issues/_form.rhtml      2009-09-18 15:33:00.000000000 +0200
     4@@ -3,63 +3,102 @@
     5 <%= observe_field :issue_tracker_id, :url => { :action => :new },
     6                                      :update => :content,
     7                                      :with => "Form.serialize('issue-form')" %>
     8-<hr />
     9 <% end %>
     10-
     11 <div id="issue_descr_fields" <%= 'style="display:none"' unless @issue.new_record? || @issue.errors.any? %>>
     12+<%= render :partial => 'form_custom_fields' %>
     13+<% if @issue.tracker.id != 4 %>
     14 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
     15-<p><%= f.text_area :description,
     16+<% else %>
     17+<p style="visibility:collapse;height:0px;"><%= f.text_field :subject, :size => 80, :required => true %></p>
     18+<% if @issue.new_record? %>
     19+  <script type='text/javascript' language='javascript'>
     20+   document.getElementById('issue_subject').value = "Demande #<%=rand(99999999999) %>"
     21+  </script>
     22+<% end %>
     23+<% end %>
     24+<p><%= f.text_area :description, :required => true,
     25                    :cols => 60,
     26                    :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
     27                    :accesskey => accesskey(:edit),
     28                    :class => 'wiki-edit' %></p>
     29 </div>
     30+<% if @issue.tracker.id == 4 %>
     31+  <div><p style="font-size:10px"><i>Une description de la demande, modalite, etc ...</i></p></div>
     32+<% end %>
     33 
     34-<div class="attributes">
     35-<div class="splitcontentleft">
     36+<!-- #### Slider Tranche de rorette ############################### -->
     37+
     38+<% if @issue.tracker.id == 4 %>
     39+<p><label for="issue_custom_field_values_3">Nombre de tranches</label>
     40+  <div id="slider" style="float:left;margin-left:198px;margin-top:-22px;margin-bottom:0px;" ></div>
     41+  <input type="text" id="Slice" style="border:none;background-color:transparent;float:left;margin-left:310px;margin-top:-27px;" readonly="readonly" size="15" /><br />
     42+</p>
     43+<p style="margin-top:-30px;"><label for="issue_custom_field_values_3"></label>
     44+  <input type="text" id="CPU" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
     45+  <input type="text" id="RAM" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
     46+  <input type="text" id="DD" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
     47+  <input type="text" id="Cost" style="border:none;background-color:transparent;" readonly="readonly" size="15" />
     48+</p>
     49+<div><p style="font-size:10px"><i>Sélectionnez le nombre de tranches de rorette que vous souhaitez acquérir.<br />Ce nombre détermine le nombre de core qui vous est alloué ainsi que la quantité de RAM et l'espace disque.</i></p></div>
     50+<% end %>
     51+
     52+<!-- #### Option Plus Pour Adminsitrateur uniquement ############# -->
     53+
     54+<!--<div style="visibility:collapse;height:0px;">-->
     55 <% if @issue.new_record? || @allowed_statuses.any? %>
     56-<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
     57+ <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
     58 <% else %>
     59-<p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
     60+ <p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
     61 <% end %>
     62 
     63+<% if User.current.admin %>
     64 <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
     65+
     66 <p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p>
     67-<% unless @project.issue_categories.empty? %>
     68+<% if @issue.tracker.id == 4 %>
     69+<script type='text/javascript' language='javascript'>
     70+document.getElementById('issue_assigned_to_id').value = 4 ;
     71+</script>
     72+<% end %>
     73+
     74 <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
     75 <%= prompt_to_remote(l(:label_issue_category_new),
     76                      l(:label_issue_category_new), 'category[name]',
     77                      {:controller => 'projects', :action => 'add_issue_category', :id => @project},
     78                      :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p>
     79-<% end %>
     80 <%= content_tag('p', f.select(:fixed_version_id,
     81                               (@project.versions.sort.collect {|v| [v.name, v.id]}),
     82                               { :include_blank => true })) unless @project.versions.empty? %>
     83-</div>
     84+<!--</div>-->
     85+<% end %>
     86 
     87-<div class="splitcontentright">
     88+<% if User.current.admin %>
     89+<!--<div style="visibility:collapse;height:0px;" class="splitcontentright">-->
     90 <p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %></p>
     91 <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p>
     92 <p><%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %></p>
     93 <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
     94-</div>
     95+<!--</div>-->
     96+<% end %>
     97 
     98 <div style="clear:both;"> </div>
     99-<%= render :partial => 'form_custom_fields' %>
     100-</div>
     101 
     102 <% if @issue.new_record? %>
     103-<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
     104-<% end %>
     105-
     106-<% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%>
     107-<p><label><%= l(:label_issue_watchers) %></label>
     108-<% @issue.project.users.sort.each do |user| -%>
     109-<label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watcher_user_ids.include?(user.id) %> <%=h user %></label>
     110-<% end -%>
     111-</p>
     112+ <% if @issue.tracker.id == 4 %>                                                             
     113+  <p><label>Clef SSH
     114+ <% else %>
     115+  <p><label><%=l(:label_attachment_plural)%>
     116+ <% end %>
     117+</label><%= render :partial => 'attachments/form' %></p>
     118+  <% if @issue.tracker.id == 4 %>
     119+    <div><p style="font-size:10px"><i>Clef SSH associée au compte permettant l'administration de la machine. Adresse d'exemple : ssh nom.ror.bearstech.com -l nom</i></p></div>
     120+  <% end %>
     121 <% end %>
     122 
     123 <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
     124 
     125-<%= wikitoolbar_for 'issue_description' %>
     126+<% if ! @issue.new_record? %>
     127+<script type="text/javascript">
     128+  set_slide_def(document.getElementById('issue_custom_field_values_4').value);
     129+</script>
     130+<% end %>
     131diff -ur site/original/app/views/issues/_form_custom_fields.rhtml site/prod/app/views/issues/_form_custom_fields.rhtml
     132--- site/original/app/views/issues/_form_custom_fields.rhtml    2009-09-18 15:33:36.000000000 +0200
     133+++ site/prod/app/views/issues/_form_custom_fields.rhtml        2009-02-24 17:02:26.000000000 +0100
     134@@ -1,12 +1,22 @@
     135-<div class="splitcontentleft">
     136-<% i = 0 %>
     137-<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
     138 <% @issue.custom_field_values.each do |value| %>
     139-       <p><%= custom_field_tag_with_label :issue, value %></p>
     140-<% if i == split_on -%>
     141-</div><div class="splitcontentright">
     142-<% end -%>
     143-<% i += 1 -%>
     144-<% end -%>
     145-</div>
     146-<div style="clear:both;"> </div>
     147+<% if value.custom_field.id == 4 %>
     148+    <div style="visibility:collapse;height:0px;" class="splitcontentright">
     149+        <p><%= custom_field_tag_with_label :issue, value %></p>
     150+    </div>
     151+<% end %>
     152+<% if value.custom_field.id != 3 || User.current.admin %>
     153+  <% if value.custom_field.id != 4 %>
     154+   <p><%= custom_field_tag_with_label :issue, value %></p>
     155+  <% end %>
     156+   <% if value.custom_field.id == 1 %>
     157+       <p style="font-size:10px"><i>Nom de la machine demandée, ne dois pas dépasser 10 caractères alphanumériques. Correspond aussi à l'adresse qui vous sera attribuée.<br />
     158+       L'URL qui vous sera attribuée sera de la forme http://nom.ror.bearstech.com</i></p>
     159+   <% end %>
     160+   <% if value.custom_field.id == 2 %>
     161+       <p style="font-size:10px"><i>Liste de nom de domaines supplémentaires désirés pour la machine.<br />
     162+       Par exemple : http://www.monsiteror.com ou http://appli.client.com<br />
     163+       </i></p>
     164+   <% end %>
     165+<% end %>
     166+<% end %>
     167+<hr />
     168diff -ur site/original/app/views/issues/show.rhtml site/prod/app/views/issues/show.rhtml
     169--- site/original/app/views/issues/show.rhtml   2009-09-18 15:33:36.000000000 +0200
     170+++ site/prod/app/views/issues/show.rhtml       2009-02-24 17:15:10.000000000 +0100
     171@@ -1,6 +1,7 @@
     172+<% if User.current.admin || User.current.id == @issue.author.id %>
     173 <div class="contextual">
     174 <%= link_to_if_authorized(l(:button_update), {:controller => 'issues', :action => 'edit', :id => @issue }, :onclick => 'showAndScrollTo("update", "notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
     175 <%= watcher_tag(@issue, User.current) %>
     176 <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %>
     177 <%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %>
     178@@ -117,3 +125,7 @@
     179     <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
     180     <%= stylesheet_link_tag 'scm' %>
     181 <% end %>
     182+<% else %>
     183+  <%= "<h2>Forbidden access</h2>" %>
     184+<% end %>
     185+
     186diff -ur site/original/app/views/layouts/base.rhtml site/prod/app/views/layouts/base.rhtml
     187--- site/original/app/views/layouts/base.rhtml  2009-09-18 15:33:36.000000000 +0200
     188+++ site/prod/app/views/layouts/base.rhtml      2009-08-14 17:30:12.000000000 +0200
     189@@ -17,6 +17,11 @@
     190 <%= call_hook :view_layouts_base_html_head %>
     191 <!-- page specific tags -->
     192 <%= yield :header_tags -%>
     193+<!-- Ajout pour les besoins de formulaire de rorette -->
     194+<link rel="stylesheet" type="text/css" media="screen, projection" href="/stylesheets/style.css" />
     195+<script type="text/javascript" src="/javascripts/slider.js"></script>
     196+<script type="text/javascript" src="/javascripts/run.js"></script>
     197+<!-- Ajout pour les besoins de formulaire de rorette -->
     198 </head>
     199 <body>
     200 <div id="wrapper">
     201@@ -34,10 +39,11 @@
     202         <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
     203         <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %>
     204         <% end %>
     205     </div>
     206     
     207-    <h1><%= page_header_title %></h1>
     208+    <a href="http://admin.ror.bearstech.com"><img src="/themes/bearstech/stylesheets/bearstech.png"></a>
     209+    <h1><%= h(@project && !@project.new_record? ? @project.name : Setting.app_title) %></h1>
     210     
     211     <div id="main-menu">
     212         <%= render_main_menu(@project) %>
Note: See TracChangeset for help on using the changeset viewer.