/
index.html.haml
32 lines (31 loc) · 1.27 KB
/
index.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
= render 'admin/sheets/upload_script'
.outset
%table.index
%thead
%tr
%th= t('javascript_page')
%th= t('filter')
%th= t('modify')
%tbody
- unless models.blank?
- models.each do |javascript|
%tr
%td.name
= link_to image('javascript') + ' ' + javascript.title, edit_admin_script_path(javascript)
%td.filter= javascript.part('body').filter.filter_name
%td.actions= link_to(image('minus') + ' ' + t('remove'), admin_script_url(javascript), :class => "action", :method => :delete, :confirm => "Is it OK to delete #{javascript.slug}?")
- else
%tr
%td.empty{:colspan => 3}= t('no_scripts')
#actions
= pagination_for(models)
%ul
%li= link_to image('plus') + " " + t("new_javascript"), new_admin_script_path, :class => 'action_button'
%li
= link_to image('upload') + ' ' + t("upload"), '#uploader', :class => 'replace action_button'
#uploader.action_button
- form_for :upload, :url => upload_admin_scripts_path, :html => { :class => 'button_form', :multipart => true } do |f|
%span
= f.label :upload, image('upload') + ' ' + t('upload')
= f.file_field :upload
= f.submit t('create_javascript')