pageflow-external-links 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +3 -0
  3. data/CHANGELOG.md +24 -3
  4. data/README.md +6 -0
  5. data/app/assets/{javascript → javascripts}/pageflow/external_links.js +0 -0
  6. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor.js +0 -0
  7. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/collections/site_references_collection.js +0 -0
  8. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/collections/sites_collection.js +0 -0
  9. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/config.js +0 -0
  10. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/controllers/sidebar_controller.js +0 -0
  11. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/models/configuration_mixin.js +0 -0
  12. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/models/site.js +1 -1
  13. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/models/site_file_selection_handler.js +0 -0
  14. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/models/site_reference.js +0 -0
  15. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/models/site_selection_handler.js +0 -0
  16. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/routers/sidebar_router.js +0 -0
  17. data/app/assets/javascripts/pageflow/external_links/editor/templates/edit_site.jst.ejs +10 -0
  18. data/app/assets/javascripts/pageflow/external_links/editor/templates/embedded/list_item.jst.ejs +9 -0
  19. data/app/assets/javascripts/pageflow/external_links/editor/templates/inputs/site_reference.jst.ejs +7 -0
  20. data/app/assets/javascripts/pageflow/external_links/editor/templates/site_item.jst.ejs +6 -0
  21. data/app/assets/javascripts/pageflow/external_links/editor/templates/site_reference_item.jst.ejs +6 -0
  22. data/app/assets/javascripts/pageflow/external_links/editor/templates/sites.jst.ejs +1 -0
  23. data/app/assets/javascripts/pageflow/external_links/editor/templates/sites_blank_slate.jst.ejs +1 -0
  24. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/configuration_editor.js +0 -0
  25. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/edit_site_view.js +2 -2
  26. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/embedded/list_embedded_view.js +0 -0
  27. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/embedded/list_item_embedded_view.js +26 -2
  28. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/inputs/site_reference_input_view.js +0 -0
  29. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/site_item_view.js +1 -1
  30. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/site_reference_item_view.js +1 -1
  31. data/app/assets/{javascript → javascripts}/pageflow/external_links/editor/views/sites_view.js +0 -0
  32. data/app/assets/{javascript → javascripts}/pageflow/external_links/page_type.js +0 -0
  33. data/app/assets/stylesheets/pageflow/external_links.css.scss +1 -0
  34. data/app/assets/stylesheets/pageflow/external_links/editor.css.scss +2 -0
  35. data/app/assets/stylesheets/pageflow/external_links/editor/embedded.css.scss +24 -0
  36. data/app/views/pageflow/external_links/sites/_site.html.erb +1 -1
  37. data/config/locales/de.yml +83 -17
  38. data/config/locales/en.yml +84 -0
  39. data/db/migrate/20141218183701_change_site_url_to_text.rb +5 -0
  40. data/lib/generators/pageflow_external_links/install/install_generator.rb +7 -0
  41. data/lib/pageflow-external-links.rb +7 -0
  42. data/lib/pageflow/external_links/plugin.rb +9 -0
  43. data/pageflow-external-links.gemspec +2 -2
  44. metadata +40 -35
  45. data/app/assets/javascript/pageflow/external_links/editor/templates/edit_site.jst.ejs +0 -10
  46. data/app/assets/javascript/pageflow/external_links/editor/templates/embedded/list_item.jst.ejs +0 -5
  47. data/app/assets/javascript/pageflow/external_links/editor/templates/inputs/site_reference.jst.ejs +0 -7
  48. data/app/assets/javascript/pageflow/external_links/editor/templates/site_item.jst.ejs +0 -6
  49. data/app/assets/javascript/pageflow/external_links/editor/templates/site_reference_item.jst.ejs +0 -6
  50. data/app/assets/javascript/pageflow/external_links/editor/templates/sites.jst.ejs +0 -1
  51. data/app/assets/javascript/pageflow/external_links/editor/templates/sites_blank_slate.jst.ejs +0 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODU5OTA5OGZkNDhmNWFiYjVlYjk2NjAyZmM4MWIwZWM2Yjk5MjBmZQ==
4
+ Y2I3YWE2NmUxYTE0NTgzMjUxOWFjM2RlYjVhMWNmM2RiM2IyM2I3OQ==
5
5
  data.tar.gz: !binary |-
6
- N2QxN2ZhYTQ3ZmQ2OTBmMDVkZWEwYTY2ODNiM2VkYTViMmRkMmRlNw==
6
+ Mjg3ZDcwMjFiMDhmNjgzODFmYjI5Yjc5NGFlMDY3ZGM0YzUzYTM5Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2M3NTZmMzJlNzVjNmY5ZGVhNjI5YWJhZWMyNDJlODg2YzY4YzBiYzk5ODAx
10
- OGFkNjdhNTU5NmZlZTAxYmNhMzA3ODNjYWVlN2IyMGFmMjRhNTZmYTlkMzY4
11
- MTBkNTM2NjQ1M2Y0MTFjYmExMjRkYjZlYmNkMzFhZTI1ZmQ5MzI=
9
+ NGI5YmRlM2Q3ZGY2NjgyNWE0NzY1ZmNlYTMyOTMwNTE2YzY3ZmIyMDk0ODRh
10
+ YmYwZjA0Nzg4ZDlkMGIxNTUxMjIwNjIzZWNkOGU0MmYxZTc3MjFlOTFkOThi
11
+ YjVmMTg2OTI0ZmUwMWIzMjZiZjhhY2JhN2E0NThiNWQ0OWRmMWQ=
12
12
  data.tar.gz: !binary |-
13
- MDI3ZWRkNDA0NDVmN2U2NzY5Yzg4YzE5NjIzZGQzMGMyNDI3MzY1YzE0YTVh
14
- NGI2NWIwM2IwNzJlMGRhNDk2Y2JmZGI3MWEyYjdkOWE4NmE3OTFhYzNhNGNi
15
- ODkzNTMyNDI3ZjUyMTMwMDQ2ZTA3YzcxZTM1Mzc1OWQxZDkwYmE=
13
+ YmYyZWQxNDZmZTdjNDU5YTVkZThiYTA5YjYyODllYjExYWQ0MWUxYjk3NWE4
14
+ NjM3Zjc2MGM4MjRjOWJlYmQwYmU4NjVlM2UxNDJiMTNmOWU1ODEzM2RjNGFj
15
+ YWYzODNlYjY2OGZiOTZiY2MzMTU0MjRmNTMxMTk1NjA2ZDMzYWU=
data/.gitignore CHANGED
@@ -17,3 +17,6 @@ test/version_tmp
17
17
  tmp
18
18
  log
19
19
  Gemfile.lock
20
+
21
+ .localeapp
22
+ .localeapp
data/CHANGELOG.md CHANGED
@@ -1,13 +1,34 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### 0.2.0
4
+
5
+ 2015-02-03
6
+
7
+ - Localization for `en` and `de`.
8
+ ([#10](https://github.com/codevise/pageflow-external-links/pull/10),
9
+ [#12](https://github.com/codevise/pageflow-external-links/pull/12))
10
+ - Display message when trying to open links in same tab from the editor.
11
+ ([#7](https://github.com/codevise/pageflow-external-links/pull/7))
12
+ - Use text column to allow for long URLs.
13
+ ([#8](https://github.com/codevise/pageflow-external-links/pull/8))
14
+ - Prevent nested links from breaking the layout.
15
+ ([#11](https://github.com/codevise/pageflow-external-links/pull/11))
16
+ - Add inline help for site thumbnail.
17
+ ([#5](https://github.com/codevise/pageflow-external-links/pull/5))
18
+ - Add editor help entry for sites.
19
+ ([#13](https://github.com/codevise/pageflow-external-links/pull/13))
20
+ - Add `page_type` factory method.
21
+ ([#4](https://github.com/codevise/pageflow-external-links/pull/4))
22
+ - Fix name of javascript assets directory.
23
+ ([#3](https://github.com/codevise/pageflow-external-links/pull/3))
24
+
3
25
  ### 0.1.0
4
26
 
5
27
  - Use public Pageflow helper to render thumbnails.
6
- ([#2](https://github.com/codevise/pageflow/pull/2))
28
+ ([#2](https://github.com/codevise/pageflow-external-links/pull/2))
7
29
  - README typo fixes.
8
- ([#1](https://github.com/codevise/pageflow/pull/1))
30
+ ([#1](https://github.com/codevise/pageflow-external-links/pull/1))
9
31
 
10
32
  ### 0.0.1
11
33
 
12
34
  - Initial release
13
-
data/README.md CHANGED
@@ -57,3 +57,9 @@ If you run into problems while installing the page type, please also refer to th
57
57
  page in the [Pageflow repository](https://github.com/codevise/pageflow). If that
58
58
  doesn't help, consider
59
59
  [filing an issue](https://github.com/codevise/pageflow-external-links/issues).
60
+
61
+ ## Contributing Locales
62
+
63
+ Edit the translations directly on the
64
+ [pageflow-external-links](http://www.localeapp.com/projects/public?search=tf/pageflow-external-links)
65
+ locale project.
@@ -1,7 +1,7 @@
1
1
  pageflow.externalLinks.Site = Backbone.Model.extend({
2
2
  modelName: 'site',
3
3
  paramRoot: 'site',
4
- i18nKey: 'site',
4
+ i18nKey: 'pageflow/external_links/site',
5
5
 
6
6
  mixins: [pageflow.failureTracking, pageflow.transientReferences],
7
7
 
@@ -0,0 +1,10 @@
1
+ <a class="back"><%= I18n.t('pageflow.external_links.editor.templates.edit_site.back') %></a>
2
+ <a class="destroy"><%= I18n.t('pageflow.external_links.editor.templates.edit_site.destroy') %></a>
3
+
4
+ <div class="failure">
5
+ <p><%= I18n.t('pageflow.external_links.editor.templates.edit_site.failure') %></p>
6
+ <p class="message"></p>
7
+ <a class="retry" href=""><%= I18n.t('pageflow.external_links.editor.templates.edit_site.retry') %></a>
8
+ </div>
9
+
10
+ <div class="form_container"></div>
@@ -0,0 +1,9 @@
1
+ <div class="link-thumbnail"></div>
2
+ <div class="link-details">
3
+ <p class="link-title"></p>
4
+ <p class="link-description"></p>
5
+ </div>
6
+ <div class="tooltip">
7
+ <%= I18n.t('pageflow.external_links.editor.templates.embedded.list_item.open_in_new_tab_message') %>
8
+ <span target="_blank"><%= I18n.t('pageflow.external_links.editor.templates.embedded.list_item.open_in_new_tab') %></span>
9
+ </div>
@@ -0,0 +1,7 @@
1
+ <label>
2
+ <span class="name"></span>
3
+ <span class="inline_help"></span>
4
+ </label>
5
+ <ul class="sites outline"></ul>
6
+
7
+ <a href="" class="add_reference"><%= I18n.t('pageflow.external_links.editor.templates.inputs.site_reference.add') %></a>
@@ -0,0 +1,6 @@
1
+ <a href="">
2
+ <span class="thumbnail"></span>
3
+ <span class="title"></span>
4
+ <span class="failure_icon" title="<%= I18n.t('pageflow.external_links.editor.templates.site_item.failure') %>" />
5
+ </a>
6
+ <a class="select"><%= I18n.t('pageflow.external_links.editor.templates.site_item.select') %></a>
@@ -0,0 +1,6 @@
1
+ <a href="">
2
+ <span class="thumbnail"></span>
3
+ <span class="title"></span>
4
+ <a class="edit" title="<%= I18n.t('pageflow.external_links.editor.templates.site_reference_item.edit') %>"></a>
5
+ <a class="remove" title="<%= I18n.t('pageflow.external_links.editor.templates.site_reference_item.remove') %>"></a>
6
+ </a>
@@ -0,0 +1 @@
1
+ <a class="add" href=""><%= I18n.t('pageflow.external_links.editor.templates.sites.add') %></a>
@@ -0,0 +1 @@
1
+ <li class="blank_slate"><%= I18n.t('pageflow.external_links.editor.templates.sites_blank_slate.text') %><li>
@@ -44,14 +44,14 @@ pageflow.externalLinks.EditSiteView = Backbone.Marionette.Layout.extend({
44
44
  });
45
45
 
46
46
  if (this.options.returnTo === 'page' && this.options.page) {
47
- this.ui.backButton.text('Zurück');
47
+ this.ui.backButton.text(I18n.t('pageflow.external_links.editor.views.edit_site.back'));
48
48
  }
49
49
 
50
50
  this.formContainer.show(configurationEditor);
51
51
  },
52
52
 
53
53
  destroy: function() {
54
- if (confirm("Externen Verweis wirklich löschen?\n\nAlle Benutzungen dieses Verweises auf Seiten werden ebenfalls entfernt. Dieser Schritt kann nicht rückgängig gemacht werden.")) {
54
+ if (confirm(I18n.t('pageflow.external_links.editor.views.edit_site.confirm_destroy'))) {
55
55
  this.model.destroy();
56
56
  this.goBack();
57
57
  }
@@ -7,7 +7,30 @@ pageflow.externalLinks.ListItemEmbeddedView = Backbone.Marionette.ItemView.exten
7
7
  ui: {
8
8
  title: '.link-title',
9
9
  description: '.link-description',
10
- thumbnail: '.link-thumbnail'
10
+ thumbnail: '.link-thumbnail',
11
+ tooltip: '.tooltip'
12
+ },
13
+
14
+ events: {
15
+ 'click': function(event) {
16
+ if (event.currentTarget.target) {
17
+ event.stopPropagation();
18
+ }
19
+ else {
20
+ this.ui.tooltip.show();
21
+ return false;
22
+ }
23
+ },
24
+
25
+ 'mouseleave': function() {
26
+ this.ui.tooltip.hide();
27
+ },
28
+
29
+ 'click .tooltip': function() {
30
+ window.open(this.$el.attr('href'), '_blank');
31
+ this.ui.tooltip.hide();
32
+ return false;
33
+ }
11
34
  },
12
35
 
13
36
  onRender: function() {
@@ -20,11 +43,12 @@ pageflow.externalLinks.ListItemEmbeddedView = Backbone.Marionette.ItemView.exten
20
43
 
21
44
  this.ui.title.text(site.get('title'));
22
45
  this.ui.description.html(site.get('description'));
46
+ this.ui.tooltip.hide();
23
47
 
24
48
  this.$el.toggleClass('no_text', blank(site.get('title')) && blank(site.get('description')));
25
49
 
26
50
  this.$el.attr('href', site.get('url'));
27
- this.$el.attr('blank', site.get('open_in_new_tab') ? '_blank' : null);
51
+ this.$el.attr('target', site.get('open_in_new_tab') ? '_blank' : null);
28
52
 
29
53
  this.updateThumbnailView(site);
30
54
 
@@ -38,7 +38,7 @@ pageflow.externalLinks.SiteItemView = Backbone.Marionette.ItemView.extend({
38
38
  },
39
39
 
40
40
  update: function() {
41
- this.ui.title.text(this.model.get('title') || '(Unbenannt)');
41
+ this.ui.title.text(this.model.get('title') || I18n.t('pageflow.external_links.editor.views.site_item_view.unknown'));
42
42
  this.ui.selectButton.toggle(!!this.options.selectionHandler);
43
43
  }
44
44
  });
@@ -27,6 +27,6 @@ pageflow.externalLinks.SiteReferenceItemView = Backbone.Marionette.ItemView.exte
27
27
  model: this.model.get('site').getThumbnail()
28
28
  }));
29
29
 
30
- this.ui.title.text(this.model.get('site').get('title') || '(Unbenannt)');
30
+ this.ui.title.text(this.model.get('site').get('title') || I18n.t('pageflow.external_links.editor.views.site_item_reference_view.unknown'));
31
31
  },
32
32
  });
@@ -90,6 +90,7 @@
90
90
 
91
91
  .link-item {
92
92
  display: inline-block;
93
+ position: relative;
93
94
  width: 24%;
94
95
  width: 250px;
95
96
  background-color: rgb(20,20,20);
@@ -1,3 +1,5 @@
1
+ @import "./editor/embedded";
2
+
1
3
  .editor {
2
4
  .manage_external_sites {
3
5
  a.add {
@@ -0,0 +1,24 @@
1
+ .ext-links {
2
+ .tooltip {
3
+ position: absolute;
4
+ left: 50%;
5
+ top: 102px;
6
+ width: 180px;
7
+ padding: 5px;
8
+ margin-left: -95px;
9
+
10
+ background-color: #444;
11
+ color: #fff;
12
+ border: solid 1px #fff;
13
+ opacity: 0.7;
14
+ font-size: 13px;
15
+ text-align: center;
16
+ white-space: normal;
17
+
18
+ span {
19
+ display: block;
20
+ color: #fff;
21
+ text-decoration: underline;
22
+ }
23
+ }
24
+ }
@@ -5,6 +5,6 @@
5
5
  <%= content_tag(:div, '', class: external_links_site_thumbnail_css_class(site)) %>
6
6
  <div class="link-details">
7
7
  <p class="link-title"><%= site.title %></p>
8
- <p class="link-description"><%= raw(site.description) %></p>
8
+ <p class="link-description"><%= raw(strip_links(site.description)) %></p>
9
9
  </div>
10
10
  <% end %>
@@ -1,21 +1,87 @@
1
1
  de:
2
+ activerecord:
3
+ attributes:
4
+ pageflow/external_links/site:
5
+ description: Beschreibung
6
+ open_in_new_tab: In neuem Tab öffnen
7
+ thumbnail: Teaserbild
8
+ title: Titel
9
+ url: Ziel URL
10
+ pageflow/page:
11
+ linked_external_site_perma_ids: Externe Seiten
2
12
  pageflow:
3
13
  external_links:
4
- page_type_name: "Externe-Verweise"
5
- manage_sites: "Externe Verweise verwalten"
6
- editor:
14
+ editor:
15
+ templates:
16
+ edit_site:
17
+ back: Externe Verweise
18
+ destroy: Löschen
19
+ failure: Beim Speichern des externen Verweises ist ein Problem aufgetreten.
20
+ retry: Erneut versuchen
21
+ embedded:
22
+ list_item:
23
+ open_in_new_tab: Seite in neuem Tab ansehen
24
+ open_in_new_tab_message: Öffnen im selben Tab ist im Editor deaktiviert.
25
+ inputs:
26
+ site_reference:
27
+ add: Hinzufügen
28
+ site_item:
29
+ failure: Beim Speichern der Seite ist ein Fehler aufgetreten.
30
+ select: Auswählen
31
+ site_reference_item:
32
+ edit: Bearbeiten
33
+ remove: Löschen
34
+ sites:
35
+ add: Hinzufügen
36
+ sites_blank_slate:
37
+ text: Es wurden noch keine Seiten erstellt.
38
+ views:
39
+ edit_site:
40
+ back: Zurück
41
+ confirm_destroy: ! 'Externen Verweis wirklich löschen?
42
+
43
+
44
+ Alle Benutzungen dieses Verweises auf Seiten werden ebenfalls entfernt. Dieser Schritt kann nicht rückgängig gemacht werden.'
45
+ site_item_reference_view:
46
+ unknown: (Unbenannt)
47
+ site_item_view:
48
+ unknown: (Unbenannt)
49
+ help_entries:
50
+ page_type:
51
+ menu_item: Externe Verweise
52
+ text: ! '# Externe Verweise
53
+
54
+
55
+ Sammlung von Verweisen zu Webseiten ausserhalb des Pageflows
56
+
57
+
58
+ Zu dem üblichen Hintergrund-Bild können hier Verweise auf externe Webseiten
59
+
60
+ eingebunden werden, die sich bei Klick in einem neuen Browserfenster öffnen. Pro
61
+
62
+ Verweis kann jeweils ein Bild, ein Titel und eine Beschreibung verwendet werden.
63
+
64
+ Achtung: Mit jedem Verweis auf eine externe Webseite riskierst Du, dass User
65
+
66
+ möglicherweise aus Deinem Pageflow aussteigen bzw. von dem neu geöffneten Fenster
67
+
68
+ nicht zurückkehren. Erfahrungsgemäß empfiehlt sich daher die Verwendung solcher Links
69
+
70
+ eher im hinteren Teil Deines Pageflows.
71
+
72
+
73
+ Typische Anwendungsbeispiele: Vertiefungen, Quellen, Twitter- und Facebook-Feeds, Backlinks zur Homepage'
74
+ sites:
75
+ menu_item: Externe Verweise verwalten
76
+ text: ! "# Externe Verweise verwalten\n\nMit „Externe Verweise“ verwaltest Du Links auf Webseiten, die Du in eine Reportage einbinden möchtest. Hierzu kannst Du sowohl Bilder als „Teaser“, als auch Infotext zur Beschreibung des Verweises benutzen.\n\nDiese Verweise werden vom Seitentyp „Externe Verweise“ verwendet.\nDer Verwendung externer Links bietet sich beispielsweise an, um bestimmte Themen weiter zu vertiefen. \n\nBeachte bitte, dass diese Links eher zum Ende eines Pageflows eingesetzt werden sollten, da sie die Möglichkeit eines vorzeitigen Ausstieges aus der Reportage anbieten."
77
+ manage_sites: Externe Verweise verwalten
78
+ page_type_category_name: Verweise
79
+ page_type_description: Sammlung von Verweisen zu Webseiten außerhalb des Pageflows
80
+ page_type_help_entry:
81
+ title: ! 'Externe Verweise Seitentyp: Inhalte optisch ansprechend abrunden'
82
+ page_type_name: Externe-Verweise
83
+ ui:
7
84
  inline_help:
8
- site:
9
- description: "Empfohlene Textlänge: bis zu 220 Zeichen"
10
- activerecord:
11
- attributes:
12
- site:
13
- url: "Ziel URL"
14
- open_in_new_tab: "In neuem Tab öffnen"
15
- title: "Titel"
16
- description: "Beschreibung"
17
- thumbnail: "Thumbnail"
18
- page:
19
- linked_external_site_perma_ids: "Externe Seiten"
20
- "pageflow/page":
21
- linked_external_site_perma_ids: "Externe Seiten"
85
+ pageflow/external_links/site:
86
+ description: ! 'Empfohlene Textlänge: bis zu 220 Zeichen'
87
+ thumbnail: ! 'Empfohlenes Seitenverhältnis: 16:9'
@@ -0,0 +1,84 @@
1
+ en:
2
+ activerecord:
3
+ attributes:
4
+ pageflow/external_links/site:
5
+ description: Description
6
+ open_in_new_tab: Open in new tab
7
+ thumbnail: Thumbnail
8
+ title: Title
9
+ url: Target URL
10
+ pageflow/page:
11
+ linked_external_site_perma_ids: External Sites
12
+ pageflow:
13
+ external_links:
14
+ editor:
15
+ templates:
16
+ edit_site:
17
+ back: Back
18
+ destroy: Delete
19
+ failure: There was an error while saving the external link.
20
+ retry: Retry
21
+ embedded:
22
+ list_item:
23
+ open_in_new_tab: Open in new tab
24
+ open_in_new_tab_message: Opening in same tab is disabled inside the editor
25
+ inputs:
26
+ site_reference:
27
+ add: Add
28
+ site_item:
29
+ failure: There was an error while saving the site.
30
+ select: Select
31
+ site_reference_item:
32
+ edit: Edit
33
+ remove: Remove
34
+ sites:
35
+ add: Add
36
+ sites_blank_slate:
37
+ text: There are no sites yet.
38
+ views:
39
+ edit_site:
40
+ back: Back
41
+ confirm_destroy: ! 'Are you sure you want to delete this site?
42
+
43
+
44
+ All usages of this site on external link pages will also be removed. This action cannot be undone.'
45
+ site_item_reference_view:
46
+ unknown: (New site)
47
+ site_item_view:
48
+ unknown: (New site)
49
+ help_entries:
50
+ page_type:
51
+ menu_item: External Links
52
+ text: ! '# External Links
53
+
54
+
55
+ Collection of References to Websites outside of Pageflow
56
+
57
+
58
+ Besides a standard background-image you can embedlinks to external websites, which open in a new window. For each link you can add a title, description and picture. Note: With each link you risk losing the users to the other websites Empirically it is advisable to use external references in the end of the Pageflow.
59
+
60
+
61
+ Examples of application: Consolidation, Resources, Twitter and Facebook feeds, links to own homepage'
62
+ sites:
63
+ menu_item: Manging External Sites
64
+ text: ! '# Manging External Sites
65
+
66
+
67
+ With „external sites“ you manage links to external websites, which you want to integrate into your Pageflow. You can choose photos as a teaser and write a description for the links.
68
+
69
+
70
+ The references are used for the page-type „External Links“. External links allow you to explore a topic in more depth.
71
+
72
+
73
+ Please note, that these links should rather be placed at the end of a Pageflow, because they offer a premature exit from the Pageflow. '
74
+ manage_sites: Manage external sites
75
+ page_type_category_name: Links
76
+ page_type_description: Allows linking to external websites with a thumbnail and description text.
77
+ page_type_help_entry:
78
+ title: ! 'External Links: Round off your story with further readings'
79
+ page_type_name: External Links
80
+ ui:
81
+ inline_help:
82
+ pageflow/external_links/site:
83
+ description: ! 'Suggested text length: 220 chars'
84
+ thumbnail: ! 'Suggested aspect ratio: 16:9'
@@ -0,0 +1,5 @@
1
+ class ChangeSiteUrlToText < ActiveRecord::Migration
2
+ def change
3
+ change_column(:pageflow_external_links_sites, :url, :text)
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module PageflowExternalLinks
2
+ class InstallGenerator < Pageflow::PageTypeInstallGenerator
3
+ def engine
4
+ Pageflow::ExternalLinks::Engine
5
+ end
6
+ end
7
+ end
@@ -2,5 +2,12 @@ require 'pageflow/external_links/engine'
2
2
 
3
3
  module Pageflow
4
4
  module ExternalLinks
5
+ def self.page_type
6
+ ExternalLinks::PageType.new
7
+ end
8
+
9
+ def self.plugin
10
+ ExternalLinks::Plugin.new
11
+ end
5
12
  end
6
13
  end
@@ -0,0 +1,9 @@
1
+ module Pageflow
2
+ module ExternalLinks
3
+ class Plugin < Pageflow::Plugin
4
+ def configure(config)
5
+ config.help_entries.register('pageflow.external_links.help_entries.sites', priority: 49)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "pageflow-external-links"
5
- spec.version = "0.1.0"
5
+ spec.version = "0.2.0"
6
6
  spec.authors = ["Tim Fischbach"]
7
7
  spec.email = ["tfischbach@codevise.de"]
8
8
  spec.summary = "Pageflow Page Type for links to external sites"
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
15
  spec.require_paths = ["lib"]
16
16
 
17
- spec.add_runtime_dependency 'pageflow', '>= 0.5.0'
17
+ spec.add_runtime_dependency 'pageflow', '~> 0.7'
18
18
 
19
19
  # Using translations from rails locales in javascript code.
20
20
  spec.add_runtime_dependency 'i18n-js'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-external-links
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Fischbach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-24 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: '0.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.0
26
+ version: '0.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: i18n-js
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -126,47 +126,52 @@ files:
126
126
  - app/assets/images/pageflow/external_links_pictogram_small.png
127
127
  - app/assets/images/pageflow/external_links_sprite.png
128
128
  - app/assets/images/pageflow/ov-external_links.png
129
- - app/assets/javascript/pageflow/external_links.js
130
- - app/assets/javascript/pageflow/external_links/editor.js
131
- - app/assets/javascript/pageflow/external_links/editor/collections/site_references_collection.js
132
- - app/assets/javascript/pageflow/external_links/editor/collections/sites_collection.js
133
- - app/assets/javascript/pageflow/external_links/editor/config.js
134
- - app/assets/javascript/pageflow/external_links/editor/controllers/sidebar_controller.js
135
- - app/assets/javascript/pageflow/external_links/editor/models/configuration_mixin.js
136
- - app/assets/javascript/pageflow/external_links/editor/models/site.js
137
- - app/assets/javascript/pageflow/external_links/editor/models/site_file_selection_handler.js
138
- - app/assets/javascript/pageflow/external_links/editor/models/site_reference.js
139
- - app/assets/javascript/pageflow/external_links/editor/models/site_selection_handler.js
140
- - app/assets/javascript/pageflow/external_links/editor/routers/sidebar_router.js
141
- - app/assets/javascript/pageflow/external_links/editor/templates/edit_site.jst.ejs
142
- - app/assets/javascript/pageflow/external_links/editor/templates/embedded/list_item.jst.ejs
143
- - app/assets/javascript/pageflow/external_links/editor/templates/inputs/site_reference.jst.ejs
144
- - app/assets/javascript/pageflow/external_links/editor/templates/site_item.jst.ejs
145
- - app/assets/javascript/pageflow/external_links/editor/templates/site_reference_item.jst.ejs
146
- - app/assets/javascript/pageflow/external_links/editor/templates/sites.jst.ejs
147
- - app/assets/javascript/pageflow/external_links/editor/templates/sites_blank_slate.jst.ejs
148
- - app/assets/javascript/pageflow/external_links/editor/views/configuration_editor.js
149
- - app/assets/javascript/pageflow/external_links/editor/views/edit_site_view.js
150
- - app/assets/javascript/pageflow/external_links/editor/views/embedded/list_embedded_view.js
151
- - app/assets/javascript/pageflow/external_links/editor/views/embedded/list_item_embedded_view.js
152
- - app/assets/javascript/pageflow/external_links/editor/views/inputs/site_reference_input_view.js
153
- - app/assets/javascript/pageflow/external_links/editor/views/site_item_view.js
154
- - app/assets/javascript/pageflow/external_links/editor/views/site_reference_item_view.js
155
- - app/assets/javascript/pageflow/external_links/editor/views/sites_view.js
156
- - app/assets/javascript/pageflow/external_links/page_type.js
129
+ - app/assets/javascripts/pageflow/external_links.js
130
+ - app/assets/javascripts/pageflow/external_links/editor.js
131
+ - app/assets/javascripts/pageflow/external_links/editor/collections/site_references_collection.js
132
+ - app/assets/javascripts/pageflow/external_links/editor/collections/sites_collection.js
133
+ - app/assets/javascripts/pageflow/external_links/editor/config.js
134
+ - app/assets/javascripts/pageflow/external_links/editor/controllers/sidebar_controller.js
135
+ - app/assets/javascripts/pageflow/external_links/editor/models/configuration_mixin.js
136
+ - app/assets/javascripts/pageflow/external_links/editor/models/site.js
137
+ - app/assets/javascripts/pageflow/external_links/editor/models/site_file_selection_handler.js
138
+ - app/assets/javascripts/pageflow/external_links/editor/models/site_reference.js
139
+ - app/assets/javascripts/pageflow/external_links/editor/models/site_selection_handler.js
140
+ - app/assets/javascripts/pageflow/external_links/editor/routers/sidebar_router.js
141
+ - app/assets/javascripts/pageflow/external_links/editor/templates/edit_site.jst.ejs
142
+ - app/assets/javascripts/pageflow/external_links/editor/templates/embedded/list_item.jst.ejs
143
+ - app/assets/javascripts/pageflow/external_links/editor/templates/inputs/site_reference.jst.ejs
144
+ - app/assets/javascripts/pageflow/external_links/editor/templates/site_item.jst.ejs
145
+ - app/assets/javascripts/pageflow/external_links/editor/templates/site_reference_item.jst.ejs
146
+ - app/assets/javascripts/pageflow/external_links/editor/templates/sites.jst.ejs
147
+ - app/assets/javascripts/pageflow/external_links/editor/templates/sites_blank_slate.jst.ejs
148
+ - app/assets/javascripts/pageflow/external_links/editor/views/configuration_editor.js
149
+ - app/assets/javascripts/pageflow/external_links/editor/views/edit_site_view.js
150
+ - app/assets/javascripts/pageflow/external_links/editor/views/embedded/list_embedded_view.js
151
+ - app/assets/javascripts/pageflow/external_links/editor/views/embedded/list_item_embedded_view.js
152
+ - app/assets/javascripts/pageflow/external_links/editor/views/inputs/site_reference_input_view.js
153
+ - app/assets/javascripts/pageflow/external_links/editor/views/site_item_view.js
154
+ - app/assets/javascripts/pageflow/external_links/editor/views/site_reference_item_view.js
155
+ - app/assets/javascripts/pageflow/external_links/editor/views/sites_view.js
156
+ - app/assets/javascripts/pageflow/external_links/page_type.js
157
157
  - app/assets/stylesheets/pageflow/external_links.css.scss
158
158
  - app/assets/stylesheets/pageflow/external_links/editor.css.scss
159
+ - app/assets/stylesheets/pageflow/external_links/editor/embedded.css.scss
159
160
  - app/controllers/pageflow/external_links/sites_controller.rb
160
161
  - app/helpers/pageflow/external_links/sites_helper.rb
161
162
  - app/models/pageflow/external_links/site.rb
162
163
  - app/views/pageflow/external_links/page.html
163
164
  - app/views/pageflow/external_links/sites/_site.html.erb
164
165
  - config/locales/de.yml
166
+ - config/locales/en.yml
165
167
  - config/routes.rb
166
168
  - db/migrate/20140616153235_create_pageflow_external_links_sites.rb
169
+ - db/migrate/20141218183701_change_site_url_to_text.rb
170
+ - lib/generators/pageflow_external_links/install/install_generator.rb
167
171
  - lib/pageflow-external-links.rb
168
172
  - lib/pageflow/external_links/engine.rb
169
173
  - lib/pageflow/external_links/page_type.rb
174
+ - lib/pageflow/external_links/plugin.rb
170
175
  - pageflow-external-links.gemspec
171
176
  homepage: ''
172
177
  licenses:
@@ -188,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
193
  version: '0'
189
194
  requirements: []
190
195
  rubyforge_project:
191
- rubygems_version: 2.2.2
196
+ rubygems_version: 2.4.2
192
197
  signing_key:
193
198
  specification_version: 4
194
199
  summary: Pageflow Page Type for links to external sites
@@ -1,10 +0,0 @@
1
- <a class="back">Externe Verweise</a>
2
- <a class="destroy">Löschen</a>
3
-
4
- <div class="failure">
5
- <p>Beim Speichern des externen Verweises ist ein Problem aufgetreten.</p>
6
- <p class="message"></p>
7
- <a class="retry" href="">Erneut versuchen</a>
8
- </div>
9
-
10
- <div class="form_container"></div>
@@ -1,5 +0,0 @@
1
- <div class="link-thumbnail"></div>
2
- <div class="link-details">
3
- <p class="link-title"></p>
4
- <p class="link-description"></p>
5
- </div>
@@ -1,7 +0,0 @@
1
- <label>
2
- <span class="name"></span>
3
- <span class="inline_help"></span>
4
- </label>
5
- <ul class="sites outline"></ul>
6
-
7
- <a href="" class="add_reference">Hinzufügen</a>
@@ -1,6 +0,0 @@
1
- <a href="">
2
- <span class="thumbnail"></span>
3
- <span class="title"></span>
4
- <span class="failure_icon" title="Beim Speichern der Seite ist ein Fehler aufgetreten." />
5
- </a>
6
- <a class="select">Auswählen</a>
@@ -1,6 +0,0 @@
1
- <a href="">
2
- <span class="thumbnail"></span>
3
- <span class="title"></span>
4
- <a class="edit" title="Bearbeiten"></a>
5
- <a class="remove" title="Löschen"></a>
6
- </a>
@@ -1 +0,0 @@
1
- <a class="add" href="">Hinzufügen</a>
@@ -1 +0,0 @@
1
- <li class="blank_slate">Es wurden noch keine Seiten erstellt.<li>