Skip to content

Commit

Permalink
Add dropdown option to .actions method for index as table
Browse files Browse the repository at this point in the history
- Adding dropdown_actions.button_label to locales files
- added scenario actions without default actions
  • Loading branch information
lporras authored and dmitry committed Apr 15, 2014
1 parent ac15e74 commit 7aec8f4
Show file tree
Hide file tree
Showing 39 changed files with 183 additions and 18 deletions.
Expand Up @@ -86,8 +86,9 @@
border: solid 1px darken($primary-color, 10%);
border-top-color: darken($primary-color, 4%);
border-bottom-color: darken($primary-color, 17%);

border-radius: 4px;
z-index: 2000;
display: none;

.dropdown_menu_list {
display: block;
Expand Down
2 changes: 2 additions & 0 deletions config/locales/bg.yml
Expand Up @@ -51,6 +51,8 @@ bg:
blank_slate:
content: "Все още няма добавени %{resource_name}."
link: "Създаване"
dropdown_actions:
button_label: "действия"
batch_actions:
button_label: "Масови действия"
default_confirmation: "Наистина ли искате да направите това?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/ca.yml
Expand Up @@ -50,6 +50,8 @@ ca:
blank_slate:
content: "Encara no hi ha cap %{resource_name}."
link: "Crea'n un/a"
dropdown_actions:
button_label: "accions"
batch_actions:
button_label: "les accions per lots"
default_confirmation: "¿Esteu segur que voleu fer-ho?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/cs.yml
Expand Up @@ -52,6 +52,8 @@ cs:
blank_slate:
content: "Zatím zde není žádný obsah."
link: "Vytvořit"
dropdown_actions:
button_label: "Akce"
batch_actions:
button_label: "Hromadné akce"
default_confirmation: "Jste si jisti, že chcete provést?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/da.yml
Expand Up @@ -51,6 +51,8 @@ da:
blank_slate:
content: "Der er ingen %{resource_name} endnu."
link: "Opret"
dropdown_actions:
button_label: "Handlinger"
batch_actions:
button_label: "Batch Handlinger"
default_confirmation: "Er du sikker på du vil gøre dette?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/de-CH.yml
Expand Up @@ -51,6 +51,8 @@
blank_slate:
content: "Es gibt noch keine %{resource_name}."
link: "Erstellen"
dropdown_actions:
button_label: "Aktionen"
batch_actions:
button_label: "Stapelverarbeitung"
default_confirmation: "Bist du sicher, dass Sie dies tun wollen?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/de.yml
Expand Up @@ -51,6 +51,8 @@ de:
blank_slate:
content: "Es gibt noch keine %{resource_name}."
link: "Erstellen"
dropdown_actions:
button_label: "Aktionen"
batch_actions:
button_label: "Stapelverarbeitung"
default_confirmation: "Bist du sicher, dass Sie dies tun wollen?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en-GB.yml
Expand Up @@ -51,6 +51,8 @@
blank_slate:
content: "There are no %{resource_name} yet."
link: "Create one"
dropdown_actions:
button_label: "Actions"
batch_actions:
button_label: "Batch Actions"
default_confirmation: "Are you sure you want to do this?"
Expand Down
4 changes: 3 additions & 1 deletion config/locales/en.yml
Expand Up @@ -51,6 +51,8 @@ en:
blank_slate:
content: "There are no %{resource_name} yet."
link: "Create one"
dropdown_actions:
button_label: "Actions"
batch_actions:
button_label: "Batch Actions"
default_confirmation: "Are you sure you want to do this?"
Expand Down Expand Up @@ -83,7 +85,7 @@ en:
title: "Email"
subdomain:
title: "Subdomain"
password:
password:
title: "Password"
sign_up:
title: "Sign up"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/es.yml
Expand Up @@ -51,6 +51,8 @@ es:
blank_slate:
content: "No hay %{resource_name} aún."
link: "Añadir"
dropdown_actions:
button_label: "Acciones"
batch_actions:
button_label: "Acciones en masa"
default_confirmation: "¿Seguro que quieres hacer esto?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/es_MX.yml
Expand Up @@ -50,6 +50,8 @@ es_MX:
one: "registro"
other: "registros"
any: "Cualquiera"
dropdown_actions:
button_label: "Acciones"
batch_actions:
button_label: "Acciones en masa"
default_confirmation: "¿Seguro que quieres hacer esto?"
Expand Down
6 changes: 4 additions & 2 deletions config/locales/fi.yml
Expand Up @@ -51,8 +51,10 @@ fi:
blank_slate:
content: "Järjestelmässä ei ole yhtään %{resource_name}:ia vielä."
link: "Luo ensimmäinen"
dropdown_actions:
button_label: "Acciones"
batch_actions:
button_label: "Aja joukolle"
button_label: "Toimet"
default_confirmation: "Oletko varma, että haluat tehdä tämän?"
delete_confirmation: "Oletko varma, että haluat poistaa nämä %{plural_model}:t?"
succesfully_destroyed:
Expand Down Expand Up @@ -82,7 +84,7 @@ fi:
title: "Sähköposti"
subdomain:
title: "Subdomain"
password:
password:
title: "Salasana"
login:
title: "Sisäänkirjautuminen"
Expand Down
4 changes: 3 additions & 1 deletion config/locales/fr.yml
Expand Up @@ -50,7 +50,9 @@ fr:
any: "N'importe lequel"
blank_slate:
content: "Il n'y a pas encore de %{resource_name}."
link: "Créez-en un"
link: "Créez en un"
dropdown_actions:
button_label: "Actions"
batch_actions:
button_label: "Actions groupées"
default_confirmation: "Êtes-vous sûr de que vouloir faire cela ?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/he.yml
Expand Up @@ -51,6 +51,8 @@ he:
blank_slate:
content: "כרגע אין עוד אף %{resource_name}."
link: "צור אחד"
dropdown_actions:
button_label: "פעולו"
batch_actions:
button_label: "פעולות מרובות"
default_confirmation: "אתה בטוח שאתה רוצה לעשות את זה?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/hr.yml
Expand Up @@ -53,6 +53,8 @@ hr:
blank_slate:
content: "Još uvijek ne postoji niti jedan zapis tipa %{resource_name}."
link: "Izradi jedan"
dropdown_actions:
button_label: "Ukrepi"
batch_actions:
button_label: "Grupne akcije"
default_confirmation: "Jeste li sigurni da želite to učiniti?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/hu.yml
Expand Up @@ -51,6 +51,8 @@ hu:
blank_slate:
content: "Még nincs létrehozva %{resource_name}."
link: "Létrehozás most"
dropdown_actions:
button_label: "Műveletek"
batch_actions:
button_label: "Tömeges műveletek"
default_confirmation: "Biztos vagy benne, hogy a ön akar-hoz csinál ez?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/it.yml
Expand Up @@ -51,6 +51,8 @@ it:
blank_slate:
content: "Non sono presenti %{resource_name}"
link: "Crea nuovo/a"
dropdown_actions:
button_label: "Azioni"
batch_actions:
button_label: "Azioni multiple"
default_confirmation: "Sei sicuro di che voler fare questo?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/ja.yml
Expand Up @@ -51,6 +51,8 @@ ja:
blank_slate:
content: "%{resource_name} はまだありません。"
link: "作成する"
dropdown_actions:
button_label: "操作"
batch_actions:
button_label: "一括操作"
default_confirmation: "本当によろしいですか。"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/ko.yml
Expand Up @@ -46,6 +46,8 @@ ko:
blank_slate:
content: "아직 %{resource_name} 이/가 없습니다."
link: "만들기"
dropdown_actions:
button_label: "작업"
batch_actions:
button_label: "배치 작업"
default_confirmation: "당신은이 작업을 수행 하 시겠습니까?"
Expand Down
4 changes: 3 additions & 1 deletion config/locales/lt.yml
Expand Up @@ -51,6 +51,8 @@ lt:
blank_slate:
content: 'Nėra %{resource_name}.'
link: 'Sukurti'
dropdown_actions:
button_label: "Veiksmai"
batch_actions:
button_label: 'Veiksmai su pažymėtais'
default_confirmation: 'Ar jūs tikrai norite tai padaryti?'
Expand Down Expand Up @@ -115,4 +117,4 @@ lt:
table: "Lentelė"
block: "Sąrašas"
grid: "Tinklelis"
blog: "Blog"
blog: "Blog"
2 changes: 2 additions & 0 deletions config/locales/lv.yml
Expand Up @@ -51,6 +51,8 @@ lv:
blank_slate:
content: "Sadaļā '%{resource_name}' nav neviena ieraksta."
link: "Izveidot jaunu"
dropdown_actions:
button_label: "Actions"
batch_actions:
button_label: "Batch Actions"
default_confirmation: "Vai tiešām vēlaties to darīt?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/nl.yml
Expand Up @@ -51,6 +51,8 @@ nl:
blank_slate:
content: "Er zijn geen %{resource_name} gevonden."
link: "Maak aan"
dropdown_actions:
button_label: "Acties"
batch_actions:
button_label: "Batch acties"
default_confirmation: "Weet u zeker dat u dit wilt doen?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/no-NB.yml
Expand Up @@ -49,6 +49,8 @@
blank_slate:
content: "Her er det ingen %{resource_name} enda."
link: "Opprett en"
dropdown_actions:
button_label: "Actions"
batch_actions:
button_label: "Gruppehandlinger"
delete_confirmation: "Er du sikker på at du vil slette disse %{plural_model}? Dette kan ikke reverseres."
Expand Down
2 changes: 2 additions & 0 deletions config/locales/pl.yml
Expand Up @@ -48,6 +48,8 @@ pl:
blank_slate:
content: "Nie ma jeszcze zasobu %{resource_name}."
link: "Utwórz go"
dropdown_actions:
button_label: "Akcje"
batch_actions:
button_label: "Akcje na partiach"
default_confirmation: "Czy na pewno chcesz to zrobić?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/pt-BR.yml
Expand Up @@ -51,6 +51,8 @@ pt-BR:
blank_slate:
content: "Não existem %{resource_name} ainda."
link: "Novo"
dropdown_actions:
button_label: "Ações"
batch_actions:
button_label: "Ações em lote"
default_confirmation: "Tem certeza que quer fazer isso?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/pt-PT.yml
Expand Up @@ -51,6 +51,8 @@
blank_slate:
content: "Ainda não existem %{resource_name}."
link: "Novo"
dropdown_actions:
button_label: "Ações"
batch_actions:
button_label: "Ações em quantidade"
default_confirmation: "Tem a certeza que quer fazer isso?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/ro.yml
Expand Up @@ -51,6 +51,8 @@ ro:
blank_slate:
content: "Momentan nu exista %{resource_name}."
link: "Creati un"
dropdown_actions:
button_label: "Actiuni"
batch_actions:
button_label: "Grupare Actiuni"
default_confirmation: "Sunteţi sigur că doriţi să faceţi acest lucru?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/ru.yml
Expand Up @@ -53,6 +53,8 @@ ru:
blank_slate:
content: "Пока нет %{resource_name}."
link: "Создать"
dropdown_actions:
button_label: "Oперации"
batch_actions:
button_label: "Групповые операции"
default_confirmation: "Вы уверены, что вы хотите это сделать?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/sv-SE.yml
Expand Up @@ -51,6 +51,8 @@
blank_slate:
content: "Finns ingen %{resource_name} än."
link: "Skapa en"
dropdown_actions:
button_label: "Behandling"
batch_actions:
button_label: "Batch Behandling"
default_confirmation: "Är du säker på att du vill göra detta?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/tr.yml
Expand Up @@ -51,6 +51,8 @@ tr:
blank_slate:
content: "Herhangi bir %{resource_name} kaydı bulunamadı"
link: "Bir tane oluşturun"
dropdown_actions:
button_label: "Işlemler"
batch_actions:
button_label: "Toplu işlemler"
default_confirmation: "Bunu yapmak istediğinden emin misin?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/uk.yml
Expand Up @@ -53,6 +53,8 @@ uk:
blank_slate:
content: "Покищо немає %{resource_name}."
link: "Створити"
dropdown_actions:
button_label: "Oперації"
batch_actions:
button_label: "Групові операції"
default_confirmation: "Ви справді бажаєте це зробити?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/vi.yml
Expand Up @@ -51,6 +51,8 @@ vi:
blank_slate:
content: "Chưa có %{resource_name}."
link: "Tạo mới"
dropdown_actions:
button_label: "Hành động"
batch_actions:
button_label: "Hành động hàng loạt"
default_confirmation: "Bạn có chắc bạn muốn làm điều này?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/zh-CN.yml
Expand Up @@ -51,6 +51,8 @@
blank_slate:
content: "暂时还没有%{resource_name}."
link: "新建一个"
dropdown_actions:
button_label: "行动"
batch_actions:
button_label: "批处理"
default_confirmation: "你确定你要这样做?"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/zh-TW.yml
Expand Up @@ -51,6 +51,8 @@
blank_slate:
content: "尚無 %{resource_name}"
link: "建立一筆"
dropdown_actions:
button_label: "操作"
batch_actions:
button_label: "批次作業"
default_confirmation: "你確定你要這樣做?"
Expand Down
13 changes: 13 additions & 0 deletions docs/3-index-pages/index-as-table.md
Expand Up @@ -88,6 +88,19 @@ index do
end
```

In case you prefer to list actions links in a dropdown menu:

```ruby
index do
selectable_column
column :title
actions dropdown: true do |post|
item "Preview", admin_preview_post_path(post)
end
end
```


## Sorting

When a column is generated from an Active Record attribute, the table is
Expand Down

0 comments on commit 7aec8f4

Please sign in to comment.