<%#-- copyright OpenProject My Project Page Plugin Copyright (C) 2011-2014 the OpenProject Foundation (OPF) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.md for more details. ++#%> <% new_block ||= local_assigns[:new_block] %>
<% content_for block_name do %>
>
<%= form_for :overview, url: {action: 'update_custom_element'}, method: :put, multipart: true, html: { class: "textile-form", :'ng-submit' => "$ctrl.submitForm($event)" } do |f| %> <%= hidden_field_tag 'block_name', block_name %>
<%= styled_label_tag "block_title_#{block_name}", t('attributes.title') %>
<%= styled_text_field_tag "block_title_#{block_name}", block_title %>
<%= styled_label_tag "textile_#{block_name}", t('info_custom_text') %>
<%= styled_text_area_tag "textile_#{block_name}", textile.html_safe, cols: 40, rows: 5, class: 'wiki-edit' %>
<%= wikitoolbar_for "textile_#{block_name}" %> <%= render partial: 'attachments/form' %> <%= styled_button_tag l(:button_save), id: "#{block_name}-form-submit", class: '-highlight' %> <%= t(:button_cancel) %> <% end %>
<% unless User.current.anonymous? %> <% end %> <% if User.current.allowed_to?(:edit_project, project) %> <% end %>
<% end %>
<%= render partial: "textilizable", locals: { block_title: block_title, textile: textile, block_name: block_name } %>