Skip to content

Commit

Permalink
Move lang to locale (and refactor) resources view
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Francois committed Oct 15, 2013
1 parent 762484f commit ff4d6c5
Show file tree
Hide file tree
Showing 36 changed files with 419 additions and 320 deletions.
3 changes: 0 additions & 3 deletions app/views/admin/resources/_pages.html.erb

This file was deleted.

20 changes: 0 additions & 20 deletions app/views/admin/resources/_resource_list.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/admin/resources/_upload.html.erb

This file was deleted.

40 changes: 33 additions & 7 deletions app/views/admin/resources/index.html.erb
@@ -1,18 +1,44 @@
<%- content_for :page_heading do %>
<i class="icon-large icon-resources"></i><h2 class="page-title"><%= _("Media library") %></h2>
<i class="icon-large icon-resources"></i>
<h2 class="page-title"><%= t(".media_library") %></h2>
<% end %>
<%= render 'upload' -%>
<%= form_tag({action: 'upload'}, {enctype: "multipart/form-data"}) do %>
<div class='well well-small'>
<h3><%= t('.upload_a_file_to_your_site') %></h3>
<%= file_field('upload', 'filename', {class: 'input-file'}) -%>
<%= submit_tag(t('.upload'), {class: 'btn'}) -%>
</div>
<%- end %>

<table class="table table-striped">
<thead>
<tr class='noborder'>
<th><%= _("Filename")%> <small>(<%= _('right-click for link')%>)</small></th>
<th><%= _("Content Type")%></th>
<th><%= _("File Size")%></th>
<th><%= _("Date")%></th>
<th><%= t(".filename")%> <small>(<%= t('.right_click_for_link')%>)</small></th>
<th><%= t(".content_type")%></th>
<th><%= t(".file_size")%></th>
<th><%= t(".date")%></th>
</tr>
</thead>
<%= render 'resource_list', { :resources => @resources } %>
<%= render_void_table(@resources.size, 6) %>
<% for upload in @resources -%>
<tr>
<td>
<% if upload.mime =~ /image/ %>
<%= link_to upload.upload_url, rel: 'lightbox' do %>
<%= image_tag(upload.upload.thumb.url) %>
<% end %>
<% else %>
<%= link_to(upload.upload_url, upload.upload_url) -%>
<% end %>
<p><%= resource_action_links(upload) %></p>
</td>
<td>
<%= upload.mime %>
</td>
<td><%=h upload.size rescue 0 -%> bytes</td>
<td><%= format_date upload.created_at -%></td>
</tr>
<% end -%>
<%= display_pagination(@resources, 6)%>
</table>
10 changes: 10 additions & 0 deletions config/locales/da.yml
Expand Up @@ -5,6 +5,16 @@ da:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "Upload en fil til din side"
upload: "Upload"
filename: "Filnavn"
right_click_for_link: "højreklik for link"
content_type: "Indholdstype (Content Type)"
file_size: "Filstørrelse"
date: "Dato"
post_types:
new:
post_types: "Post Types"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/de.yml
Expand Up @@ -5,6 +5,16 @@ de:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "Legen Sie einen Dateianhang an ihrer Site an"
upload: "Upload"
filename: "Dateiname"
right_click_for_link: "right-click for link"
content_type: "Content Type"
file_size: "Dateigröße"
date: "Date"
post_types:
new:
post_types: "Post Types"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/en.yml
Expand Up @@ -5,6 +5,16 @@ en:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "Upload a File to your Site"
upload: "Upload"
filename: "Filename"
right_click_for_link: "right-click for link"
content_type: "Content Type"
file_size: "File Size"
date: "Date"
post_types:
new:
post_types: "Post Types"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/es-MX.yml
Expand Up @@ -5,6 +5,16 @@ es-MX:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "Sube un Archivo a tu sitio"
upload: "Subir"
filename: "Nombre del archivo"
right_click_for_link: "right-click for link"
content_type: "Content Type"
file_size: "Tama&ntilde;o del Archivo"
date: "Date"
post_types:
new:
post_types: "Post Types"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/fr.yml
Expand Up @@ -5,6 +5,16 @@ fr:
next: "Suivant"
last: "Last"
admin:
resources:
index:
media_library: "Bibliothèque de média"
upload_a_file_to_your_site: "Envoyer un fichier sur votre site"
upload: "Ajouter un fichier joint"
filename: "Fichier"
right_click_for_link: "clic droit pour le lien"
content_type: "Type de contenu"
file_size: "Taille du fichier"
date: "Date"
post_types:
new:
post_types: "Modèles d'articles"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/he-IL.yml
Expand Up @@ -5,6 +5,16 @@ he-IL:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "העלה קובץ לאתר שלך"
upload: "העלה"
filename: "שם הקובץ"
right_click_for_link: "לחיצה ימנית לקישור"
content_type: "סוג התוכן"
file_size: "גודל הקובץ"
date: "תאריך"
post_types:
new:
post_types: "Post Types"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/it.yml
Expand Up @@ -5,6 +5,16 @@ it:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "Invia un file al tuo sito"
upload: "Invia"
filename: "Nome del file"
right_click_for_link: "clicca col destro per il link"
content_type: "Tipo di contenuto"
file_size: "Dimensione"
date: "Date"
post_types:
new:
post_types: "Post Types"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/ja.yml
Expand Up @@ -5,6 +5,16 @@ ja:
next: "Next"
last: "Last"
admin:
resources:
index:
media_library: "Media Library"
upload_a_file_to_your_site: "サイトにファイルをアップロード"
upload: "アップロード"
filename: "ファイル名"
right_click_for_link: "右クリックでリンク"
content_type: "コンテンツタイプ"
file_size: "ファイルサイズ"
date: "日付"
post_types:
new:
post_types: "Post Types"
Expand Down

0 comments on commit ff4d6c5

Please sign in to comment.