Commit 75df2a0
committed
Make entry templates editable
Before this change, only one entry template for paged entry type was
editable through the account form, and a scrolled entry template would
be initialized on creation of the first scrolled entry, but not
persisted to the database.
We add an entry template admin for new/create and edit/update
actions. It is accessible only from an entry template tab on account
show page of accounts that have already been created.
We need to customize breadcrumbs and redirects, since there isn't an
index page or a show page for entry templates. To make it clear to the
user what they are currently editing, we customize the form's page
title, as well.
The account now has a list of existing and potential entry templates
that is used to populate the entry templates tab on its show
page. This'll probably change at some point when we allow multiple
entry templates per account/entry type.
Entry template provides translated entry type name as a virtual
attribute for use in several places in the admin.
Even though account publishers cannot access the account show page,
they would be able to edit entry templates using a link, if they have
it.
The account form hints where the form fields have gone. There isn't a
link to the entry templates tab, because for account create, this link
wouldn't work yet.
For now, the entry templates form hard-codes the fact that currently
available config and widget inputs are for the paged entry type. When
we make the analytics widget available for scrolled entry type, this
is likely to change.
Entry templates tab contains entries for all existing entry templates
and all those that could be created according to enabled entry
types. If an entry type is disabled, its corresponding entry template
is not displayed here anymore.
`config_for` can now deal with an entry template argument, which is
used in the entry templates form to retrieve an account config for the
entry template's account.
REDMINE-173061 parent f217566 commit 75df2a0
File tree
21 files changed
+770
-395
lines changed- admins/pageflow
- app
- models/pageflow
- policies/pageflow
- views
- admin
- accounts
- entry_templates
- components/pageflow/admin
- config
- initializers
- locales/new
- lib/pageflow
- spec
- controllers/admin
- features/account_manager
- policies/pageflow
- support/dominos/admin
- views/components/pageflow/admin
21 files changed
+770
-395
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
| |||
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 80 | | |
91 | 81 | | |
92 | 82 | | |
93 | | - | |
94 | | - | |
| 83 | + | |
95 | 84 | | |
96 | 85 | | |
97 | 86 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 87 | | |
108 | 88 | | |
109 | 89 | | |
110 | 90 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 91 | | |
117 | 92 | | |
118 | 93 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 94 | | |
150 | 95 | | |
151 | 96 | | |
| |||
154 | 99 | | |
155 | 100 | | |
156 | 101 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 102 | | |
164 | 103 | | |
165 | 104 | | |
| |||
172 | 111 | | |
173 | 112 | | |
174 | 113 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 114 | | |
195 | 115 | | |
196 | 116 | | |
| |||
200 | 120 | | |
201 | 121 | | |
202 | 122 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | 123 | | |
209 | 124 | | |
210 | 125 | | |
| |||
219 | 134 | | |
220 | 135 | | |
221 | 136 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | 137 | | |
235 | 138 | | |
236 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
33 | 53 | | |
34 | 54 | | |
35 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
0 commit comments