Sha256: 94df557f666f3dbdfc10909fc491ae089c545f1ed788665ff63ce74420f02903

Contents?: true

Size: 1.29 KB

Versions: 12

Compression:

Stored size: 1.29 KB

Contents

<%= render :partial => "/tr8n/admin/common/header" %>
<%= render :partial => "tabs" %>
<%= tr8n_will_filter(@sources) %>

<%= form_tag("", :id => "sources_form") do %>
  <%= will_filter_table_tag(@sources, :columns => [
    [:checkbox, 'sources'],     
    [:domain_id, lambda{|source|
      source.domain ? source.domain.name : "unknown"
    }], :source, :created_at,
    [:translation_key_count, lambda{|source|
      link_to(source.translation_keys.size, "/tr8n/admin/domain/key_sources?wf_c0=translation_source_id&wf_o0=is&wf_v0_0=#{source.id}")
    }, 'text-align:right'],
    [:actions, lambda{|source|
      html = []
      html << link_to("Delete", {:action => :delete_source, :source_id => source.id}, {:confirm => "Are you sure you want to delete this source?"})
      html.join(' | ').html_safe
    }, 'padding:5px;text-align:right;white-space:nowrap;']
  ]) %>
<% end %>

<%= will_filter_actions_bar_tag(@sources, [
  ['Delete Selected Sources', 'deleteSelectedSources()']
]) %>

<%= render :partial => "/tr8n/admin/common/footer" %>

<script>
  function deleteSelectedSources() {
    if (!confirm('Are you sure you want to delete all selected sources?'))
       return;
    Tr8n.element('sources_form').action = "/tr8n/admin/domain/delete_source";
    Tr8n.element('sources_form').submit();
  }
</script>	

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tr8n-3.2.3 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.2.2 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.2.1 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.2.0 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.8 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.7 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.6 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.5 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.4 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.3 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.2 app/views/tr8n/admin/domain/sources.html.erb
tr8n-3.1.1 app/views/tr8n/admin/domain/sources.html.erb