<% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/module-area" %> <% end %>
<%= select_category(f, @module_app) %>
<%# end %>
<%= select_tags(f, @module_app) %>
<% if @link.image.file %> <%= image_tag @link.image %> <% else %> <% end %>
<%= t(:select_image) %> <%= t(:change) %> <%= f.file_field :image %> <%= t(:cancel) %>
<% @site_in_use_locales.each do |locale| %> <%= f.fields_for :image_description_translations do |f| %>
<%= f.text_field locale, value: (@link.image_description_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= f.fields_for :title_translations do |f| %> <%= f.text_area locale, class: "input-block-level ckeditor_reduce", placeholder: t(:title), value: (@link.title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :context_translations do |f| %> <%= f.text_area locale, rows: 5, class: "input-block-level ckeditor", value: (nl2br(@link.context_translations[locale]) rescue nil) %> <% end %>
<%= f.fields_for :url_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t(:url), value: (@link.url_translations[locale] rescue nil) %> <% end %>
<% end %>
<%= f.select :link_open, WebLink::LINK_OPEN_TYPES.map{|wl| [t("web_link.#{wl}"), wl]} %>
<%= f.submit t('submit'), class: 'btn btn-primary' %> <%= link_to t('cancel'), admin_web_resources_path, :class=>"btn" %>