Advertisement
eugene_art

Untitled

Jun 14th, 2018
2,424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%= form_for(basic_information) do |form| %>
  2.  <%= form_tag basic_information_path do %>
  3.  <% if current_user.sub_sections.include?("1.1") or current_user.adm_sub_sections.include?("1.1") %>
  4.  <i class="notice">Поля, отмеченные знаком *, обязательны для заполнения</i>
  5. <div class="box_shadow">
  6.   <h3>Основные сведения</h3>
  7.     <table class="unstriped">
  8.       <tr>
  9.         <td>Дата создания образовательной организации *</td>
  10.         <td><%= form.text_field :date_create, id: :basic_information_date_create, :required => true %></td>
  11.       </tr>
  12.       <tr>
  13.         <td >Адрес местонахождения образовательной организации *</td>
  14.         <td><%= form.text_field :address, id: :basic_information_address, :required => true %></td>
  15.       </tr>
  16.       <tr>
  17.         <td>Режим, график работы *</td>
  18.         <td><%= form.text_field :mode, id: :basic_information_mode, :required => true %></td>
  19.       </tr>
  20.       <tr>
  21.         <td>Контактные телефоны *</td>
  22.         <td><%= form.text_field :phones, id: :basic_information_phones, :required => true %></td>
  23.       </tr>
  24.       <tr>
  25.         <td>Факсы *</td>
  26.         <td><%= form.text_field :faxes, id: :basic_information_faxes, :required => true %></td>
  27.       </tr>
  28.       <tr>
  29.         <td>Адреса электронной почты *</td>
  30.         <td><%= form.text_field :emails, id: :basic_information_emails, :required => true %></td>
  31.       </tr>
  32.     </table>
  33.  </div>
  34.  <% end %>
  35. <% if current_user.sub_sections.include?("1.2") or current_user.adm_sub_sections.include?("1.2") %>
  36.  <i class="notice">Поля, отмеченные знаком *, обязательны для заполнения</i>
  37. <div class="box_shadow">
  38. <h3>Филиалы образовательной организации</h3>
  39.    <table class="unstriped">
  40.        <thead>
  41.          <th>Наименование филиала *</th>
  42.          <th>Адрес местонахождения филиала образовательной организации *</th>
  43.          <th>Адрес официального сайта в сети «Интернет» (при наличии)</th>
  44.          <th></th>
  45.        </thead>
  46.        <tbody>
  47.     <% @filiations_list.each do |fl| %>
  48.       <% if fl.owner == current_user.id  or current_user.adm_sub_sections.include?("1.2") %>
  49.       <%= fields_for 'filiations[]', fl do |fill| %>
  50.           <tr>
  51.             <td><%= fill.text_field :name, id: :filiation_name, :required => true %></td>
  52.             <td><%= fill.text_field :address, id: :filiation_address, :required => true %></td>
  53.             <td><%= fill.text_field :off_site, id: :filiation_off_site %></td>
  54.             <td><%= link_to basic_information_path(fl_id: fl.id), :method => :delete, remote: true, :class => "delete_button" do %><i class="fa fa-minus fa-2x" aria-hidden="true"></i><% end %></td>
  55.           </tr>
  56.         <% end %>
  57.       <% else %>
  58.           <tr>
  59.             <td><%= fl.name %></td>
  60.             <td><%= fl.address %></td>
  61.             <td><%= fl.off_site %></td>
  62.           </tr>
  63.       <% end %>
  64.     <% end %>
  65.          </tbody>
  66.      </table>  
  67.  
  68.   <%= link_to "Добавить филиал",{:controler => :basic_information, :action => 'create', :create => 'fil'}, :method => :create, :class => "success button" %>
  69. </div>
  70.   <% end %>
  71. <% if current_user.sub_sections.include?("1.3") or current_user.adm_sub_sections.include?("1.3") %>
  72.  <i class="notice">Поля, отмеченные знаком *, обязательны для заполнения</i>
  73.    <div class="box_shadow">    
  74.   <h3>Учредители образовательной организации</h3>
  75.    <table class="table table-bordered">
  76.           <thead>
  77.             <th>Наименование учредителя *</th>
  78.             <th>Фамилия, имя, отчество руководителя учредителя (ей) образовательной организации</th>
  79.             <th>Адрес местонахождения учредителя(ей)</th>
  80.             <th>Контактные телефоны</th>
  81.             <th>Адрес электронной почты</th>
  82.             <th>Адрес сайта учредителя(ей) в сети «Интернет»</th>
  83.             <th></th>
  84.           </thead>
  85.           <tbody>
  86.     <% @founders_list.each do |fn| %>
  87.       <% if fn.owner == current_user.id  or current_user.adm_sub_sections.include?("1.3") %>
  88.         <%= fields_for 'founders[]', fn do |fill| %>
  89.               <tr>
  90.                 <td><%= fill.text_field :name, id: :founder_name %></td>
  91.                 <td><%= fill.text_field :director, id: :founder_director, :required => true %></td>
  92.                 <td><%= fill.text_field :address, id: :founder_address %></td>
  93.                 <td><%= fill.text_field :phones, id: :founder_phones, :required => true %></td>
  94.                 <td><%= fill.text_field :email, id: :founder_email, :required => true %></td>
  95.                 <td> <%= fill.text_field :off_site, id: :founder_phones, :required => true %></td>
  96.                 <td><%= link_to basic_information_path(fn_id: fn.id), :method => :delete, remote: true, :class => "delete_button" do %><i class="fa fa-minus fa-2x" aria-hidden="true"></i><% end %></td>
  97.               </tr>
  98.         <% end %>
  99.         <% else %>
  100.               <tr>
  101.                 <td><%= fn.name %></td>
  102.                 <td><%= fn.director %></td>
  103.                 <td><%= fn.address %></td>
  104.                 <td><%= fn.phones %></td>
  105.                 <td><%= fn.email %></td>
  106.                 <td><%= fn.off_site %></td>
  107.               </tr>
  108.       <% end %>
  109.     <% end %>
  110.       </tbody>
  111.     </table>
  112.      <%= link_to "Добавить учредителя",{:controler => :basic_information, :action => 'create', :create => 'found'}, :method => :create, :class => "success button" %>
  113.   </div>
  114.   <% end %>
  115.     <div class="actions">
  116.       <%= button_tag(type: "submit", class: "button save_btn") do %>Сохранить изменения <% end %>
  117.     </div>
  118.   <% end %>
  119. <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement