refinerycms 0.9.8 → 0.9.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/Gemfile +6 -6
  2. data/app/controllers/application_controller.rb +2 -1
  3. data/bin/refinerycms +36 -32
  4. data/changelog.md +471 -0
  5. data/config/environments/production.rb +1 -1
  6. data/db/migrate/20100606135207_change_thumbnail_sizes_for_dragonfly.rb +4 -4
  7. data/db/migrate/20100826232810_move_inquiry_settings_to_refinery_settings.rb +2 -2
  8. data/db/migrate/20100831122919_move_page_to_nested_set.rb +28 -0
  9. data/db/schema.rb +7 -1
  10. data/db/seeds/refinery_settings.rb +2 -4
  11. data/license.md +21 -0
  12. data/readme.md +97 -0
  13. data/todo.md +61 -0
  14. data/vendor/refinerycms/authentication/app/views/admin/users/index.html.erb +5 -13
  15. data/vendor/refinerycms/authentication/app/views/layouts/login.html.erb +1 -1
  16. data/vendor/refinerycms/authentication/config/locales/de.yml +53 -56
  17. data/vendor/refinerycms/authentication/config/locales/en.yml +1 -2
  18. data/vendor/refinerycms/authentication/config/locales/lv.yml +38 -38
  19. data/vendor/refinerycms/authentication/config/locales/pt-BR.yml +21 -48
  20. data/vendor/refinerycms/authentication/features/lost_password.feature +40 -0
  21. data/vendor/refinerycms/authentication/features/manage_users.feature +57 -0
  22. data/vendor/refinerycms/authentication/features/step_definitions/lost_password.rb +8 -0
  23. data/vendor/refinerycms/authentication/features/step_definitions/user_steps.rb +32 -0
  24. data/vendor/refinerycms/authentication/features/support/factories.rb +17 -0
  25. data/vendor/refinerycms/authentication/features/support/paths.rb +24 -0
  26. data/vendor/refinerycms/authentication/lib/authenticated_system.rb +1 -1
  27. data/vendor/refinerycms/authentication/lib/authentication.rb +1 -1
  28. data/vendor/refinerycms/core/app/views/admin/_head.html.erb +4 -4
  29. data/vendor/refinerycms/core/app/views/admin/_menu_tab.html.erb +2 -2
  30. data/vendor/refinerycms/core/app/views/layouts/admin.html.erb +1 -1
  31. data/vendor/refinerycms/core/app/views/layouts/admin_dialog.html.erb +1 -1
  32. data/vendor/refinerycms/core/app/views/shared/_footer.html.erb +1 -1
  33. data/vendor/refinerycms/core/app/views/shared/_google_analytics.html.erb +1 -1
  34. data/vendor/refinerycms/core/app/views/shared/_header.html.erb +1 -1
  35. data/vendor/refinerycms/core/app/views/shared/_menu.html.erb +5 -2
  36. data/vendor/refinerycms/core/app/views/shared/_menu_branch.html.erb +6 -3
  37. data/vendor/refinerycms/core/app/views/shared/_site_bar.html.erb +11 -15
  38. data/vendor/refinerycms/core/app/views/shared/admin/_form_actions.html.erb +1 -0
  39. data/vendor/refinerycms/core/app/views/shared/admin/_image_picker.html.erb +3 -3
  40. data/vendor/refinerycms/core/app/views/shared/admin/_make_sortable.html.erb +2 -1
  41. data/vendor/refinerycms/core/app/views/shared/admin/_resource_picker.html.erb +24 -17
  42. data/vendor/refinerycms/core/app/views/wymiframe.html.erb +1 -1
  43. data/vendor/refinerycms/core/config/locales/de.yml +50 -51
  44. data/vendor/refinerycms/core/config/locales/en.yml +5 -2
  45. data/vendor/refinerycms/core/config/locales/lv.yml +6 -3
  46. data/vendor/refinerycms/core/config/locales/pt-BR.yml +34 -38
  47. data/vendor/refinerycms/core/crud.md +12 -12
  48. data/vendor/refinerycms/core/features/engine_generator.feature +27 -0
  49. data/vendor/refinerycms/core/features/search.feature +56 -0
  50. data/vendor/refinerycms/core/features/site_bar.feature +24 -0
  51. data/vendor/refinerycms/core/features/step_definitions/core_steps.rb +61 -0
  52. data/vendor/refinerycms/core/features/step_definitions/engine_generator_steps.rb +19 -0
  53. data/vendor/refinerycms/core/features/step_definitions/generator_steps.rb +11 -0
  54. data/vendor/refinerycms/core/features/support/paths.rb +14 -0
  55. data/vendor/refinerycms/core/features/uploads/beach.jpeg +0 -0
  56. data/vendor/refinerycms/core/features/uploads/refinery_is_awesome.txt +1 -0
  57. data/vendor/refinerycms/core/lib/core.rb +52 -53
  58. data/vendor/refinerycms/core/lib/generators/refinery_engine/refinery_engine_generator.rb +14 -3
  59. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/controllers/admin/plural_name_controller.rb +3 -1
  60. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/models/singular_name.rb +4 -3
  61. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/admin/plural_name/_form.html.erb +2 -1
  62. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/admin/plural_name/_singular_name.html.erb +6 -2
  63. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/plural_name/index.html.erb +3 -1
  64. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/plural_name/show.html.erb +7 -3
  65. data/vendor/refinerycms/core/lib/refinery/application_controller.rb +85 -75
  66. data/vendor/refinerycms/core/lib/refinery/application_helper.rb +10 -190
  67. data/vendor/refinerycms/core/lib/refinery/crud.rb +283 -0
  68. data/vendor/refinerycms/core/lib/refinery/{form_helpers.rb → helpers/form_helper.rb} +0 -0
  69. data/vendor/refinerycms/core/lib/refinery/helpers/html_truncation_helper.rb +26 -0
  70. data/vendor/refinerycms/core/lib/refinery/helpers/image_helper.rb +37 -0
  71. data/vendor/refinerycms/core/lib/refinery/helpers/menu_helper.rb +38 -0
  72. data/vendor/refinerycms/core/lib/refinery/helpers/meta_helper.rb +67 -0
  73. data/vendor/refinerycms/core/lib/refinery/helpers/script_helper.rb +36 -0
  74. data/vendor/refinerycms/core/lib/refinery/helpers/site_bar_helper.rb +26 -0
  75. data/vendor/refinerycms/core/lib/refinery/helpers/tag_helper.rb +19 -0
  76. data/vendor/refinerycms/core/lib/refinery/helpers/translation_helper.rb +17 -0
  77. data/vendor/refinerycms/core/lib/refinery/plugin.rb +3 -3
  78. data/vendor/refinerycms/core/lib/tasks/refinery.rake +4 -3
  79. data/vendor/refinerycms/core/public/javascripts/refinery/admin.js +93 -101
  80. data/vendor/refinerycms/core/public/javascripts/refinery/core.js +3 -0
  81. data/vendor/refinerycms/core/public/javascripts/refinery/nestedsortables.js +164 -0
  82. data/vendor/refinerycms/core/public/javascripts/refinery/serializelist.js +66 -0
  83. data/vendor/refinerycms/core/public/stylesheets/refinery/refinery.css +11 -73
  84. data/vendor/refinerycms/dashboard/config/locales/de.yml +6 -6
  85. data/vendor/refinerycms/dashboard/config/locales/pt-BR.yml +3 -5
  86. data/vendor/refinerycms/dashboard/features/dashboard.feature +54 -0
  87. data/vendor/refinerycms/dashboard/features/support/paths.rb +14 -0
  88. data/vendor/refinerycms/images/app/controllers/admin/images_controller.rb +6 -6
  89. data/vendor/refinerycms/images/app/helpers/admin/images_helper.rb +1 -1
  90. data/vendor/refinerycms/images/app/views/admin/images/_existing_image.html.erb +15 -13
  91. data/vendor/refinerycms/images/app/views/admin/images/_grid_view.html.erb +1 -1
  92. data/vendor/refinerycms/images/app/views/admin/images/_list_view_image.html.erb +1 -1
  93. data/vendor/refinerycms/images/config/locales/de.yml +21 -25
  94. data/vendor/refinerycms/images/config/locales/pt-BR.yml +13 -23
  95. data/vendor/refinerycms/images/features/manage_images.feature +48 -0
  96. data/vendor/refinerycms/images/features/step_definitions/image_steps.rb +37 -0
  97. data/vendor/refinerycms/images/features/support/paths.rb +17 -0
  98. data/vendor/refinerycms/images/features/uploads/beach.jpeg +0 -0
  99. data/vendor/refinerycms/images/features/uploads/id-rather-be-here.jpg +0 -0
  100. data/vendor/refinerycms/images/features/uploads/refinery_is_awesome.txt +1 -0
  101. data/vendor/refinerycms/images/lib/images.rb +6 -0
  102. data/vendor/refinerycms/images/readme.md +12 -36
  103. data/vendor/refinerycms/pages/app/controllers/admin/pages_controller.rb +4 -42
  104. data/vendor/refinerycms/pages/app/controllers/pages_controller.rb +1 -1
  105. data/vendor/refinerycms/pages/app/models/page.rb +3 -4
  106. data/vendor/refinerycms/pages/app/sweepers/page_sweeper.rb +18 -0
  107. data/vendor/refinerycms/pages/app/views/admin/pages/_form_advanced_options.html.erb +1 -1
  108. data/vendor/refinerycms/pages/app/views/admin/pages/_page.html.erb +6 -5
  109. data/vendor/refinerycms/pages/config/locales/de.yml +66 -36
  110. data/vendor/refinerycms/pages/config/locales/pt-BR.yml +29 -57
  111. data/vendor/refinerycms/pages/features/manage_pages.feature +45 -0
  112. data/vendor/refinerycms/pages/features/step_definitions/page_steps.rb +29 -0
  113. data/vendor/refinerycms/pages/features/support/paths.rb +18 -0
  114. data/vendor/refinerycms/pages/lib/pages.rb +5 -0
  115. data/vendor/refinerycms/pages/spec/models/page_spec.rb +13 -0
  116. data/vendor/refinerycms/refinery.rb +1 -1
  117. data/vendor/refinerycms/resources/app/views/admin/resources/_existing_resource.html.erb +2 -2
  118. data/vendor/refinerycms/resources/config/locales/de.yml +16 -17
  119. data/vendor/refinerycms/resources/config/locales/pt-BR.yml +15 -17
  120. data/vendor/refinerycms/resources/features/manage_files.feature +39 -0
  121. data/vendor/refinerycms/resources/features/step_definitions/file_steps.rb +21 -0
  122. data/vendor/refinerycms/resources/features/support/paths.rb +17 -0
  123. data/vendor/refinerycms/resources/features/uploads/beach.jpeg +0 -0
  124. data/vendor/refinerycms/resources/features/uploads/refinery_is_awesome.txt +1 -0
  125. data/vendor/refinerycms/resources/lib/resources.rb +17 -1
  126. data/vendor/refinerycms/settings/app/models/refinery_setting.rb +82 -64
  127. data/vendor/refinerycms/settings/config/locales/de.yml +36 -16
  128. data/vendor/refinerycms/settings/config/locales/pt-BR.yml +32 -34
  129. data/vendor/refinerycms/settings/features/manage_refinery_settings.feature +5 -0
  130. data/vendor/refinerycms/settings/lib/settings.rb +1 -1
  131. metadata +86 -53
  132. data/vendor/refinerycms/core/lib/crud.rb +0 -265
  133. data/vendor/refinerycms/core/lib/refinery/html_truncation_helper.rb +0 -22
  134. data/vendor/refinerycms/core/public/javascripts/jquery/jquery.nestedsortables.js +0 -186
@@ -0,0 +1,66 @@
1
+ /**
2
+ * jQuery Serialize List
3
+ * Copyright (c) 2009 Mike Botsko, Botsko.net LLC
4
+ * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
5
+ * Copyright notice and license must remain intact for legal use
6
+ * Version .2
7
+ *
8
+ * Serialize an unordered or ordered list item. Optional ability
9
+ * to determine which attributes are included. The serialization
10
+ * will be read by PHP as a multidimensional array which you may
11
+ * use for saving state.
12
+ *
13
+ * http://github.com/botskonet/jquery.serialize-list
14
+ */
15
+ (function($){
16
+ $.fn.serializelist = function(options) {
17
+ // Extend the configuration options with user-provided
18
+ var defaults = {
19
+ attributes: ['id'], // which html attributes should be sent?
20
+ allow_nest: true, // allow nested elements to be included
21
+ prepend: 'ul', // which query string param name should be used?
22
+ att_regex: false, // replacement regex to run on attr values
23
+ is_child: false // determine if we're serializing a child list
24
+ };
25
+ var opts = $.extend(defaults, options);
26
+ var serialStr = '';
27
+ if(!opts.is_child){ opts.prepend = '&'+opts.prepend; }
28
+ // Begin the core plugin
29
+ this.each(function() {
30
+ var li_count = 0;
31
+ $(this).children().each(function(){
32
+ if(opts.allow_nest || opts.attributes.length > 1){
33
+ for(att in opts.attributes){
34
+ val = att_rep(opts.attributes[att], $(this).attr(opts.attributes[att]));
35
+ serialStr += opts.prepend+'['+li_count+']['+opts.attributes[att]+']='+val;
36
+ }
37
+ } else {
38
+ val = att_rep(opts.attributes[0], $(this).attr(opts.attributes[0]));
39
+ serialStr += opts.prepend+'['+li_count+']='+val;
40
+ }
41
+ // append any children elements
42
+ if(opts.allow_nest){
43
+ var child_base = opts.prepend+'['+li_count+'][children]';
44
+ $(this).children().each(function(){
45
+ if(this.tagName == 'UL' || this.tagName == 'OL'){
46
+ serialStr += $(this).serializelist({'prepend': child_base, 'is_child': true});
47
+ }
48
+ });
49
+ }
50
+ li_count++;
51
+ });
52
+ function att_rep (att, val){
53
+ if(opts.att_regex){
54
+ for(x in opts.att_regex){
55
+ if(opts.att_regex[x].att == att){
56
+ return val.replace(opts.att_regex[x].regex, '');
57
+ }
58
+ }
59
+ } else {
60
+ return val;
61
+ }
62
+ }
63
+ });
64
+ return(serialStr);
65
+ };
66
+ })(jQuery);
@@ -421,9 +421,14 @@ header p {
421
421
  line-height: 35px;
422
422
  position: relative;
423
423
  }
424
+ #records > #recent_activity > ul li, #records > #recent_inquiries > ul li {
425
+ max-height: 35px;
426
+ }
427
+ /*
424
428
  #records > ul.ui-sortable li {
425
429
  position: static;
426
430
  }
431
+ */
427
432
  #content #records > ul li .actions a {
428
433
  line-height: 29px;
429
434
  }
@@ -501,87 +506,19 @@ header p {
501
506
  #records.tree ul li > div:hover, .tree ul li > div:hover {
502
507
  background-color: #EAEAEA;
503
508
  }
509
+ /*
504
510
  #records.tree ul.ui-sortable li div:hover, .tree ul.ui-sortable li div:hover {
505
511
  background-color: inherit;
506
512
  }
513
+ */
507
514
  #records ul#sortable_list {
508
515
  margin-top: 6px;
509
516
  }
510
- .ui-sortable .nested{
511
- padding:5px;
512
- margin:5px 0;
513
- }
514
- #records ul#sortable_list.ui-sortable {
515
- margin-top: 0px;
516
- }
517
- #content .ui-sortable li.hover {
518
- height: 300%;
519
- display: block;
520
- }
521
- #content .ui-sortable {
522
- margin: 0;
523
- padding: 12px 0px;
524
- }
525
- #content #records > .ui-sortable {
526
- padding-top: 10px;
527
- }
528
- #content #records ul.ui-sortable li ul, #content .ui-sortable li ul {
529
- padding: 6px 10px 12px 40px;
530
- }
531
- #content #records ul.ui-sortable li, #content ul.ui-sortable li {
532
- background-image: none;
533
- background-color: #EAEAEA;
517
+
518
+ #sortable_list.reordering > li {
534
519
  cursor: move;
535
- border: 1px solid #ccc;
536
- margin-bottom: 6px;
537
- padding: 3px 0px 0px 3px;
538
- }
539
- #content #records ul.ui-sortable li ul li, #content ul.ui-sortable li {
540
- background-color: #F2F2F2;
541
- }
542
- #content ul.ui-sortable li ul.empty {
543
- display: block;
544
- }
545
- #content ul.ui-sortable li ul li.empty {
546
- border: 0px none;
547
- }
548
- #content .ui-sortable .actions {
549
- display: none !important;
550
- }
551
- #content .ui-sortable ul.spacing li {
552
- display: block;
553
- border: 0px none;
554
- }
555
- #content .ui-sortable ul {
556
- min-height: 12px;
557
- }
558
- #content .ui-sortable li.placeholder {
559
- opacity: 0.7;
560
- border-width: 2px;
561
- border-style: dashed;
562
- height: 38px;
563
- }
564
- #content .tree .ui-sortable li.placeholder {
565
- height: 38px;
566
- border-width: 2px;
567
- position: relative;
568
- background: #22A7F2 !important;
569
- margin:5px 0;
570
- }
571
- #content #records .tree .ui-sortable li.helper, #content .tree .ui-sortable li.helper {
572
- opacity: 0.5 !important;
573
- }
574
- #content .tree .ui-sortable li.below-placeholder {
575
- }
576
- #content ul.ui-sortable li.ui-sortable-helper {
577
- height: 38px !important;
578
- }
579
- #content ul.ui-sortable li.ui-sortable-helper ul {
580
- display: none;
581
- }
582
- .ui-sortable-helper {
583
- opacity: 0.7;
584
520
  }
521
+
585
522
  #content h2 {
586
523
  font-size: 18px;
587
524
  color:#41403c;
@@ -589,6 +526,7 @@ header p {
589
526
  margin-top: 10px;
590
527
  font-weight: bold;
591
528
  }
529
+
592
530
  #records h2, #actions h2 {
593
531
  margin-top: 0px;
594
532
  }
@@ -2,6 +2,7 @@ de:
2
2
  plugins:
3
3
  refinery_dashboard:
4
4
  title: Armaturenbrett
5
+ description: Gibt eine Übersicht über Aktivitäten in Refinery
5
6
  admin:
6
7
  dashboard:
7
8
  index:
@@ -9,16 +10,15 @@ de:
9
10
  add_a_new_page: Neue Seite erstellen
10
11
  update_a_page: Eine Seite aktualisieren
11
12
  upload_a_image: Ein Bild hochladen
13
+ upload_a_file: Eine Datei hochladen
12
14
  change_language: Sprache wechseln
13
15
  see_home_page: Homepage ansehen
14
16
  recent_activity:
15
17
  latest_activity: Letzte Aktivität
16
- see: "'%{what}' ansehen"
18
+ latest_activity_message: %{what} %{kind} wurde %{action}
17
19
  recent_inquiries:
18
- latest_inquiries: Latest inquiries
20
+ latest_inquiries: Letzte Anfragen
19
21
  updated:
20
- 'with_article "the"': aktualisiert
22
+ 'with_article "the"': aktualisiert
21
23
  created:
22
- 'with_article "the"': erstellt
23
- ago: "vor %{time}"
24
- see: Ansehen
24
+ 'with_article "the"': erstellt
@@ -2,6 +2,7 @@ pt-BR:
2
2
  plugins:
3
3
  refinery_dashboard:
4
4
  title: Painel
5
+ description: Mostra um sumário das atividades no sistema
5
6
  admin:
6
7
  dashboard:
7
8
  index:
@@ -10,12 +11,11 @@ pt-BR:
10
11
  update_a_page: Atualizar uma página
11
12
  upload_a_image: Enviar uma imagem
12
13
  upload_a_file: Enviar um arquivo
13
- see_home_page: Ver página inicial
14
14
  change_language: Mudar Língua
15
+ see_home_page: Ver página inicial
15
16
  recent_activity:
16
17
  latest_activity: Atividade Recente
17
- see: "Ver '%{what}'"
18
- latest_activity_message: "%{kind} %{what} foi %{action}"
18
+ latest_activity_message: %{what} %{kind} foi %{action}
19
19
  recent_inquiries:
20
20
  latest_inquiries: Últimas mensagens
21
21
  updated:
@@ -26,5 +26,3 @@ pt-BR:
26
26
  'with_article "as"': criada
27
27
  'with_article "os"': criado
28
28
  'with_article "the"': criado
29
- ago: "%{time} atrás"
30
- see: Ver
@@ -0,0 +1,54 @@
1
+ @dashboard
2
+ Feature: Dashboard
3
+ In order to see recent changes to my website
4
+ As an administrator
5
+ I want to use the dashboard
6
+
7
+ Background:
8
+ Given I am a logged in refinery user
9
+ And my locale is en
10
+ When I go to the Dashboard
11
+
12
+ Scenario: Add New Page Button
13
+ Given I have no pages
14
+ When I follow "Add a new page"
15
+ Then I should be on the new page form
16
+ When I fill in "Title" with "Page test from Dashboard"
17
+ And I press "Save"
18
+ Then I should be on the Dashboard
19
+ And I should see "'Page test from Dashboard' was successfully created."
20
+ And I should have 1 page
21
+
22
+ Scenario: Update a Page Button
23
+ When I follow "Update a page"
24
+ Then I should be on the list of pages
25
+
26
+ Scenario: Upload a File Button
27
+ When I follow "Upload a file"
28
+ Then I should be on the new file form
29
+
30
+ Scenario: Upload an Image Button
31
+ When I follow "Upload an image"
32
+ Then I should be on the new image form
33
+
34
+ Scenario: See Home Page Button
35
+ When I follow "See home page"
36
+ Then I should be on the home page
37
+
38
+ Scenario: Translation options available
39
+ When I go to the Dashboard
40
+ Then I should see "English Change Language"
41
+
42
+ Scenario: Change Language to Slovenian and back to English
43
+ When I go to the dashboard
44
+ And I follow "English Change Language"
45
+ And I follow "Slovenian"
46
+ Then I should be on the Dashboard
47
+ And I should see "Slovenian Spremeni Jezik"
48
+ And I should not see "Switch to your website"
49
+ # Back to English
50
+ When I follow "Slovenian Spremeni Jezik"
51
+ And I follow "English"
52
+ Then I should be on the Dashboard
53
+ And I should see "Switch to your website"
54
+ And I should not see "Spremeni Jezik"
@@ -0,0 +1,14 @@
1
+ module NavigationHelpers
2
+ module Refinery
3
+ module Dashboard
4
+ def path_to(page_name)
5
+ case page_name
6
+ when /the (d|D)ashboard/
7
+ admin_dashboard_path
8
+ else
9
+ nil
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -48,16 +48,16 @@ class Admin::ImagesController < Admin::BaseController
48
48
 
49
49
  #This returns a url. If params[:size] is provided, it will generate a url for this size.
50
50
  def url
51
- @image = Image.find params[:id]
52
- if params[:size].blank?
53
- render :json => { :error => false, :url => @image.url, :width => @image.width, :height => @image.height }
54
- else
51
+ @image = Image.find(params[:id])
52
+ if params[:size].present?
55
53
  begin
56
- width, height = params[:size].split("x")
57
- render :json => { :error => false, :url => @image.url(params[:size]), :width => width.to_i, :height => height.to_i }
54
+ thumbnail = @image.thumbnail(params[:size])
55
+ render :json => { :error => false, :url => thumbnail.url, :width => thumbnail.width, :height => thumbnail.height }
58
56
  rescue RuntimeError
59
57
  render :json => { :error => true }
60
58
  end
59
+ else
60
+ render :json => { :error => false, :url => @image.url, :width => @image.width, :height => @image.height }
61
61
  end
62
62
  end
63
63
 
@@ -14,7 +14,7 @@ module Admin::ImagesHelper
14
14
 
15
15
  def change_list_mode_if_specified
16
16
  if action_name == 'index' and params[:view].present? and image_views.include?(params[:view].to_sym)
17
- RefinerySetting[:preferred_image_view] = params[:view]
17
+ RefinerySetting.set(:preferred_image_view, params[:view])
18
18
  end
19
19
  end
20
20
 
@@ -4,7 +4,7 @@
4
4
  <ul>
5
5
  <% @images.each do |image| %>
6
6
  <li<%= " class='selected'" if @image_id == image.id %>>
7
- <%= image_fu(image, :dialog_thumb, {
7
+ <%= image_fu(image, '106x106#c', {
8
8
  :alt => image.title,
9
9
  :title => image.title,
10
10
  :id => "image_#{image.id}",
@@ -24,19 +24,21 @@
24
24
  </p>
25
25
  <ul>
26
26
  <%
27
- thumbnail_sizes = RefinerySetting.find_or_set(:image_thumbnails, {})
28
- (sizes = RefinerySetting.find_or_set(:image_dialogue_sizes, [:small, :medium, :large])).each_with_index do |size, index|
29
- if thumbnail_sizes.keys.include?(size) and (pixels = thumbnail_sizes[size]).present?
30
- pixels.to_s.gsub!(/[<>=]/, '')
27
+ (sizes = RefinerySetting.find_or_set(:user_image_sizes, {
28
+ :small => '110x110>',
29
+ :medium => '225x255>',
30
+ :large => '450x450>'
31
+ })
32
+ ).sort_by{|k,v| v}.each_with_index do |(size, pixels), index|
33
+ safe_pixels = pixels.to_s.gsub(/[<>=]/, '')
31
34
  -%>
32
- <li id="image_dialog_size_<%= index %>" class="image_dialog_size <%= 'selected' if size == :medium %>">
33
- <%= link_to size.to_s, "##{size}",
34
- :'data-size' => pixels,
35
- :title => "#{size} image (#{pixels} px)",
36
- :tooltip => "#{size} image (#{pixels} px)" %>
37
- </li>
38
- <% end
39
- end -%>
35
+ <li id="image_dialog_size_<%= index %>" class="image_dialog_size <%= 'selected' if size.to_s == 'medium' %>">
36
+ <%= link_to size.to_s, "##{size}",
37
+ :'data-size' => pixels,
38
+ :title => "#{size} image (#{safe_pixels})",
39
+ :tooltip => "#{size} image (#{safe_pixels})" %>
40
+ </li>
41
+ <% end -%>
40
42
  </ul>
41
43
  </div>
42
44
  <% end %>
@@ -1,7 +1,7 @@
1
1
  <ul id="image_grid" class="clearfix">
2
2
  <% @images.each_with_index do |image, index| -%>
3
3
  <li id="image_<%= image.id %>" class='image_<%= index % 5 %>'>
4
- <%= image_fu image, :grid, :title => image.title %>
4
+ <%= image_fu image, '135x135#c', :title => image.title %>
5
5
  <span class='actions'>
6
6
  <%= link_to refinery_icon_tag('eye.png'), image.url,
7
7
  :target => "_blank",
@@ -5,7 +5,7 @@
5
5
  <span class='actions'>
6
6
  <%= link_to refinery_icon_tag('eye.png'), list_view_image.url,
7
7
  :target => "_blank",
8
- :title => "#{image_fu list_view_image, :preview}" %>
8
+ :title => "#{image_fu list_view_image, '96x96#c'}" %>
9
9
  <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_image_path(list_view_image),
10
10
  :title => t('admin.images.edit') %>
11
11
  <%= link_to refinery_icon_tag('delete.png'), admin_image_path(list_view_image),
@@ -2,41 +2,37 @@ de:
2
2
  plugins:
3
3
  refinery_images:
4
4
  title: Bilder
5
- no_file_chosen: Sie müssen ein Bild zum Hochladen wählen.
6
- image_should_be_smaller_than_max_image_size: Dateien sollten kleiner als %{max_image_size} sein
7
- image_must_be_these_formats: Ihr Bild muss im Format JPG, PNG oder GIF vorliegen
5
+ description: Verwaltet Bilder
6
+ image_specify_for_upload: Sie müssen ein Bild zum Hochladen angeben
7
+ image_should_be_smaller_than_max_image_size: Bild sollte kleiner als %{max_image_size} sein
8
+ image_must_be_these_formats: 'Ihr Bild sollte ein JPG, PNG oder GIF sein'
8
9
  admin:
9
10
  images:
10
- image:
11
- delete:
12
- message: Sind Sie sicher, dass Sie '%{title}' löschen möchten?
13
- title: Dieses Bild für immer löschen
11
+ delete: Dieses Bild für immer löschen
12
+ edit: Dieses Bild bearbeiten
14
13
  form:
15
14
  image: Bild
16
15
  use_current_image: Aktuelles Bild verwenden
17
16
  or: oder
18
- replace_image: Oder durch dieses ersetzen ...
17
+ replace_image: " mit diesem ersetzen..."
19
18
  current_image: Aktuelles Bild
20
- maximum_image_size: "Die maximale Bildgröße beträgt %{megabytes} Megabyte."
19
+ maximum_image_size: Die maximale Größe eines Bildes beträgt %{megabytes} Megabytes.
21
20
  index:
22
- create_new_image: Neues Bild erstellen
23
- no_images_yet: Es wurden noch keine Bilder erstellt. Klicken Sie auf "Neues Bild erstellen" um Ihr erstes Bild zu erstellen.
21
+ create_new_image: Neues Bild anlegen
22
+ no_images_yet: Es sind noch keine Bilder vorhanden. Klicken Sie auf "Neues Bild anlegen", um Ihr estes Bild hinzuzufügen.
24
23
  view:
25
- switch_to: Zur Ansicht "%{view_name}" wechseln
26
- list: Liste
24
+ switch_to: Zur %{view_name}-Ansicht wechseln
25
+ list: Listen
27
26
  grid: Gitter
28
- search:
29
- results_for: Suchergebnisse für %{query}
30
27
  grid_view:
31
- edit: Dieses Bild bearbeiten
32
- view_live: Dieses Bild anzeigen <br/><em>Öffnet ein neues Fenster</em>
33
- list_view_image:
34
- edit_this_image: Dieses Bild bearbeiten
28
+ view_live: Dieses Bild betrachten <br/><em>Öffnet sich in einem neuen Fenster</em>
29
+ existing_image:
30
+ button_text: Einfügen
31
+ resize_image: Bild in der Größe ändern?
32
+ size: Größe
35
33
  insert:
36
- existing_image: Existierendes Bild
34
+ existing_image: Vorhandenes Bild
37
35
  new_image: Neues Bild
38
- previous: vorheriges
39
- next: nächstes
40
- submit_insert: Einfügen
41
- or: oder
42
- cancel: Abbrechen
36
+ activerecord:
37
+ models:
38
+ image: Bild