pageflow 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pageflow might be problematic. Click here for more details.
- checksums.yaml +8 -8
- data/admins/pageflow/membership.rb +1 -2
- data/admins/pageflow/user.rb +1 -1
- data/app/assets/javascripts/pageflow/editor/base.js +1 -0
- data/app/assets/javascripts/pageflow/editor/collections/chapter_pages_collection.js +36 -0
- data/app/assets/javascripts/pageflow/editor/collections/mixins/files_collection.js +2 -1
- data/app/assets/javascripts/pageflow/editor/collections/mixins/ordered_collection.js +17 -0
- data/app/assets/javascripts/pageflow/editor/collections/subset_collection.js +0 -2
- data/app/assets/javascripts/pageflow/editor/controllers/sidebar_controller.js +5 -2
- data/app/assets/javascripts/pageflow/editor/models/chapter.js +3 -25
- data/app/assets/javascripts/pageflow/editor/models/encoding_confirmation.js +40 -6
- data/app/assets/javascripts/pageflow/editor/models/page.js +7 -5
- data/app/assets/javascripts/pageflow/editor/routers/sidebar_router.js +1 -0
- data/app/assets/javascripts/pageflow/editor/templates/blank_entry.jst.ejs +8 -0
- data/app/assets/javascripts/pageflow/editor/templates/confirm_encoding.jst.ejs +8 -2
- data/app/assets/javascripts/pageflow/editor/templates/file_item.jst.ejs +1 -0
- data/app/assets/javascripts/pageflow/editor/templates/publish_entry.jst.ejs +6 -0
- data/app/assets/javascripts/pageflow/editor/views/blank_entry_view.js +4 -0
- data/app/assets/javascripts/pageflow/editor/views/confirm_encoding_view.js +10 -4
- data/app/assets/javascripts/pageflow/editor/views/confirmable_file_item_view.js +1 -0
- data/app/assets/javascripts/pageflow/editor/views/entry_preview_view.js +2 -1
- data/app/assets/javascripts/pageflow/editor/views/file_item_view.js +8 -0
- data/app/assets/javascripts/pageflow/editor/views/publish_entry_view.js +5 -1
- data/app/assets/javascripts/pageflow/editor/views/sortable_collection_view.js +8 -4
- data/app/assets/stylesheets/pageflow/editor/base.css.scss +2 -1
- data/app/assets/stylesheets/pageflow/editor/blank_entry.css.scss +46 -0
- data/app/assets/stylesheets/pageflow/editor/confirm_encoding.css.scss +84 -0
- data/app/assets/stylesheets/pageflow/editor/dialogs.css.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/files.css.scss +5 -0
- data/app/assets/stylesheets/pageflow/editor/publish_entry.css.scss +15 -0
- data/app/assets/stylesheets/pageflow/navigation_bar.css.scss +5 -5
- data/app/assets/stylesheets/pageflow/player_controls.css.scss +2 -6
- data/app/assets/stylesheets/pageflow/themes/default/anchors.css.scss +2 -2
- data/app/assets/stylesheets/pageflow/themes/default/page.css.scss +1 -0
- data/app/controllers/pageflow/application_controller.rb +4 -0
- data/app/controllers/pageflow/editor/encoding_confirmations_controller.rb +1 -1
- data/app/helpers/pageflow/admin/memberships_helper.rb +52 -0
- data/app/helpers/pageflow/admin/users_helper.rb +9 -0
- data/app/helpers/pageflow/entries_helper.rb +26 -10
- data/app/models/pageflow/entry.rb +1 -0
- data/app/views/admin/memberships/_form.html.erb +2 -2
- data/app/views/pageflow/editor/entries/_entry.json.jbuilder +2 -0
- data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +1 -0
- data/app/views/pageflow/entries/_navigation.html.erb +1 -7
- data/app/views/pageflow/entries/_social_meta_tags.html.erb +1 -1
- data/app/views/pageflow/entries/navigation/_bar_top.html.erb +1 -9
- data/app/views/pageflow/entries/navigation/_credits_box_content.html.erb +5 -0
- data/config/locales/editor/blank_entry.yml +9 -0
- data/lib/pageflow/user_mixin.rb +4 -0
- data/lib/pageflow/version.rb +1 -1
- metadata +658 -652
- data/app/assets/stylesheets/pageflow/editor/confirmable_files.css.scss +0 -67
- data/app/helpers/pageflow/application_helper.rb +0 -4
- data/app/helpers/pageflow/users_helper.rb +0 -15
@@ -10,7 +10,8 @@ pageflow.PublishEntryView = Backbone.Marionette.ItemView.extend({
|
|
10
10
|
publishForeverRadioBox: 'input[value=publish_forever]',
|
11
11
|
revisionsLink: '.published.notice a',
|
12
12
|
publishedNotice: '.published.notice',
|
13
|
-
saveButton: 'button.save'
|
13
|
+
saveButton: 'button.save',
|
14
|
+
successLink: '.success a'
|
14
15
|
},
|
15
16
|
|
16
17
|
events: {
|
@@ -53,6 +54,8 @@ pageflow.PublishEntryView = Backbone.Marionette.ItemView.extend({
|
|
53
54
|
this.$el.toggleClass('published', this.model.get('published'));
|
54
55
|
|
55
56
|
this.ui.revisionsLink.attr('href', '/admin/entries/' + this.model.id);
|
57
|
+
this.ui.successLink.attr('href', this.model.get('pretty_url'));
|
58
|
+
this.ui.successLink.text(this.model.get('pretty_url'));
|
56
59
|
|
57
60
|
var publishedUntil = new Date(this.model.get('published_until'));
|
58
61
|
if (publishedUntil > new Date()) {
|
@@ -104,6 +107,7 @@ pageflow.PublishEntryView = Backbone.Marionette.ItemView.extend({
|
|
104
107
|
if (that.isClosed) { return; }
|
105
108
|
|
106
109
|
that.$el.removeClass('publishing');
|
110
|
+
that.$el.addClass('succeeded');
|
107
111
|
that.$('input').removeAttr('disabled');
|
108
112
|
that.enableSave();
|
109
113
|
});
|
@@ -17,7 +17,7 @@ pageflow.SortableCollectionView = pageflow.CollectionView.extend({
|
|
17
17
|
receive: _.bind(function(event, ui) {
|
18
18
|
var view = ui.item.data('view');
|
19
19
|
|
20
|
-
this.
|
20
|
+
this.reindexPositions();
|
21
21
|
|
22
22
|
this.itemViews.add(view);
|
23
23
|
this.collection.add(view.model);
|
@@ -47,11 +47,15 @@ pageflow.SortableCollectionView = pageflow.CollectionView.extend({
|
|
47
47
|
},
|
48
48
|
|
49
49
|
updateOrder: function() {
|
50
|
-
this
|
51
|
-
$(this).data('view').model.set('position', index);
|
52
|
-
});
|
50
|
+
this.reindexPositions();
|
53
51
|
|
54
52
|
this.collection.sort();
|
55
53
|
this.collection.saveOrder();
|
54
|
+
},
|
55
|
+
|
56
|
+
reindexPositions: function() {
|
57
|
+
this.$el.children().each(function(index) {
|
58
|
+
$(this).data('view').model.set('position', index);
|
59
|
+
});
|
56
60
|
}
|
57
61
|
});
|
@@ -3,6 +3,7 @@
|
|
3
3
|
@import "pageflow/animations";
|
4
4
|
|
5
5
|
@import 'pageflow/jquery_ui';
|
6
|
+
@import "./blank_entry";
|
6
7
|
@import "./dialogs";
|
7
8
|
@import "./colors";
|
8
9
|
@import "./embedded";
|
@@ -49,7 +50,7 @@
|
|
49
50
|
@import "./menu";
|
50
51
|
@import "./manage_files";
|
51
52
|
@import "./files";
|
52
|
-
@import "./
|
53
|
+
@import "./confirm_encoding";
|
53
54
|
@import "./files_gallery";
|
54
55
|
@import "./file_meta_data";
|
55
56
|
@import "./file_stages";
|
@@ -0,0 +1,46 @@
|
|
1
|
+
.blank_entry {
|
2
|
+
margin: 0 auto;
|
3
|
+
top: 5%;
|
4
|
+
position: relative;
|
5
|
+
font-family: "SourceSansPro";
|
6
|
+
font-size: 17px;
|
7
|
+
letter-spacing: 0.01em;
|
8
|
+
text-align: center;
|
9
|
+
width: 50%;
|
10
|
+
color: #333;
|
11
|
+
|
12
|
+
h2 {
|
13
|
+
font-size: 30px;
|
14
|
+
font-weight: normal;
|
15
|
+
letter-spacing: 0.02em;
|
16
|
+
text-transform: uppercase;
|
17
|
+
color: #999;
|
18
|
+
|
19
|
+
&:before {
|
20
|
+
content: "";
|
21
|
+
display: block;
|
22
|
+
margin: 0 auto 30px auto;
|
23
|
+
width: 61px;
|
24
|
+
height: 60px;
|
25
|
+
background-image: image-url('pageflow/themes/default/logo_header.png');
|
26
|
+
opacity: 0.3;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
em {
|
31
|
+
font-weight: bold;
|
32
|
+
font-style: normal;
|
33
|
+
}
|
34
|
+
|
35
|
+
ol {
|
36
|
+
display: inline-block;
|
37
|
+
text-align: left;
|
38
|
+
padding: 20px 50px;
|
39
|
+
border-bottom: solid 1px #aaa;
|
40
|
+
border-top: solid 1px #aaa;
|
41
|
+
}
|
42
|
+
|
43
|
+
li {
|
44
|
+
padding: 15px 0;
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
.confirm_encoding {
|
2
|
+
.blank_slate {
|
3
|
+
background-color: #fff;
|
4
|
+
margin: 10px 0;
|
5
|
+
padding: 20px 0;
|
6
|
+
|
7
|
+
p {
|
8
|
+
margin: 10px 5px;
|
9
|
+
text-align: center;
|
10
|
+
}
|
11
|
+
|
12
|
+
a {
|
13
|
+
text-decoration: underline;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
ul.confirmable_files {
|
18
|
+
margin-bottom: 15px;
|
19
|
+
|
20
|
+
li {
|
21
|
+
background-color: #eee;
|
22
|
+
margin-bottom: 2px;
|
23
|
+
position: relative;
|
24
|
+
padding: 10px 10px 0 30px;
|
25
|
+
white-space: nowrap;
|
26
|
+
overflow: hidden;
|
27
|
+
height: 23px;
|
28
|
+
}
|
29
|
+
|
30
|
+
input[type=checkbox] {
|
31
|
+
display: block;
|
32
|
+
position: absolute;
|
33
|
+
top: 10px;
|
34
|
+
left: 10px;
|
35
|
+
width: auto;
|
36
|
+
height: auto;
|
37
|
+
}
|
38
|
+
|
39
|
+
.file_name {
|
40
|
+
position: absolute;
|
41
|
+
left: 30px;
|
42
|
+
top: 9px;
|
43
|
+
right: 100px;
|
44
|
+
overflow: hidden;
|
45
|
+
text-overflow: ellipsis;
|
46
|
+
|
47
|
+
font-weight: normal;
|
48
|
+
font-size: 13px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.duration {
|
52
|
+
position: absolute;
|
53
|
+
right: 50px;
|
54
|
+
top: 9px;
|
55
|
+
}
|
56
|
+
|
57
|
+
.actions {
|
58
|
+
position: absolute;
|
59
|
+
right: 10px;
|
60
|
+
top: 3px;
|
61
|
+
text-align: right;
|
62
|
+
|
63
|
+
a {
|
64
|
+
float: left;
|
65
|
+
margin-left: 5px;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
a.remove {
|
70
|
+
@include icon-only-button(#aaa);
|
71
|
+
@include trash-icon;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
button.confirm {
|
76
|
+
@include icon-button;
|
77
|
+
@include check-icon;
|
78
|
+
|
79
|
+
&.checking {
|
80
|
+
@include arrows-ccw-icon;
|
81
|
+
@include background-icon-animation(blink);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
@@ -50,6 +50,7 @@ ul.files {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
a.cancel,
|
53
|
+
a.confirm,
|
53
54
|
a.remove,
|
54
55
|
a.retry {
|
55
56
|
@include icon-only-button(#aaa);
|
@@ -63,6 +64,10 @@ ul.files {
|
|
63
64
|
@include cancel-icon;
|
64
65
|
}
|
65
66
|
|
67
|
+
a.confirm {
|
68
|
+
@include check-icon;
|
69
|
+
}
|
70
|
+
|
66
71
|
a.retry {
|
67
72
|
@include arrows-ccw-icon;
|
68
73
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
.publish_entry {
|
2
2
|
.notice.files_pending,
|
3
3
|
.notice.published,
|
4
|
+
.notice.success,
|
4
5
|
&.published .notice.not_published {
|
5
6
|
display: none;
|
6
7
|
}
|
@@ -19,6 +20,16 @@
|
|
19
20
|
display: block;
|
20
21
|
}
|
21
22
|
|
23
|
+
&.succeeded {
|
24
|
+
> div {
|
25
|
+
display: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
.notice.success {
|
29
|
+
display: block;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
22
33
|
.notice {
|
23
34
|
@include background-icon-left($left: 10px, $top: 18px);
|
24
35
|
|
@@ -37,6 +48,10 @@
|
|
37
48
|
@include eye-icon;
|
38
49
|
}
|
39
50
|
|
51
|
+
&.success {
|
52
|
+
@include check-icon;
|
53
|
+
}
|
54
|
+
|
40
55
|
p {
|
41
56
|
margin-bottom: 10px;
|
42
57
|
}
|
@@ -176,6 +176,10 @@ $nav-color: #9c9c9c;
|
|
176
176
|
-webkit-mask-image: none;
|
177
177
|
}
|
178
178
|
}
|
179
|
+
|
180
|
+
p {
|
181
|
+
margin: 0 0 0.5em;
|
182
|
+
}
|
179
183
|
}
|
180
184
|
|
181
185
|
.navigation_share_box {
|
@@ -213,13 +217,9 @@ $nav-color: #9c9c9c;
|
|
213
217
|
color: #b4c552;
|
214
218
|
}
|
215
219
|
|
216
|
-
a.legal {
|
220
|
+
a.legal, a.copy {
|
217
221
|
float: left;
|
218
222
|
}
|
219
|
-
|
220
|
-
a.copy {
|
221
|
-
float: right;
|
222
|
-
}
|
223
223
|
}
|
224
224
|
|
225
225
|
.navigation_menu {
|
@@ -8,7 +8,7 @@ $anchor-color: $main-color;
|
|
8
8
|
text-decoration: none;
|
9
9
|
pointer-events: all;
|
10
10
|
position: relative;
|
11
|
-
margin-left:
|
11
|
+
margin-left: 6px;
|
12
12
|
margin-right: 6px;
|
13
13
|
|
14
14
|
&:hover {
|
@@ -16,7 +16,7 @@ $anchor-color: $main-color;
|
|
16
16
|
}
|
17
17
|
|
18
18
|
@include phone {
|
19
|
-
margin-left:
|
19
|
+
margin-left: 5px;
|
20
20
|
margin-right: 5px;
|
21
21
|
}
|
22
22
|
|
@@ -11,6 +11,10 @@ module Pageflow
|
|
11
11
|
|
12
12
|
include EditLocking
|
13
13
|
|
14
|
+
rescue_from ActionController::UnknownFormat do
|
15
|
+
render(status: 404, text: 'Not found')
|
16
|
+
end
|
17
|
+
|
14
18
|
rescue_from ActiveRecord::RecordNotFound do
|
15
19
|
respond_to do |format|
|
16
20
|
format.html { render :file => Rails.root.join('public/404.html'), :status => :not_found }
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Pageflow
|
2
|
+
module Admin
|
3
|
+
module MembershipsHelper
|
4
|
+
def membership_entries_collection_for_parent(parent)
|
5
|
+
CollectionForParent.new(parent,
|
6
|
+
collection_method: :entries,
|
7
|
+
display_method: :title,
|
8
|
+
order: 'title ASC').pairs
|
9
|
+
end
|
10
|
+
|
11
|
+
def membership_users_collection_for_parent(parent)
|
12
|
+
CollectionForParent.new(parent,
|
13
|
+
collection_method: :users,
|
14
|
+
display_method: :formal_name,
|
15
|
+
order: 'last_name ASC, first_name ASC').pairs
|
16
|
+
end
|
17
|
+
|
18
|
+
class CollectionForParent
|
19
|
+
attr_reader :parent, :options
|
20
|
+
|
21
|
+
def initialize(parent, options)
|
22
|
+
@parent = parent
|
23
|
+
@options = options
|
24
|
+
end
|
25
|
+
|
26
|
+
def pairs
|
27
|
+
items.each_with_object([]) do |item, result|
|
28
|
+
result << [display(item), item.id]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def items
|
35
|
+
items_in_account - items_in_parent
|
36
|
+
end
|
37
|
+
|
38
|
+
def display(item)
|
39
|
+
item.send(options[:display_method])
|
40
|
+
end
|
41
|
+
|
42
|
+
def items_in_account
|
43
|
+
parent.account.send(options[:collection_method]).order(options[:order])
|
44
|
+
end
|
45
|
+
|
46
|
+
def items_in_parent
|
47
|
+
parent.respond_to?(options[:collection_method]) ? parent.send(options[:collection_method]) : []
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -4,20 +4,36 @@ module Pageflow
|
|
4
4
|
pageflow.short_entry_url(entry.to_model, Pageflow.config.theming_url_options(entry.theming))
|
5
5
|
end
|
6
6
|
|
7
|
-
def entry_collection_for_parent(parent)
|
8
|
-
if parent.is_a?(User)
|
9
|
-
parent.account.entries - parent.entries
|
10
|
-
else
|
11
|
-
parent.account.entries
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
7
|
def entry_file_rights(entry)
|
16
|
-
[:audio_files, :image_files, :video_files].map do |collection|
|
8
|
+
rights = [:audio_files, :image_files, :video_files].map do |collection|
|
17
9
|
entry.send(collection).map do |file|
|
18
10
|
file.rights.presence || entry.account.default_file_rights
|
19
11
|
end
|
20
|
-
end.flatten.sort.uniq
|
12
|
+
end.flatten.sort.uniq
|
13
|
+
|
14
|
+
if rights.any?
|
15
|
+
content_tag :p, class: 'rights' do
|
16
|
+
"Bildrechte: " + rights * ', '
|
17
|
+
end
|
18
|
+
else
|
19
|
+
''
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def entry_global_links(entry)
|
24
|
+
links = []
|
25
|
+
if entry.theming.imprint_link_label.present? && entry.theming.imprint_link_url.present?
|
26
|
+
links << link_to(raw(entry.theming.imprint_link_label), entry.theming.imprint_link_url, :target => '_blank', :tabindex => 2, :class => 'legal')
|
27
|
+
end
|
28
|
+
if entry.theming.copyright_link_label.present? && entry.theming.copyright_link_url.present?
|
29
|
+
links << link_to(raw(entry.theming.copyright_link_label), entry.theming.copyright_link_url, :target => '_blank', :tabindex => 2, :class => 'copy')
|
30
|
+
end
|
31
|
+
|
32
|
+
if links.any?
|
33
|
+
content_tag(:h2, 'Globale Links', :class => 'hidden') + safe_join(links, ''.html_safe)
|
34
|
+
else
|
35
|
+
''
|
36
|
+
end
|
21
37
|
end
|
22
38
|
|
23
39
|
def entry_theme_stylesheet_link_tag(entry)
|