refinerycms-core 0.9.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/base_controller.rb +10 -0
- data/app/controllers/admin/dialogs_controller.rb +26 -0
- data/app/controllers/admin/refinery_core_controller.rb +12 -0
- data/app/controllers/application_controller.rb +6 -0
- data/app/controllers/refinery/fast_controller.rb +9 -0
- data/app/controllers/sitemap_controller.rb +14 -0
- data/app/helpers/application_helper.rb +5 -0
- data/app/views/admin/_head.html.erb +43 -0
- data/app/views/admin/_javascripts.html.erb +32 -0
- data/app/views/admin/_menu.html.erb +17 -0
- data/app/views/admin/dialogs/show.html.erb +19 -0
- data/app/views/layouts/admin.html.erb +24 -0
- data/app/views/layouts/admin_dialog.html.erb +14 -0
- data/app/views/layouts/application.html.erb +21 -0
- data/app/views/shared/_content_page.html.erb +63 -0
- data/app/views/shared/_draft_page_message.html.erb +3 -0
- data/app/views/shared/_footer.html.erb +4 -0
- data/app/views/shared/_google_analytics.html.erb +8 -0
- data/app/views/shared/_head.html.erb +42 -0
- data/app/views/shared/_header.html.erb +8 -0
- data/app/views/shared/_html_tag.html.erb +6 -0
- data/app/views/shared/_ie6check.html.erb +63 -0
- data/app/views/shared/_javascripts.html.erb +10 -0
- data/app/views/shared/_menu.html.erb +30 -0
- data/app/views/shared/_menu_branch.html.erb +26 -0
- data/app/views/shared/_message.html.erb +10 -0
- data/app/views/shared/_no_script.html.erb +9 -0
- data/app/views/shared/_site_bar.html.erb +25 -0
- data/app/views/shared/admin/_continue_editing.html.erb +3 -0
- data/app/views/shared/admin/_error_messages.html.erb +16 -0
- data/app/views/shared/admin/_form_actions.html.erb +75 -0
- data/app/views/shared/admin/_image_picker.html.erb +60 -0
- data/app/views/shared/admin/_make_sortable.html.erb +13 -0
- data/app/views/shared/admin/_resource_picker.html.erb +66 -0
- data/app/views/shared/admin/_search.html.erb +6 -0
- data/app/views/shared/admin/_sortable_list.html.erb +7 -0
- data/app/views/shared/admin/_tabbed_fields.html.erb +42 -0
- data/app/views/welcome.html.erb +17 -0
- data/app/views/wymiframe.html.erb +15 -0
- data/config/locales/cs.yml +77 -0
- data/config/locales/da.yml +75 -0
- data/config/locales/de.yml +75 -0
- data/config/locales/el.yml +75 -0
- data/config/locales/en.yml +75 -0
- data/config/locales/es.yml +68 -0
- data/config/locales/fr.yml +72 -0
- data/config/locales/it.yml +96 -0
- data/config/locales/lolcat.yml +68 -0
- data/config/locales/lt.yml +75 -0
- data/config/locales/lv.yml +72 -0
- data/config/locales/nb.yml +75 -0
- data/config/locales/nl.yml +75 -0
- data/config/locales/pl.yml +75 -0
- data/config/locales/pt-BR.yml +72 -0
- data/config/locales/rs.yml +76 -0
- data/config/locales/ru.yml +71 -0
- data/config/locales/sl.yml +72 -0
- data/config/locales/sv.yml +75 -0
- data/config/locales/vi.yml +75 -0
- data/config/locales/zh-CN.yml +75 -0
- data/config/locales/zh-TW.yml +75 -0
- data/config/routes.rb +19 -0
- data/crud.md +197 -0
- data/doc/included-jquery-ui-packages.jpg +0 -0
- data/engines.md +179 -0
- data/features/search.feature +55 -0
- data/features/site_bar.feature +24 -0
- data/features/step_definitions/core_steps.rb +61 -0
- data/features/support/paths.rb +14 -0
- data/features/uploads/beach.jpeg +0 -0
- data/features/uploads/refinery_is_awesome.txt +1 -0
- data/lib/gemspec.rb +43 -0
- data/lib/generators/refinerycms_generator.rb +110 -0
- data/lib/generators/templates/.gitignore +83 -0
- data/lib/generators/templates/app/views/sitemap/index.xml.builder +22 -0
- data/lib/generators/templates/autotest/autotest.rb +17 -0
- data/lib/generators/templates/autotest/discover.rb +2 -0
- data/lib/generators/templates/config/database.yml.mysql +20 -0
- data/lib/generators/templates/config/database.yml.postgresql +57 -0
- data/lib/generators/templates/config/database.yml.sqlite3 +26 -0
- data/lib/generators/templates/config/i18n-js.yml +6 -0
- data/lib/generators/templates/config/initializers/devise.rb +142 -0
- data/lib/generators/templates/config/settings.rb +2 -0
- data/lib/generators/templates/db/seeds.rb +5 -0
- data/lib/refinery/activity.rb +45 -0
- data/lib/refinery/admin/base_controller.rb +111 -0
- data/lib/refinery/admin_base_controller.rb +5 -0
- data/lib/refinery/application.rb +48 -0
- data/lib/refinery/application_controller.rb +120 -0
- data/lib/refinery/application_helper.rb +19 -0
- data/lib/refinery/base_presenter.rb +27 -0
- data/lib/refinery/catch_all_routes.rb +11 -0
- data/lib/refinery/crud.rb +295 -0
- data/lib/refinery/helpers/form_helper.rb +66 -0
- data/lib/refinery/helpers/head_helper.rb +17 -0
- data/lib/refinery/helpers/html_truncation_helper.rb +25 -0
- data/lib/refinery/helpers/image_helper.rb +49 -0
- data/lib/refinery/helpers/menu_helper.rb +68 -0
- data/lib/refinery/helpers/meta_helper.rb +67 -0
- data/lib/refinery/helpers/pagination_helper.rb +16 -0
- data/lib/refinery/helpers/script_helper.rb +36 -0
- data/lib/refinery/helpers/site_bar_helper.rb +24 -0
- data/lib/refinery/helpers/tag_helper.rb +21 -0
- data/lib/refinery/helpers/translation_helper.rb +17 -0
- data/lib/refinery/link_renderer.rb +55 -0
- data/lib/refinery/plugin.rb +106 -0
- data/lib/refinery/plugins.rb +75 -0
- data/lib/refinerycms-core.rb +156 -0
- data/lib/tasks/doc.rake +29 -0
- data/lib/tasks/refinery.rake +231 -0
- data/lib/tasks/yard.rake +30 -0
- data/license.md +21 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/refinery/add.png +0 -0
- data/public/images/refinery/admin_bg.png +0 -0
- data/public/images/refinery/ajax-loader.gif +0 -0
- data/public/images/refinery/branch-end.gif +0 -0
- data/public/images/refinery/branch-start.gif +0 -0
- data/public/images/refinery/branch.gif +0 -0
- data/public/images/refinery/carousel-left.png +0 -0
- data/public/images/refinery/carousel-right.png +0 -0
- data/public/images/refinery/cross.png +0 -0
- data/public/images/refinery/dialogLoadingAnimation.gif +0 -0
- data/public/images/refinery/header_background.png +0 -0
- data/public/images/refinery/hover-gradient.jpg +0 -0
- data/public/images/refinery/icons/accept.png +0 -0
- data/public/images/refinery/icons/add.png +0 -0
- data/public/images/refinery/icons/ajax-loader.gif +0 -0
- data/public/images/refinery/icons/application_edit.png +0 -0
- data/public/images/refinery/icons/application_go.png +0 -0
- data/public/images/refinery/icons/arrow_left.png +0 -0
- data/public/images/refinery/icons/arrow_switch.png +0 -0
- data/public/images/refinery/icons/arrow_up.png +0 -0
- data/public/images/refinery/icons/bin.png +0 -0
- data/public/images/refinery/icons/bin_closed.png +0 -0
- data/public/images/refinery/icons/cancel.png +0 -0
- data/public/images/refinery/icons/cog_add.png +0 -0
- data/public/images/refinery/icons/cog_edit.png +0 -0
- data/public/images/refinery/icons/cross.png +0 -0
- data/public/images/refinery/icons/delete.png +0 -0
- data/public/images/refinery/icons/doc.png +0 -0
- data/public/images/refinery/icons/down.gif +0 -0
- data/public/images/refinery/icons/edit.png +0 -0
- data/public/images/refinery/icons/email.png +0 -0
- data/public/images/refinery/icons/email_edit.png +0 -0
- data/public/images/refinery/icons/email_go.png +0 -0
- data/public/images/refinery/icons/email_open.png +0 -0
- data/public/images/refinery/icons/eye.png +0 -0
- data/public/images/refinery/icons/folder_page_white.png +0 -0
- data/public/images/refinery/icons/image_add.png +0 -0
- data/public/images/refinery/icons/image_edit.png +0 -0
- data/public/images/refinery/icons/img.png +0 -0
- data/public/images/refinery/icons/information.png +0 -0
- data/public/images/refinery/icons/layout_add.png +0 -0
- data/public/images/refinery/icons/layout_edit.png +0 -0
- data/public/images/refinery/icons/music.png +0 -0
- data/public/images/refinery/icons/page_add.png +0 -0
- data/public/images/refinery/icons/page_edit.png +0 -0
- data/public/images/refinery/icons/page_white_edit.png +0 -0
- data/public/images/refinery/icons/page_white_gear.png +0 -0
- data/public/images/refinery/icons/page_white_put.png +0 -0
- data/public/images/refinery/icons/pdf.png +0 -0
- data/public/images/refinery/icons/ppt.png +0 -0
- data/public/images/refinery/icons/star.png +0 -0
- data/public/images/refinery/icons/tick.png +0 -0
- data/public/images/refinery/icons/up.gif +0 -0
- data/public/images/refinery/icons/user_add.png +0 -0
- data/public/images/refinery/icons/user_comment.png +0 -0
- data/public/images/refinery/icons/user_edit.png +0 -0
- data/public/images/refinery/icons/xls.png +0 -0
- data/public/images/refinery/icons/zip.png +0 -0
- data/public/images/refinery/icons/zoom.png +0 -0
- data/public/images/refinery/logo-large.png +0 -0
- data/public/images/refinery/logo-medium.png +0 -0
- data/public/images/refinery/logo-site-bar.png +0 -0
- data/public/images/refinery/logo-small-medium.png +0 -0
- data/public/images/refinery/logo-small.png +0 -0
- data/public/images/refinery/logo-tiny.png +0 -0
- data/public/images/refinery/logo.png +0 -0
- data/public/images/refinery/nav-3-background.gif +0 -0
- data/public/images/refinery/nav_inactive_background.png +0 -0
- data/public/images/refinery/orange_button.png +0 -0
- data/public/images/refinery/page_bg.png +0 -0
- data/public/images/refinery/resolve_digital_footer_logo.png +0 -0
- data/public/images/refinery/text_field_background.png +0 -0
- data/public/images/refinery/tooltip-nib.gif +0 -0
- data/public/images/refinery/tooltip-nib.png +0 -0
- data/public/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
- data/public/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
- data/public/images/wymeditor/skins/refinery/eye.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
- data/public/images/wymeditor/skins/refinery/link_add.png +0 -0
- data/public/images/wymeditor/skins/refinery/link_break.png +0 -0
- data/public/images/wymeditor/skins/refinery/page_code.png +0 -0
- data/public/images/wymeditor/skins/refinery/page_paste.png +0 -0
- data/public/images/wymeditor/skins/refinery/photo_add.png +0 -0
- data/public/images/wymeditor/skins/refinery/right.png +0 -0
- data/public/images/wymeditor/skins/refinery/style.png +0 -0
- data/public/images/wymeditor/skins/refinery/table_add.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_center.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_left.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_right.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_bold.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_italic.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_subscript.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_superscript.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_underline.png +0 -0
- data/public/images/wymeditor/skins/wymeditor_icon.png +0 -0
- data/public/javascripts/admin.js +7 -0
- data/public/javascripts/application.js +1 -0
- data/public/javascripts/dd_belatedpng.js +13 -0
- data/public/javascripts/i18n-messages.js +2 -0
- data/public/javascripts/jquery-min.js +16 -0
- data/public/javascripts/jquery-ui-custom-min.js +251 -0
- data/public/javascripts/jquery.js +8176 -0
- data/public/javascripts/jquery/GPL-LICENSE.txt +278 -0
- data/public/javascripts/jquery/MIT-LICENSE.txt +20 -0
- data/public/javascripts/jquery/jquery.corner.js +345 -0
- data/public/javascripts/jquery/jquery.html5-placeholder-shim.js +88 -0
- data/public/javascripts/jquery/jquery.jcarousel.js +900 -0
- data/public/javascripts/jquery/jquery.textTruncate.js +174 -0
- data/public/javascripts/jquery/jquery.timers.js +138 -0
- data/public/javascripts/modernizr-min.js +30 -0
- data/public/javascripts/rails.js +175 -0
- data/public/javascripts/refinery/admin.js +1114 -0
- data/public/javascripts/refinery/boot_wym.js +285 -0
- data/public/javascripts/refinery/core.js +18 -0
- data/public/javascripts/refinery/i18n.js +340 -0
- data/public/javascripts/refinery/nestedsortables.js +164 -0
- data/public/javascripts/refinery/serializelist.js +66 -0
- data/public/javascripts/refinery/site_bar.js +16 -0
- data/public/javascripts/refinery/submenu.js +49 -0
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +5156 -0
- data/public/javascripts/wymeditor/lang/ca.js +45 -0
- data/public/javascripts/wymeditor/lang/cs.js +45 -0
- data/public/javascripts/wymeditor/lang/da.js +48 -0
- data/public/javascripts/wymeditor/lang/de.js +45 -0
- data/public/javascripts/wymeditor/lang/en.js +47 -0
- data/public/javascripts/wymeditor/lang/es.js +48 -0
- data/public/javascripts/wymeditor/lang/fa.js +46 -0
- data/public/javascripts/wymeditor/lang/fr.js +45 -0
- data/public/javascripts/wymeditor/lang/he.js +45 -0
- data/public/javascripts/wymeditor/lang/hu.js +45 -0
- data/public/javascripts/wymeditor/lang/it.js +48 -0
- data/public/javascripts/wymeditor/lang/lv.js +47 -0
- data/public/javascripts/wymeditor/lang/nb.js +48 -0
- data/public/javascripts/wymeditor/lang/nl.js +47 -0
- data/public/javascripts/wymeditor/lang/nn.js +45 -0
- data/public/javascripts/wymeditor/lang/pl.js +45 -0
- data/public/javascripts/wymeditor/lang/pt-BR.js +47 -0
- data/public/javascripts/wymeditor/lang/pt.js +45 -0
- data/public/javascripts/wymeditor/lang/rs.js +47 -0
- data/public/javascripts/wymeditor/lang/ru.js +45 -0
- data/public/javascripts/wymeditor/lang/sl.js +47 -0
- data/public/javascripts/wymeditor/lang/sv.js +45 -0
- data/public/javascripts/wymeditor/lang/tr.js +45 -0
- data/public/javascripts/wymeditor/lang/vi.js +47 -0
- data/public/javascripts/wymeditor/lang/zh_cn.js +47 -0
- data/public/javascripts/wymeditor/skins/refinery/skin.js +48 -0
- data/public/robots.txt +3 -0
- data/public/stylesheets/application.css +4 -0
- data/public/stylesheets/formatting.css +4 -0
- data/public/stylesheets/home.css +4 -0
- data/public/stylesheets/refinery/application.css +72 -0
- data/public/stylesheets/refinery/formatting.css +57 -0
- data/public/stylesheets/refinery/home.css +0 -0
- data/public/stylesheets/refinery/refinery.css +1579 -0
- data/public/stylesheets/refinery/site_bar.css +87 -0
- data/public/stylesheets/refinery/submenu.css +22 -0
- data/public/stylesheets/refinery/theme.css +36 -0
- data/public/stylesheets/refinery/tooltips.css +34 -0
- data/public/stylesheets/refinery/ui.css +107 -0
- data/public/stylesheets/theme.css +4 -0
- data/public/stylesheets/wymeditor/skins/refinery/skin.css +528 -0
- data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +96 -0
- data/public/wymeditor/GPL-license.txt +278 -0
- data/public/wymeditor/MIT-license.txt +20 -0
- data/public/wymeditor/README +35 -0
- data/refinerycms-core.gemspec +391 -0
- data/spec/lib/refinery/plugins_spec.rb +90 -0
- metadata +482 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
sv:
|
2
|
+
plugins:
|
3
|
+
refinery_core:
|
4
|
+
title: Refinery
|
5
|
+
description: Kärntillågsprogram för Refinery
|
6
|
+
refinery_dialogs:
|
7
|
+
title: Dialoger
|
8
|
+
description: Refinery dialoger tillägsprogram
|
9
|
+
welcome:
|
10
|
+
there_are_no_users: Det finns inga användare ännu, så vi skapar en för dig först.
|
11
|
+
remember_admin_location: "Kom ihåg att kontrollpanelen nås via:"
|
12
|
+
lets_start: Okej, låt oss skapa en användare för dig så du kan logga in...
|
13
|
+
continue: Fortsätt...
|
14
|
+
admin:
|
15
|
+
menu:
|
16
|
+
reorder_menu: Ändra ordning på meny
|
17
|
+
reorder_menu_done: Ordningen på menyn ändrades
|
18
|
+
dialogs:
|
19
|
+
show:
|
20
|
+
save: Spara
|
21
|
+
cancel: Avbryt
|
22
|
+
refinery:
|
23
|
+
crudify:
|
24
|
+
created: %{what} lades till.
|
25
|
+
updated: %{what} uppdaterades.
|
26
|
+
destroyed: %{what} togs bort.
|
27
|
+
shared:
|
28
|
+
site_bar:
|
29
|
+
log_out: Logga ut
|
30
|
+
switch_to_your_website: Byt till din webbplats
|
31
|
+
switch_to_your_website_editor: Byt till din webbplats-redigerare
|
32
|
+
admin:
|
33
|
+
continue_editing:
|
34
|
+
save_and_continue_editing: Spara & fortsätt redigera
|
35
|
+
form_actions:
|
36
|
+
save: Spara
|
37
|
+
cancel: Avbryt
|
38
|
+
cancel_lose_changes: Om du avbryter förlorar du de ändringar du har gjort.
|
39
|
+
delete: Ta bort
|
40
|
+
close: Stäng
|
41
|
+
image_picker:
|
42
|
+
none_selected: Det finns just nu ingen %{what} vald, klicka här för att lägga till en.
|
43
|
+
remove_current: Ta bort denna %{what}
|
44
|
+
change: Klicka här för att välja en bild
|
45
|
+
show: Visa
|
46
|
+
resource_picker:
|
47
|
+
download_current: Ladda ner denna fil
|
48
|
+
opens_in_new_window: Öppnas i nytt fönster
|
49
|
+
remove_current: "Ta bort denna fil"
|
50
|
+
no_resource_selected: Ingen fil är vald, klicka här för att lägga till en.
|
51
|
+
name: Ladda upp en fil
|
52
|
+
current: Aktuell fil
|
53
|
+
search:
|
54
|
+
button_text: Sök
|
55
|
+
results_for: Sökresultat för '%{query}'
|
56
|
+
no_results: Tyvärr, sökningen gav inga träffar.
|
57
|
+
delete:
|
58
|
+
message: Är du säker på att du vill ta bort '%{title}'?
|
59
|
+
error_messages:
|
60
|
+
problems_in_following_fields: Det uppstod problem med följande fält
|
61
|
+
help: hjälp
|
62
|
+
message:
|
63
|
+
close: Stäng
|
64
|
+
close_this_message: Stäng detta meddelande
|
65
|
+
draft_page_message:
|
66
|
+
not_live: Den här sidan visas INTE live för besökare.
|
67
|
+
footer:
|
68
|
+
copyright: Copyright © %{year} %{site_name}
|
69
|
+
no_script:
|
70
|
+
enable_javascript: För att få full funktionalitet på den här sidan behöver JavaScript vara aktiverat i din webbläsare.
|
71
|
+
here_are: Här är
|
72
|
+
instructions_enable_javascript: instruktioner om hur du aktiverar JavaScript i din webbläsare
|
73
|
+
time:
|
74
|
+
formats:
|
75
|
+
short: "%A, %d %B %Y"
|
@@ -0,0 +1,75 @@
|
|
1
|
+
vi:
|
2
|
+
plugins:
|
3
|
+
refinery_core:
|
4
|
+
title: Refinery
|
5
|
+
description: Core refinery plugin
|
6
|
+
refinery_dialogs:
|
7
|
+
title: Dialogs
|
8
|
+
description: Refinery dialogs plugin
|
9
|
+
welcome:
|
10
|
+
there_are_no_users: Hiện không có user nào, chúng tôi sẽ tiến hành chi đặt cho bạn trước.
|
11
|
+
remember_admin_location: "Hãy nhớ rằng trang quản trị Refinery được đặt tại:"
|
12
|
+
lets_start: Bây giờ hãy cùng thiết lập cấu hình để bạn có thể đăng nhập hệ thống…
|
13
|
+
continue: Tiếp tục...
|
14
|
+
admin:
|
15
|
+
menu:
|
16
|
+
reorder_menu: Sắp xếp lại menu
|
17
|
+
reorder_menu_done: Đã hoàn thành việc sắp xếp lại menu
|
18
|
+
dialogs:
|
19
|
+
show:
|
20
|
+
save: Lưu
|
21
|
+
cancel: Bỏ qua
|
22
|
+
refinery:
|
23
|
+
crudify:
|
24
|
+
created: %{what} vừa được thêm vào.
|
25
|
+
updated: %{what} vừa được cập nhật.
|
26
|
+
destroyed: %{what} vừa được xóa bỏ.
|
27
|
+
shared:
|
28
|
+
site_bar:
|
29
|
+
log_out: Đăng xuất
|
30
|
+
switch_to_your_website: Chuyển đến website của bạn
|
31
|
+
switch_to_your_website_editor: Chuyển đến website nhập liệu của bạn
|
32
|
+
admin:
|
33
|
+
continue_editing:
|
34
|
+
save_and_continue_editing: Lưu & tiếp tục soạn thảo
|
35
|
+
form_actions:
|
36
|
+
save: Lưu trữ
|
37
|
+
cancel: Bỏ qua
|
38
|
+
cancel_lose_changes: Nếu bỏ qua, bạn sẽ mất tất cả những thông tin mà bạn vừa soạn thảo.
|
39
|
+
delete: Xóa bỏ
|
40
|
+
close: Đóng
|
41
|
+
image_picker:
|
42
|
+
none_selected: Hiện chưa có %{what} nào được chọn, hãy nhấn vào đây để thêm mới.
|
43
|
+
remove_current: Xóa bỏ %{what} hiện tại
|
44
|
+
change: Nhấn vão đây để chọn một hình ảnh
|
45
|
+
show: Hiển thị
|
46
|
+
resource_picker:
|
47
|
+
download_current: Tải file hiện tại về máy
|
48
|
+
opens_in_new_window: Mở với cửa sổ mới
|
49
|
+
remove_current: "Xóa bỏ file hiện tại"
|
50
|
+
no_resource_selected: Hiện chưa có file nào được chọn, nhãy nhấn vào đây để thêm mới.
|
51
|
+
name: Thêm file
|
52
|
+
current: File hiện tại
|
53
|
+
search:
|
54
|
+
button_text: Tìm kiếm
|
55
|
+
results_for: Các kết quả tìm kiếm với truy vấn '%{query}'
|
56
|
+
no_results: Rất tiếc, không có kết quả nào được tìm thấy
|
57
|
+
delete:
|
58
|
+
message: Bạn có thực sự chắc chắn khi xóa bỏ '%{title}' không?
|
59
|
+
error_messages:
|
60
|
+
problems_in_following_fields: Có lỗi xảy ra với những trường sau
|
61
|
+
help: giúp đỡ
|
62
|
+
message:
|
63
|
+
close: Đóng
|
64
|
+
close_this_message: Đóng thông báo này
|
65
|
+
draft_page_message:
|
66
|
+
not_live: Trang nay KHÔNG tồn tại đối với chế độ xem public.
|
67
|
+
footer:
|
68
|
+
copyright: Copyright © %{year} %{site_name}
|
69
|
+
no_script:
|
70
|
+
enable_javascript: Để website có thể hoạt động với đầy đủ các tính năng, bạn cần phải cho phép JavaScript hoạt động.
|
71
|
+
here_are: Đây là
|
72
|
+
instructions_enable_javascript: các chỉ dẫn cách kích hoạt cho Javascript hoạt động.
|
73
|
+
time:
|
74
|
+
formats:
|
75
|
+
short: "%A, %d %B %Y"
|
@@ -0,0 +1,75 @@
|
|
1
|
+
zh-CN:
|
2
|
+
plugins:
|
3
|
+
refinery_core:
|
4
|
+
title: Refinery
|
5
|
+
description: 核心 refinery 插件
|
6
|
+
refinery_dialogs:
|
7
|
+
title: 对话框
|
8
|
+
description: Refinery 对话框插件
|
9
|
+
welcome:
|
10
|
+
there_are_no_users: 现在还没有用户, 因此我们先来设置一个.
|
11
|
+
remember_admin_location: "记住你的 Refinery 后台管理页面在:"
|
12
|
+
lets_start: 好了, 让我们协助您设置, 然后您就能够登录了...
|
13
|
+
continue: 继续...
|
14
|
+
admin:
|
15
|
+
menu:
|
16
|
+
reorder_menu: 重新编排菜单
|
17
|
+
reorder_menu_done: 我排好了
|
18
|
+
dialogs:
|
19
|
+
show:
|
20
|
+
save: 保存
|
21
|
+
cancel: 取消
|
22
|
+
refinery:
|
23
|
+
crudify:
|
24
|
+
created: %{what} 添加成功.
|
25
|
+
updated: %{what} 编辑成功.
|
26
|
+
destroyed: %{what} 删除成功.
|
27
|
+
shared:
|
28
|
+
site_bar:
|
29
|
+
log_out: 注销
|
30
|
+
switch_to_your_website: 切换到你的网站
|
31
|
+
switch_to_your_website_editor: 切换到管理后台
|
32
|
+
admin:
|
33
|
+
continue_editing:
|
34
|
+
save_and_continue_editing: 保存并且继续编辑
|
35
|
+
form_actions:
|
36
|
+
save: 保存
|
37
|
+
cancel: 取消
|
38
|
+
cancel_lose_changes: 如果取消你将会丢失你这里所做的修改
|
39
|
+
delete: 删除
|
40
|
+
close: 关闭
|
41
|
+
image_picker:
|
42
|
+
none_selected: 当前没有图片 %{what} 被选中, 请点这里去选取一个.
|
43
|
+
remove_current: 删除当前 %{what}
|
44
|
+
change: 点这里去选取一个图片
|
45
|
+
show: 显示
|
46
|
+
resource_picker:
|
47
|
+
download_current: 下载当前文件
|
48
|
+
opens_in_new_window: 在新窗口打开
|
49
|
+
remove_current: "删除当前文件"
|
50
|
+
no_resource_selected: 当前没有文件 %{what} 被选中, 请点这里去选取一个.
|
51
|
+
name: 添加文件
|
52
|
+
current: 当前文件
|
53
|
+
search:
|
54
|
+
button_text: 搜索
|
55
|
+
results_for: 搜索 '%{query}' 的结果
|
56
|
+
no_results: 对不起, 没有找到结果
|
57
|
+
delete:
|
58
|
+
message: 您确认要删除 '%{title}'?
|
59
|
+
error_messages:
|
60
|
+
problems_in_following_fields: 以下字段存在问题
|
61
|
+
help: 帮助
|
62
|
+
message:
|
63
|
+
close: 关闭
|
64
|
+
close_this_message: 关闭这条信息
|
65
|
+
draft_page_message:
|
66
|
+
not_live: 这个页面不能够被公开访问.
|
67
|
+
footer:
|
68
|
+
copyright: 版权所有 © %{year} %{site_name}
|
69
|
+
no_script:
|
70
|
+
enable_javascript: 这个页面需要打开Javascript以执行所有功能.
|
71
|
+
here_are: 这里是
|
72
|
+
instructions_enable_javascript: 打开Javascript的指引
|
73
|
+
time:
|
74
|
+
formats:
|
75
|
+
short: "%A, %d %B %Y"
|
@@ -0,0 +1,75 @@
|
|
1
|
+
zh-TW:
|
2
|
+
plugins:
|
3
|
+
refinery_core:
|
4
|
+
title: Refinery
|
5
|
+
description: 核心 refinery 插件
|
6
|
+
refinery_dialogs:
|
7
|
+
title: 對話方框
|
8
|
+
description: Refinery 對話方框插件
|
9
|
+
welcome:
|
10
|
+
there_are_no_users: 目前沒有任何的使用者, 我們會先替您進行設定.
|
11
|
+
remember_admin_location: "記住您的 Refinery 管理者頁面在:"
|
12
|
+
lets_start: 好了, 讓我們協助您設定, 然後您就能登入了...
|
13
|
+
continue: 繼續...
|
14
|
+
admin:
|
15
|
+
menu:
|
16
|
+
reorder_menu: 重新編排選單
|
17
|
+
reorder_menu_done: 我已經完成了選單的編排
|
18
|
+
dialogs:
|
19
|
+
show:
|
20
|
+
save: 儲存
|
21
|
+
cancel: 取消
|
22
|
+
refinery:
|
23
|
+
crudify:
|
24
|
+
created: %{what} 成功地加入.
|
25
|
+
updated: %{what} 成功地更新.
|
26
|
+
destroyed: %{what} 成功地移除.
|
27
|
+
shared:
|
28
|
+
site_bar:
|
29
|
+
log_out: 登出
|
30
|
+
switch_to_your_website: 切換到您的網站
|
31
|
+
switch_to_your_website_editor: 切換到您的網站編輯器
|
32
|
+
admin:
|
33
|
+
continue_editing:
|
34
|
+
save_and_continue_editing: 儲存然後繼續編輯
|
35
|
+
form_actions:
|
36
|
+
save: 儲存
|
37
|
+
cancel: 取消
|
38
|
+
cancel_lose_changes: 如果您選擇取消, 您將會遺失先前的所有設定
|
39
|
+
delete: 移除
|
40
|
+
close: 關閉
|
41
|
+
image_picker:
|
42
|
+
none_selected: 目前沒有任何 %{what} 被選擇, 請點選這裡來新增.
|
43
|
+
remove_current: 移除目前的 %{what}
|
44
|
+
change: 點選這裡來選擇一張圖片
|
45
|
+
show: 展示
|
46
|
+
resource_picker:
|
47
|
+
download_current: 下載目前檔案
|
48
|
+
opens_in_new_window: 在新的視窗開啟
|
49
|
+
remove_current: "移除目前檔案"
|
50
|
+
no_resource_selected: 目前沒有任何檔案被選取, 點選這裡來新增.
|
51
|
+
name: 新增檔案
|
52
|
+
current: 目前檔案
|
53
|
+
search:
|
54
|
+
button_text: 搜尋
|
55
|
+
results_for: 搜尋 '%{query}' 的結果
|
56
|
+
no_results: 抱歉, 沒有任何搜尋結果
|
57
|
+
delete:
|
58
|
+
message: 確定要移除 '%{title}' 嗎?
|
59
|
+
error_messages:
|
60
|
+
problems_in_following_fields: 以下幾個欄位出現問題
|
61
|
+
help: 求助
|
62
|
+
message:
|
63
|
+
close: 關閉
|
64
|
+
close_this_message: 關閉這個訊息
|
65
|
+
draft_page_message:
|
66
|
+
not_live: 這個頁面目前沒有開放公開瀏覽.
|
67
|
+
footer:
|
68
|
+
copyright: Copyright © %{year} %{site_name}
|
69
|
+
no_script:
|
70
|
+
enable_javascript: 您必須要啟動支援 JavaScript 才能夠看到這個頁面提供的所有功能.
|
71
|
+
here_are: 這裡是
|
72
|
+
instructions_enable_javascript: 如果讓您的瀏覽器啟動支援 JavaScript 的說明
|
73
|
+
time:
|
74
|
+
formats:
|
75
|
+
short: "%A, %d %B %Y"
|
data/config/routes.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
::Refinery::Application.routes.draw do
|
2
|
+
filter(:refinery_locales) if defined?(RoutingFilter::RefineryLocales) # optionally use i18n.
|
3
|
+
|
4
|
+
root :to => 'pages#home'
|
5
|
+
|
6
|
+
match 'wymiframe(/:id)', :to => 'refinery/fast#wymiframe', :as => :wymiframe
|
7
|
+
|
8
|
+
scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
|
9
|
+
root :to => 'dashboard#index'
|
10
|
+
resources :dialogs, :only => :show
|
11
|
+
end
|
12
|
+
|
13
|
+
match '/refinery/update_menu_positions', :to => 'admin/refinery_core#update_plugin_positions'
|
14
|
+
|
15
|
+
match '/sitemap.xml' => 'sitemap#index', :defaults => { :format => 'xml' }
|
16
|
+
|
17
|
+
# Marketable URLs should be appended to routes by the Pages Engine.
|
18
|
+
# Catch all routes should be appended to routes by the Core Engine.
|
19
|
+
end
|
data/crud.md
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
# The Magical Mixin: Crudify (create, read, update & delete)
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
__Most controllers Refinery and other apps do four common things, create, read, update and delete stuff.__ Instead of writing the same logic for these actions over and over again we wrap all this functionality up into what we called ``crudify``.
|
6
|
+
|
7
|
+
``crudify`` takes these four basic actions and extends them to allow easy paging, searching and sorting too.
|
8
|
+
|
9
|
+
Although this single file is included in Refinery, you could take just this single file and use it in any app you like.
|
10
|
+
|
11
|
+
The best part about ``crudify`` is that this gives you a smart default and if there is anything you want to work differently just override that method.
|
12
|
+
|
13
|
+
## Where is it located?
|
14
|
+
|
15
|
+
``core/lib/refinery/crud.rb``
|
16
|
+
|
17
|
+
## How do I use it in my engines?
|
18
|
+
|
19
|
+
All you need to do is call ``crudify`` in your controller.
|
20
|
+
|
21
|
+
If you used the Refinery generator you're plugin will already be using ``crudify``.
|
22
|
+
|
23
|
+
### Example
|
24
|
+
|
25
|
+
class NewsItemsController < ApplicationController
|
26
|
+
|
27
|
+
crudify :news_item, :order => "created_at DESC"
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
### Complex Example
|
32
|
+
|
33
|
+
class NewsItemsController < ApplicationController
|
34
|
+
|
35
|
+
crudify :news_item, :order => "created_at DESC",
|
36
|
+
:conditions => 'published = true',
|
37
|
+
:sortable => false,
|
38
|
+
:searchable => true,
|
39
|
+
:include => [:author],
|
40
|
+
:paging => true,
|
41
|
+
:search_conditions => ''
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
## What can you configure with ``crudify``?
|
46
|
+
|
47
|
+
### ``:title_attribute``
|
48
|
+
|
49
|
+
Default value is ``title``
|
50
|
+
|
51
|
+
This is the human readable value you want ``crudify`` to use throughout. Just choose an attribute that is on your model that is short and descriptive to what the model is.
|
52
|
+
|
53
|
+
#### Example
|
54
|
+
|
55
|
+
On a page model you'd probably use "title" (which is default so you don't need to specify this)
|
56
|
+
|
57
|
+
#### Example 2
|
58
|
+
|
59
|
+
On a ``team_member`` model you'd probably want to use an attribute like ``name``.
|
60
|
+
|
61
|
+
### ``:order``
|
62
|
+
|
63
|
+
Default value is ``position ASC``
|
64
|
+
|
65
|
+
This is the position that is used when listing out what you're crudifying. If you have ``:sortable`` set to ``true`` you probably want to have your ``:order`` set to ``position ASC`` so it uses the order you have set when sorting.
|
66
|
+
|
67
|
+
If you have a news area, it makes more sense to sort by ``posted_at``. So you might set it like this
|
68
|
+
|
69
|
+
:order => "posted_at DESC"
|
70
|
+
|
71
|
+
### ``:conditions``
|
72
|
+
|
73
|
+
Default value is ``nil``
|
74
|
+
|
75
|
+
This will filter down the list of items you have when you're asking for all records.
|
76
|
+
|
77
|
+
An example here is say you're crudifying a photos table that uses attachment_fu. Attachment_fu creates several photo records, 1 for the main photo and others for it's "children" thumbnails. Those thumbnails have a parent id set.
|
78
|
+
|
79
|
+
So when viewing a list of the images you have you don't want it to show all the thumbnails too, you just want to each see unique image listed so you need to apply some conditions to hide the thumbnails.
|
80
|
+
|
81
|
+
You do that like this:
|
82
|
+
|
83
|
+
:conditions => {:parent_id => nil}
|
84
|
+
|
85
|
+
### ``:sortable``
|
86
|
+
|
87
|
+
Default value is ``true``
|
88
|
+
|
89
|
+
Enabling ``:sortable`` gives you several handy methods which "just work" with sortable JavaScript lists. One of the methods is ``update_positions()`` which handles saving the new position items have been sorted into.
|
90
|
+
|
91
|
+
### ``:searchable``
|
92
|
+
|
93
|
+
Default value is ``true``
|
94
|
+
|
95
|
+
When this option is ``true``, the routes are modified so when you go to the next page of results the search continues on.
|
96
|
+
|
97
|
+
### ``:include``
|
98
|
+
|
99
|
+
Default value is ``[]``
|
100
|
+
|
101
|
+
For performance optimisation, sometimes you might want to eager load other related models to this one. For example a ``news_post`` might below to a ``user`` who wrote the post. But in our index view we're printing out the name of each user.
|
102
|
+
|
103
|
+
Instead of having to look up each user for each of the ``news_posts`` we iterate over, the ``:include`` option allows you to load the ``news_post`` and user all at the same time which'll allow you to save on expensive database queries.
|
104
|
+
|
105
|
+
Here's an example of that.
|
106
|
+
|
107
|
+
class NewsItem
|
108
|
+
|
109
|
+
belongs_to :user
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
class NewsItemsController < ApplicationController
|
114
|
+
|
115
|
+
crudify :news_item, :order => "created_at DESC", :include => [:user]
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
### ``:paging``
|
120
|
+
|
121
|
+
Default value is ``true``
|
122
|
+
|
123
|
+
The ``:paging`` option tells ``crudify`` you don't just want one big long list but rather to break it out into pages and support paging methods uses [will_paginate](http://wiki.github.com/mislav/will_paginate/).
|
124
|
+
|
125
|
+
### ``:search_conditions``
|
126
|
+
|
127
|
+
Default value is ``nil``
|
128
|
+
|
129
|
+
Similar to the ``:conditions`` options, ``:search_conditions`` just apply these conditions when delivering search results.
|
130
|
+
|
131
|
+
## Easy Accessor Methods
|
132
|
+
|
133
|
+
``crudify`` automatically writes up finder methods for the model you're crudifying. The easier way to explain this is with an example.
|
134
|
+
|
135
|
+
Say we have a pages controller that is going to manage pages.
|
136
|
+
|
137
|
+
class PagesController < ApplicationController
|
138
|
+
|
139
|
+
crudify :page
|
140
|
+
|
141
|
+
end
|
142
|
+
|
143
|
+
In this controller, automatically I have these methods:
|
144
|
+
|
145
|
+
find_page()
|
146
|
+
find_all_pages()
|
147
|
+
|
148
|
+
So say I wanted to change the way all pages are found, all I do is override the ``find_all_pages`` method.
|
149
|
+
|
150
|
+
class PagesController < ApplicationController
|
151
|
+
|
152
|
+
crudify :page
|
153
|
+
|
154
|
+
def find_all_pages
|
155
|
+
@pages = Page.find(...) # apply any logic I want here to get all pages.
|
156
|
+
end
|
157
|
+
|
158
|
+
end
|
159
|
+
|
160
|
+
## Overriding or Extending Crudify
|
161
|
+
|
162
|
+
Before overriding anything, the best thing to do is check out how the default works. Read the ``vendor/plugins/refinery/lib/crud.rb`` and see what code it's injecting into your controller.
|
163
|
+
|
164
|
+
Pick the method you want to override and then override it in your controller.
|
165
|
+
|
166
|
+
Let's go back to the example above with the pages controller.
|
167
|
+
|
168
|
+
class PagesController < ApplicationController
|
169
|
+
|
170
|
+
crudify :page
|
171
|
+
|
172
|
+
end
|
173
|
+
|
174
|
+
Say every time someone deletes a page I want my ``NotificationMailer`` to email me to say someone just deleted a page.
|
175
|
+
|
176
|
+
When I look in the ``crud.rb`` file I see that my controller has this added to it
|
177
|
+
|
178
|
+
def destroy
|
179
|
+
flash.notice = "'\#{@#{singular_name}.#{options[:title_attribute]}}' was successfully deleted." if @#{singular_name}.destroy
|
180
|
+
redirect_to admin_#{plural_name}_url
|
181
|
+
end
|
182
|
+
|
183
|
+
To override this all I would is create my own delete method that works the same but just with my mailer code on it.
|
184
|
+
|
185
|
+
class PagesController < ApplicationController
|
186
|
+
|
187
|
+
crudify :page
|
188
|
+
|
189
|
+
def destroy
|
190
|
+
if @page.destroy
|
191
|
+
flash.notice = "'#{@page.title}' was successfully deleted."
|
192
|
+
NotificationMailer.deliver_page_deleted(@page) # sends me an email to say a page was deleted
|
193
|
+
end
|
194
|
+
redirect_to admin_pages_url
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|