Compare commits
592 commits
rails2-sta
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d34735e1de | ||
![]() |
91114fd837 | ||
![]() |
81dd47e649 | ||
![]() |
30ea168afd | ||
![]() |
976b607ff5 | ||
![]() |
4e8e714099 | ||
![]() |
0bb265521c | ||
![]() |
67a177fbb1 | ||
![]() |
f4b647cc93 | ||
![]() |
c72d5d65f6 | ||
![]() |
ccf9c0e5c0 | ||
![]() |
92d5455d94 | ||
![]() |
86fa2d2f5d | ||
![]() |
6fa5bbdf33 | ||
![]() |
538e6653f0 | ||
![]() |
5577b8e701 | ||
![]() |
1cd514b3c9 | ||
![]() |
65f84593fa | ||
![]() |
ab1fa7ec32 | ||
![]() |
d1bfab99ce | ||
![]() |
69b9699fca | ||
![]() |
7e1b4831f1 | ||
![]() |
8f6007c2ba | ||
![]() |
976fafb9df | ||
![]() |
18065463e6 | ||
![]() |
8b8ce1f21b | ||
![]() |
dbeed9bb77 | ||
![]() |
70f7be1652 | ||
![]() |
9a150112ae | ||
![]() |
981fc6ef68 | ||
![]() |
d36af516ea | ||
![]() |
14cd410324 | ||
![]() |
3627b8f865 | ||
![]() |
cc6800d17e | ||
![]() |
3a1c30fa5d | ||
![]() |
8584cc942b | ||
![]() |
7f4ac3b6d4 | ||
![]() |
72375e0a00 | ||
![]() |
6df59131f1 | ||
![]() |
2a00257420 | ||
![]() |
cb88d9508e | ||
![]() |
dd3002f8bb | ||
![]() |
0c78cd138d | ||
![]() |
435763f307 | ||
![]() |
f8e38d516a | ||
![]() |
31bdd586f2 | ||
![]() |
96448fc374 | ||
![]() |
3049816aa9 | ||
![]() |
460351e81f | ||
![]() |
fccc86e63c | ||
![]() |
1a3e0d057c | ||
![]() |
0ea3690741 | ||
![]() |
52b1fce8aa | ||
![]() |
c6f36117a7 | ||
![]() |
6958ab82df | ||
![]() |
215ea87e45 | ||
![]() |
2e79e4f7a9 | ||
![]() |
9bcf2b3dda | ||
![]() |
70d8f46c12 | ||
![]() |
8edc3ab3dd | ||
![]() |
4e7847dcbe | ||
![]() |
594dd8ca96 | ||
![]() |
837ddfe42b | ||
![]() |
44ec487542 | ||
![]() |
bd2bcc0f2a | ||
![]() |
98f8d3f515 | ||
![]() |
d353cd556c | ||
![]() |
5eaad8997f | ||
![]() |
2537923034 | ||
![]() |
c9ff548329 | ||
![]() |
5ea1b7399b | ||
![]() |
f82d2c96e4 | ||
![]() |
aa729edc84 | ||
![]() |
c37461cc43 | ||
![]() |
5440fad815 | ||
![]() |
602759af1b | ||
![]() |
4f0b5f8223 | ||
![]() |
39fc086982 | ||
![]() |
29809838f4 | ||
![]() |
45cad84f49 | ||
![]() |
2bcb7c8551 | ||
![]() |
e05fedb9b7 | ||
![]() |
dee1a9d539 | ||
![]() |
f140ed284f | ||
![]() |
94ae01ce6f | ||
![]() |
922bc8b98f | ||
![]() |
aaf26e22d2 | ||
![]() |
80187eac7d | ||
![]() |
2275cde2ac | ||
![]() |
1af631b501 | ||
![]() |
34fd7b7b89 | ||
![]() |
6cfebfae84 | ||
![]() |
6d06af3400 | ||
![]() |
5691a96a9d | ||
![]() |
ba9091cd14 | ||
![]() |
5c3de1175f | ||
![]() |
e1d6605d23 | ||
![]() |
e63bf074af | ||
![]() |
0df8829a59 | ||
![]() |
1244370bc5 | ||
![]() |
c9e5edcf6d | ||
![]() |
82a929d60a | ||
![]() |
a85aaf6aaa | ||
![]() |
bd7daa09ae | ||
![]() |
76998c2885 | ||
![]() |
33bfa4dd23 | ||
![]() |
30ebf2d338 | ||
![]() |
adcf66751c | ||
![]() |
e46f0549c6 | ||
![]() |
2a672af348 | ||
![]() |
f9d51ed549 | ||
![]() |
44a059a475 | ||
![]() |
f8cd5804ad | ||
![]() |
d8bdcb482c | ||
![]() |
c89b4dfc1f | ||
![]() |
6b1fcc8ea1 | ||
![]() |
e274bb1757 | ||
![]() |
d1ad82d42e | ||
![]() |
f62ad53f8f | ||
![]() |
79a7551e73 | ||
![]() |
be73028ee8 | ||
![]() |
5eab0be340 | ||
![]() |
492fd663ca | ||
![]() |
ea2f177b0d | ||
![]() |
3abf537eaa | ||
![]() |
ad0b7f6ac8 | ||
![]() |
083fd20ee5 | ||
![]() |
3dbbbbfdda | ||
![]() |
4eb17bb58d | ||
![]() |
f77592bc05 | ||
![]() |
b1e4fd0094 | ||
![]() |
b3a25c1b68 | ||
![]() |
2a2fcca649 | ||
![]() |
889127a58c | ||
![]() |
d642260538 | ||
![]() |
becdbfaa9b | ||
![]() |
bbc6e90939 | ||
![]() |
63b0bec5ff | ||
![]() |
e3e5bcffc3 | ||
![]() |
7dd6cb5e60 | ||
![]() |
edfa8b81e7 | ||
![]() |
4a8a46ccc7 | ||
![]() |
d6e9af98ef | ||
![]() |
0eb88e2d95 | ||
![]() |
d108f9c5df | ||
![]() |
5e650f6800 | ||
![]() |
c84d887187 | ||
![]() |
223a719300 | ||
![]() |
fd0521bb99 | ||
![]() |
26243ddade | ||
![]() |
567bdd6334 | ||
![]() |
547c8bcff2 | ||
![]() |
de5c02994c | ||
![]() |
9a8d38ad78 | ||
![]() |
8cc819aeed | ||
![]() |
7c63d8188e | ||
![]() |
cc316ceb5b | ||
![]() |
04b49b2371 | ||
![]() |
3bef84c3f8 | ||
![]() |
3a7a9198a4 | ||
![]() |
c0cecdaad9 | ||
![]() |
9255e1a71e | ||
![]() |
d90c831cca | ||
![]() |
1d5dfb1fdd | ||
![]() |
92e8230194 | ||
![]() |
f9f56c6f1c | ||
![]() |
12164fd95a | ||
![]() |
2b045432f9 | ||
![]() |
81475ff380 | ||
![]() |
f5d94d60b8 | ||
![]() |
36c005ecd1 | ||
![]() |
d18364d359 | ||
![]() |
9936281bb8 | ||
![]() |
a85b7ffab0 | ||
![]() |
151629f044 | ||
![]() |
c2a0ef9f41 | ||
![]() |
fd7ce5e692 | ||
![]() |
b1baeba3d2 | ||
![]() |
be06f1658d | ||
![]() |
3165574730 | ||
![]() |
4577f788e5 | ||
![]() |
e01e9ff9b7 | ||
![]() |
14daff297b | ||
![]() |
2b73c292c8 | ||
![]() |
5a958007c5 | ||
![]() |
8cd4a282d8 | ||
![]() |
0de4fd9582 | ||
![]() |
4ddc2b3754 | ||
![]() |
5dd11ffc61 | ||
![]() |
993b4a8b1b | ||
![]() |
db93751fd6 | ||
![]() |
1b3195bf30 | ||
![]() |
4ab9eccdee | ||
![]() |
64d83c5ce4 | ||
![]() |
eb487f0e4e | ||
![]() |
754cddb141 | ||
![]() |
85419ce88e | ||
![]() |
ff960785df | ||
![]() |
19ee4b8f69 | ||
![]() |
84e1a277cb | ||
![]() |
ea4f1961b2 | ||
![]() |
ceaf2a0aa7 | ||
![]() |
5e91670a80 | ||
![]() |
df0664b142 | ||
![]() |
8a69c623bb | ||
![]() |
1b51e2343d | ||
![]() |
362088d027 | ||
![]() |
be7d341532 | ||
![]() |
de4cc6b9ef | ||
![]() |
c40eb83af3 | ||
![]() |
d37ef11f63 | ||
![]() |
7fe5fe5de6 | ||
![]() |
66b445ad5c | ||
![]() |
76be452faf | ||
![]() |
65cb81b4c0 | ||
![]() |
af16fd8263 | ||
![]() |
c1903f5797 | ||
![]() |
20cffcee84 | ||
![]() |
cc3be37a41 | ||
![]() |
6be013e0c0 | ||
![]() |
d8f36a4196 | ||
![]() |
88556fe709 | ||
![]() |
f584651b58 | ||
![]() |
b9c44d851e | ||
![]() |
4d4ae4e682 | ||
![]() |
e35e3994d5 | ||
![]() |
ba38b63370 | ||
![]() |
3431b15ef3 | ||
![]() |
ec6ed3f951 | ||
![]() |
7903bdfed2 | ||
![]() |
40be4f71ee | ||
![]() |
6212e60f9e | ||
![]() |
80ca7c1bf9 | ||
![]() |
4439f6afda | ||
![]() |
0497261f39 | ||
![]() |
67cc6b4512 | ||
![]() |
2053a022a2 | ||
![]() |
fc68f22858 | ||
![]() |
1779274971 | ||
![]() |
97ad55cbf0 | ||
![]() |
05bc8bc962 | ||
![]() |
34e5da1347 | ||
![]() |
5e5c6a78af | ||
![]() |
2bd8df5d4f | ||
![]() |
372235b963 | ||
![]() |
0791d3a2e5 | ||
![]() |
2f695519da | ||
![]() |
9df6580d9c | ||
![]() |
36affef45e | ||
![]() |
33967b1649 | ||
![]() |
32b52f975f | ||
![]() |
6b73469c1a | ||
![]() |
d0681c273c | ||
![]() |
d8f82439eb | ||
![]() |
5e6f9bc270 | ||
![]() |
9363e8d8c5 | ||
![]() |
8434790df7 | ||
![]() |
028489bf15 | ||
![]() |
eaaa351f3a | ||
![]() |
aed0b8f173 | ||
![]() |
13cafc0947 | ||
![]() |
87bc12a1e4 | ||
![]() |
9b74f31a2a | ||
![]() |
79c63a56e0 | ||
![]() |
cb2bcf387c | ||
![]() |
dbd2561fe6 | ||
![]() |
e70193ca11 | ||
![]() |
dbb02d953f | ||
![]() |
fbcf2bd34a | ||
![]() |
d0d5d9eb7d | ||
![]() |
7ae6e146b2 | ||
![]() |
83d407c8bb | ||
![]() |
eca7a1a591 | ||
![]() |
45d8663de5 | ||
![]() |
cfba1b86d1 | ||
![]() |
ad784342dd | ||
![]() |
87f478e664 | ||
![]() |
0516a2cc00 | ||
![]() |
82ca14af89 | ||
![]() |
ee215655cb | ||
![]() |
8bd056e3e8 | ||
![]() |
84a2fcdf08 | ||
![]() |
c3b7d0b1d2 | ||
![]() |
a23689a6aa | ||
![]() |
1c186d26d0 | ||
![]() |
c481c78afa | ||
![]() |
e85535da5f | ||
![]() |
d3eff64d19 | ||
![]() |
274ba14ea2 | ||
![]() |
13c35c2620 | ||
![]() |
00d71519a9 | ||
![]() |
5e24eeb3d2 | ||
![]() |
21b19db5a3 | ||
![]() |
3454a9c300 | ||
![]() |
fddcebd878 | ||
![]() |
476ad3f158 | ||
![]() |
806aef1858 | ||
![]() |
a86b7698a1 | ||
![]() |
999f9e7c0e | ||
![]() |
bd3591c6d1 | ||
![]() |
302c1ea05a | ||
![]() |
b70ed6de02 | ||
![]() |
28492b69e0 | ||
![]() |
dbedb27c04 | ||
![]() |
0f3be1a0b4 | ||
![]() |
6e2046f4b9 | ||
![]() |
0cf860f577 | ||
![]() |
f0c2eb9867 | ||
![]() |
a70ea17038 | ||
![]() |
17f08ab5cb | ||
![]() |
3475603f72 | ||
![]() |
106571cded | ||
![]() |
9d23338de2 | ||
![]() |
e0714c2ed0 | ||
![]() |
80048a6a31 | ||
![]() |
bba9d632d6 | ||
![]() |
d3da59e3f2 | ||
![]() |
109184377f | ||
![]() |
164dc27a42 | ||
![]() |
ded42bc691 | ||
![]() |
b5646a35c9 | ||
![]() |
06071e5580 | ||
![]() |
3fa8937b95 | ||
![]() |
e5db679226 | ||
![]() |
216959f3b4 | ||
![]() |
d8a2fe3eec | ||
![]() |
5d493b154c | ||
![]() |
b78486ce1e | ||
![]() |
98b6052f1f | ||
![]() |
4718d03a87 | ||
![]() |
43ed7f3107 | ||
![]() |
9c93abc466 | ||
![]() |
146eeb00aa | ||
![]() |
c82a32ed3e | ||
![]() |
8aad45e5b0 | ||
![]() |
465861f05f | ||
![]() |
3d9f6319b4 | ||
![]() |
62186bd4dd | ||
![]() |
16984d7a1f | ||
![]() |
ef71ace6ac | ||
![]() |
412d542817 | ||
![]() |
cacb6a57fa | ||
![]() |
8d031ed0c7 | ||
![]() |
0e4dbb28e9 | ||
![]() |
0076d0a9fa | ||
![]() |
80c7cd4fd1 | ||
![]() |
ba071d3776 | ||
![]() |
aa727f6ccf | ||
![]() |
7028ef3ddd | ||
![]() |
47a71b309f | ||
![]() |
46021c66f4 | ||
![]() |
6cb45c9963 | ||
![]() |
346584ff42 | ||
![]() |
22d3be7099 | ||
![]() |
49d180fda2 | ||
![]() |
dbe5e07341 | ||
![]() |
d71252420e | ||
![]() |
f251f7d016 | ||
![]() |
0825e0af44 | ||
![]() |
7fa3b30509 | ||
![]() |
b5727f78e1 | ||
![]() |
f70faba8da | ||
![]() |
ea1c6650b0 | ||
![]() |
462d81882e | ||
![]() |
699d916480 | ||
![]() |
b725799fef | ||
![]() |
cf335800da | ||
![]() |
82be905a7e | ||
![]() |
bbfc87e4d9 | ||
![]() |
d70e39c789 | ||
![]() |
e7d107ca4f | ||
![]() |
eb4b64a65b | ||
![]() |
05731559a0 | ||
![]() |
66d35b52f7 | ||
![]() |
6ce56a33a0 | ||
![]() |
7ec374e8c9 | ||
![]() |
a011527cb9 | ||
![]() |
bb09ca4e44 | ||
![]() |
4f61104623 | ||
![]() |
787a0916b1 | ||
![]() |
e906ed2eca | ||
![]() |
0c077c63a7 | ||
![]() |
39a5167c20 | ||
![]() |
074f8cf67b | ||
![]() |
3b975e0d77 | ||
![]() |
767346b694 | ||
![]() |
e23af6bca7 | ||
![]() |
6086e618c3 | ||
![]() |
3c0412bfaa | ||
![]() |
610cd865f2 | ||
![]() |
70e8d3c49c | ||
![]() |
bce2877b2a | ||
![]() |
584aeecc29 | ||
![]() |
d32ae47b01 | ||
![]() |
ab57edba40 | ||
![]() |
9edadabd56 | ||
![]() |
6c14d65673 | ||
![]() |
e1390a0d72 | ||
![]() |
ec405cdbea | ||
![]() |
9320a6a608 | ||
![]() |
07a1a81b95 | ||
![]() |
b3c06562a4 | ||
![]() |
9fbe0a644c | ||
![]() |
b8d2bcb913 | ||
![]() |
687ffb6286 | ||
![]() |
434ad6535e | ||
![]() |
0fb08973fd | ||
![]() |
117de953b7 | ||
![]() |
db82149876 | ||
![]() |
a31f28126a | ||
![]() |
9310b41760 | ||
![]() |
b91b381e8e | ||
![]() |
63ec02d44e | ||
![]() |
5f31b50b61 | ||
![]() |
aefcf291a9 | ||
![]() |
7c36aa87f0 | ||
![]() |
6511748e8d | ||
![]() |
ff3134ab6b | ||
![]() |
777ab482d0 | ||
![]() |
8a8980f74e | ||
![]() |
e05d9665cb | ||
![]() |
ee47505833 | ||
![]() |
f0e4b6c8c1 | ||
![]() |
8087ff5133 | ||
![]() |
4f45963b9e | ||
![]() |
8fc9af832c | ||
![]() |
e382521a7d | ||
![]() |
2dc08f3a49 | ||
![]() |
60fc7839f8 | ||
![]() |
7bb8b056f5 | ||
![]() |
b7894a900b | ||
![]() |
8482525f22 | ||
![]() |
bc4158de0f | ||
![]() |
d5f35854ba | ||
![]() |
0582c00133 | ||
![]() |
0310b48954 | ||
![]() |
3a5d3f56f3 | ||
![]() |
2d41081770 | ||
![]() |
6287603a2b | ||
![]() |
5cc058dfe1 | ||
![]() |
ff795b2ab0 | ||
![]() |
92e128d2fb | ||
![]() |
f88cd445a1 | ||
![]() |
e7a9a0a7bb | ||
![]() |
083c6d21a7 | ||
![]() |
5c58ba20b0 | ||
![]() |
2d37cbf479 | ||
![]() |
4cb096d256 | ||
![]() |
18f0f69810 | ||
![]() |
887251e53c | ||
![]() |
55e0382220 | ||
![]() |
a9a0c5a385 | ||
![]() |
f917935994 | ||
![]() |
fe39fc757a | ||
![]() |
fa9e6dae6d | ||
![]() |
76708704c8 | ||
![]() |
37de337eaf | ||
![]() |
45bbd56a51 | ||
![]() |
e6af3d9c1a | ||
![]() |
1ae97bb9b1 | ||
![]() |
03e105b9e0 | ||
![]() |
1f72e3d90a | ||
![]() |
5e69fdac17 | ||
![]() |
7746f86dbf | ||
![]() |
fe3bb08fcf | ||
![]() |
b0d7a687b7 | ||
![]() |
57b79b7508 | ||
![]() |
688e7002ed | ||
![]() |
f38e8750ea | ||
![]() |
b20ac15c52 | ||
![]() |
8c8539d0de | ||
![]() |
5e00a69f8a | ||
![]() |
0d76f30fa3 | ||
![]() |
a581629adb | ||
![]() |
0f789a77a5 | ||
![]() |
1568c66cd0 | ||
![]() |
aed62fa7a0 | ||
![]() |
c583f930e8 | ||
![]() |
3642dfbe31 | ||
![]() |
390adb6134 | ||
![]() |
6b6179fafe | ||
![]() |
8621b468ed | ||
![]() |
5eac0f349b | ||
![]() |
c5691be23c | ||
![]() |
af4fabe1c5 | ||
![]() |
418244ff52 | ||
![]() |
3748c1d9ef | ||
![]() |
b3f95341c3 | ||
![]() |
ac7a6f6636 | ||
![]() |
bd2802161a | ||
![]() |
6241c9f72d | ||
![]() |
858e5ead77 | ||
![]() |
2c1943260b | ||
![]() |
06c2abc043 | ||
![]() |
95aee80a01 | ||
![]() |
2907a619a4 | ||
![]() |
a2c0a7122a | ||
![]() |
121d0682dd | ||
![]() |
4048b03d6f | ||
![]() |
dedf3e3910 | ||
![]() |
e5c0e2b0e9 | ||
![]() |
a058a24e90 | ||
![]() |
7ac190f9dd | ||
![]() |
5a59510eed | ||
![]() |
234a7d74d5 | ||
![]() |
1e6190b58c | ||
![]() |
0f84b63639 | ||
![]() |
1b33909b91 | ||
![]() |
6d5e5e5ba8 | ||
![]() |
4e73a81ccd | ||
![]() |
6db3f44398 | ||
![]() |
65c1836df4 | ||
![]() |
4df785af45 | ||
![]() |
559ef9b3cb | ||
![]() |
2cfc0c142c | ||
![]() |
ed95360b7c | ||
![]() |
c9c38df5ba | ||
![]() |
2b322a7bf4 | ||
![]() |
be7763d8d2 | ||
![]() |
0455eb155e | ||
![]() |
d23c10db70 | ||
![]() |
518ee00e0c | ||
![]() |
e218c8fc5b | ||
![]() |
6a3cf5d6a6 | ||
![]() |
c75cf8a00e | ||
![]() |
3f1144eedf | ||
![]() |
56df60d80a | ||
![]() |
ce9c663631 | ||
![]() |
f221da62cd | ||
![]() |
4228fa4146 | ||
![]() |
8c01bcece4 | ||
![]() |
6fda9d4fa7 | ||
![]() |
78e5eeb624 | ||
![]() |
46372aab0e | ||
![]() |
f466091561 | ||
![]() |
69d65032f8 | ||
![]() |
a4b02b13c3 | ||
![]() |
6f9de45019 | ||
![]() |
5bf1926ec7 | ||
![]() |
4fe4a7ff24 | ||
![]() |
7046ba73fe | ||
![]() |
d5ffea8e88 | ||
![]() |
d668800767 | ||
![]() |
28b02370ec | ||
![]() |
a045cc11fe | ||
![]() |
eac7a05f93 | ||
![]() |
f520d6c6e7 | ||
![]() |
3ecdeae3b0 | ||
![]() |
652ecc4707 | ||
![]() |
2b86be50d2 | ||
![]() |
8649dc7ff3 | ||
![]() |
9d03b0c677 | ||
![]() |
375fb27fc8 | ||
![]() |
eb7e23d665 | ||
![]() |
41d94df0df | ||
![]() |
bf74b32f3f | ||
![]() |
b29b7df9ac | ||
![]() |
17c27b01c2 | ||
![]() |
4a3a0fe250 | ||
![]() |
ff0bd433c5 | ||
![]() |
2a0dc92538 | ||
![]() |
170753fbd7 | ||
![]() |
cf08283ccd | ||
![]() |
6b9b639fd4 | ||
![]() |
58da388652 | ||
![]() |
5c5ed009cc | ||
![]() |
01925ea2a8 | ||
![]() |
51a36a6e0c | ||
![]() |
ea9b3e1fd5 | ||
![]() |
f8dde9b3cf | ||
![]() |
0bce34678a | ||
![]() |
9ff63388f3 | ||
![]() |
ffa7b65e82 | ||
![]() |
a914c2721e | ||
![]() |
329f39a37d | ||
![]() |
deca138ec9 | ||
![]() |
0dc56cc017 | ||
![]() |
1d7a814fb1 | ||
![]() |
51095b8091 | ||
![]() |
2db680dd98 | ||
![]() |
a0ec0bce14 | ||
![]() |
420afaf199 | ||
![]() |
1167a1d6a9 | ||
![]() |
fef6dc47a6 | ||
![]() |
447bbb5eb2 | ||
![]() |
7da21ab480 | ||
![]() |
75e9940a80 | ||
![]() |
8bbb30aa3e | ||
![]() |
c038feb88a | ||
![]() |
b4284b3a75 | ||
![]() |
c38d9c3da5 | ||
![]() |
a1f7ea061e |
10
.gitignore
vendored
|
@ -14,6 +14,7 @@ doc/*
|
||||||
*.autobackupbyrefinery.*
|
*.autobackupbyrefinery.*
|
||||||
/refinerycms-blog*.gem
|
/refinerycms-blog*.gem
|
||||||
.autotest
|
.autotest
|
||||||
|
spec/dummy
|
||||||
|
|
||||||
# Mac
|
# Mac
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -42,3 +43,12 @@ nbproject
|
||||||
|
|
||||||
# Capybara Bug
|
# Capybara Bug
|
||||||
capybara-*html
|
capybara-*html
|
||||||
|
|
||||||
|
# rvm
|
||||||
|
.rvmrc
|
||||||
|
|
||||||
|
#rbenv
|
||||||
|
.rbenv-version
|
||||||
|
|
||||||
|
Gemfile.lock
|
||||||
|
.rbx
|
1
.rspec
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--colour
|
20
.travis.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
before_script:
|
||||||
|
- "bundle exec rake refinery:testing:dummy_app > /dev/null"
|
||||||
|
script: "bundle exec rake spec"
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
- parndt@gmail.com
|
||||||
|
- ugis.ozolss@gmail.com
|
||||||
|
- joe@joesak.com
|
||||||
|
- jamie@enmasse.com
|
||||||
|
env:
|
||||||
|
- DB=postgresql
|
||||||
|
- DB=mysql
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- rvm: rbx-19mode
|
||||||
|
rvm:
|
||||||
|
- 1.8.7
|
||||||
|
- 1.9.3
|
||||||
|
- rbx-19mode
|
||||||
|
- jruby
|
72
Gemfile
|
@ -1,2 +1,70 @@
|
||||||
gem 'filters_spam', '~> 0.3'
|
source "http://rubygems.org"
|
||||||
gem "will_paginate", ">= 2.3.14"
|
|
||||||
|
gemspec
|
||||||
|
|
||||||
|
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
|
||||||
|
gem 'refinerycms-i18n', :git => 'git://github.com/parndt/refinerycms-i18n.git'
|
||||||
|
gem 'refinerycms-settings', :git => 'git://github.com/parndt/refinerycms-settings.git'
|
||||||
|
|
||||||
|
group :development, :test do
|
||||||
|
require 'rbconfig'
|
||||||
|
|
||||||
|
gem 'refinerycms-testing', :git => 'git://github.com/resolve/refinerycms.git'
|
||||||
|
|
||||||
|
platforms :jruby do
|
||||||
|
gem 'activerecord-jdbcsqlite3-adapter'
|
||||||
|
gem 'activerecord-jdbcmysql-adapter'
|
||||||
|
gem 'activerecord-jdbcpostgresql-adapter'
|
||||||
|
gem 'jruby-openssl'
|
||||||
|
end
|
||||||
|
|
||||||
|
unless defined?(JRUBY_VERSION)
|
||||||
|
gem 'sqlite3'
|
||||||
|
gem 'mysql2'
|
||||||
|
gem 'pg'
|
||||||
|
end
|
||||||
|
|
||||||
|
platforms :mswin, :mingw do
|
||||||
|
gem 'win32console'
|
||||||
|
gem 'rb-fchange', '~> 0.0.5'
|
||||||
|
gem 'rb-notifu', '~> 0.0.4'
|
||||||
|
end
|
||||||
|
|
||||||
|
platforms :ruby do
|
||||||
|
gem 'spork', '0.9.0.rc9'
|
||||||
|
gem 'guard-spork'
|
||||||
|
|
||||||
|
unless ENV['TRAVIS']
|
||||||
|
if RbConfig::CONFIG['target_os'] =~ /darwin/i
|
||||||
|
gem 'rb-fsevent', '>= 0.3.9'
|
||||||
|
gem 'growl', '~> 1.0.3'
|
||||||
|
end
|
||||||
|
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
||||||
|
gem 'rb-inotify', '>= 0.5.1'
|
||||||
|
gem 'libnotify', '~> 0.1.3'
|
||||||
|
gem 'therubyracer', '~> 0.9.9'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
platforms :jruby do
|
||||||
|
unless ENV['TRAVIS']
|
||||||
|
if RbConfig::CONFIG['target_os'] =~ /darwin/i
|
||||||
|
gem 'growl', '~> 1.0.3'
|
||||||
|
end
|
||||||
|
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
||||||
|
gem 'rb-inotify', '>= 0.5.1'
|
||||||
|
gem 'libnotify', '~> 0.1.3'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Refinery/rails should pull in the proper versions of these
|
||||||
|
group :assets do
|
||||||
|
gem 'sass-rails'
|
||||||
|
gem 'coffee-rails'
|
||||||
|
gem 'uglifier'
|
||||||
|
end
|
||||||
|
|
||||||
|
gem 'jquery-rails'
|
||||||
|
|
11
Gemfile.lock
|
@ -1,11 +0,0 @@
|
||||||
GEM
|
|
||||||
specs:
|
|
||||||
filters_spam (0.3)
|
|
||||||
will_paginate (2.3.14)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
filters_spam (~> 0.3)
|
|
||||||
will_paginate (>= 2.3.14)
|
|
20
Guardfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
guard 'rspec', :version => 2, :cli => "--format Fuubar --color --drb" do
|
||||||
|
watch(%r{^spec/.+_spec\.rb$})
|
||||||
|
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||||
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
||||||
|
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/controllers/#{m[1]}_#{m[2]}_spec.rb", "spec/requests/#{m[1]}_spec.rb"] }
|
||||||
|
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
||||||
|
watch('spec/spec_helper.rb') { "spec" }
|
||||||
|
watch('config/routes.rb') { "spec/routing" }
|
||||||
|
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
||||||
|
# Capybara request specs
|
||||||
|
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
||||||
|
end
|
||||||
|
|
||||||
|
guard 'spork', :wait => 60, :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do
|
||||||
|
watch('config/application.rb')
|
||||||
|
watch('config/environment.rb')
|
||||||
|
watch(%r{^config/environments/.+\.rb$})
|
||||||
|
watch(%r{^config/initializers/.+\.rb$})
|
||||||
|
watch('spec/spec_helper.rb')
|
||||||
|
end
|
19
Rakefile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env rake
|
||||||
|
begin
|
||||||
|
require 'bundler/setup'
|
||||||
|
rescue LoadError
|
||||||
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
||||||
|
end
|
||||||
|
|
||||||
|
ENGINE_PATH = File.dirname(__FILE__)
|
||||||
|
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
||||||
|
|
||||||
|
if File.exists?(APP_RAKEFILE)
|
||||||
|
load 'rails/tasks/engine.rake'
|
||||||
|
end
|
||||||
|
|
||||||
|
require "refinerycms-testing"
|
||||||
|
Refinery::Testing::Railtie.load_tasks
|
||||||
|
Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
|
||||||
|
|
||||||
|
load File.expand_path('../tasks/rspec.rake', __FILE__)
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 635 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 689 B |
0
app/assets/images/refinerycms-blog/.gitkeep
Normal file
115
app/assets/javascripts/refinery/blog/backend.js
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('nav#actions.multilist > ul:not(.search_list) li a[href$="' + window.location.pathname + '"]')
|
||||||
|
.parent().addClass('selected');
|
||||||
|
if($('nav#actions.multilist > ul:not(.search_list) li.selected').length == 0) {
|
||||||
|
$('nav#actions.multilist > ul:not(.search_list) li a:nth(1)').parent().addClass('selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('nav#actions.multilist > ul:not(.search_list) li > a').each(function(i,a){
|
||||||
|
if ($(this).data('dialog-title') == null) {
|
||||||
|
$(this).bind('click', function(){
|
||||||
|
$(this).css('background-image', "url('/images/refinery/icons/ajax-loader.gif') !important");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('ul.collapsible_menu').each(function(i, ul) {
|
||||||
|
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
|
||||||
|
|
||||||
|
$("<span class='arrow'> </span>").appendTo(first_li)
|
||||||
|
|
||||||
|
if (($(this).children('li.selected')).length == 0) {
|
||||||
|
div.hide();
|
||||||
|
first_li.addClass("closed");
|
||||||
|
}
|
||||||
|
$(this).children('li:not(:first)').appendTo(div);
|
||||||
|
|
||||||
|
first_li.find('> a, > span.arrow').click(function(e){
|
||||||
|
$(this).parent().toggleClass("closed");
|
||||||
|
$(this).parent().toggleClass("open");
|
||||||
|
|
||||||
|
$(this).parent().next('div').animate({
|
||||||
|
opacity: 'toggle'
|
||||||
|
, height: 'toggle'
|
||||||
|
}, 250, $.proxy(function(){
|
||||||
|
$(this).css('background-image', null);
|
||||||
|
}, $(this))
|
||||||
|
);
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.success_icon, .failure_icon').bind('click', function(e) {
|
||||||
|
$.get($(this).attr('href'), $.proxy(function(data){
|
||||||
|
$(this).css('background-image', null)
|
||||||
|
.removeClass('failure_icon').removeClass('success_icon')
|
||||||
|
.addClass(data.enabled ? 'success_icon' : 'failure_icon');
|
||||||
|
}, $(this)));
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$('#page-tabs').tabs();
|
||||||
|
$('#copy_body_link').click(function(event) {
|
||||||
|
// Find the WYMEditor that maps to the custom_teaser field
|
||||||
|
var teaserTextArea = $('#blog_post_custom_teaser')[0];
|
||||||
|
var teaserEditor = null;
|
||||||
|
$.each(WYMeditor.INSTANCES, function(index, editor) {
|
||||||
|
if (editor._element[0] == teaserTextArea) {
|
||||||
|
teaserEditor = editor;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (teaserEditor) {
|
||||||
|
teaserEditor.html($('#blog_post_body').attr('value'));
|
||||||
|
}
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function split( val ) {
|
||||||
|
return val.split( /,\s*/ );
|
||||||
|
}
|
||||||
|
function extractLast( term ) {
|
||||||
|
return split( term ).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
page_options.init(false, '', '')
|
||||||
|
|
||||||
|
$('<%= dom_id %>').bind( "keydown", function( event ) {
|
||||||
|
if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) {
|
||||||
|
event.preventDefault()
|
||||||
|
}
|
||||||
|
}).autocomplete({
|
||||||
|
source: function( request, response ) {
|
||||||
|
$.getJSON( "<%= url %>", {
|
||||||
|
term: extractLast( request.term )
|
||||||
|
}, response );
|
||||||
|
},
|
||||||
|
search: function() {
|
||||||
|
// custom minLength
|
||||||
|
var term = extractLast( this.value );
|
||||||
|
if ( term.length < 2 ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
focus: function() {
|
||||||
|
// prevent value inserted on focus
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
select: function( event, ui ) {
|
||||||
|
var terms = split( this.value );
|
||||||
|
// remove the current input
|
||||||
|
terms.pop();
|
||||||
|
// add the selected item
|
||||||
|
terms.push( ui.item.value );
|
||||||
|
// add placeholder to get the comma-and-space at the end
|
||||||
|
terms.push( "" );
|
||||||
|
this.value = terms.join( ", " );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
0
app/assets/javascripts/refinerycms-blog/.gitkeep
Normal file
73
app/assets/stylesheets/refinery/blog/backend.css.scss
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
.comments_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/comments.png');
|
||||||
|
}
|
||||||
|
.comment_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/comment.png');
|
||||||
|
}
|
||||||
|
.comment_cross_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/comment_cross.png');
|
||||||
|
}
|
||||||
|
.comment_tick_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/comment_tick.png');
|
||||||
|
}
|
||||||
|
.folder_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/folder.png');
|
||||||
|
}
|
||||||
|
.folder_add_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/folder_add.png');
|
||||||
|
}
|
||||||
|
.folder_edit_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/folder_edit.png');
|
||||||
|
}
|
||||||
|
.settings_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/cog.png');
|
||||||
|
}
|
||||||
|
.page_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/page.png');
|
||||||
|
}
|
||||||
|
.page_copy_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/page_copy.png');
|
||||||
|
}
|
||||||
|
.page_add_icon {
|
||||||
|
background-image: image_url('refinery/blog/icons/page_add.png');
|
||||||
|
}
|
||||||
|
ul.collapsible_menu li {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
ul.collapsible_menu li span.arrow {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 13px;
|
||||||
|
width: 11px;
|
||||||
|
height: 7px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
ul.collapsible_menu li span.arrow {
|
||||||
|
background-image: image_url('refinery/blog/icons/up.gif');
|
||||||
|
}
|
||||||
|
ul.collapsible_menu li.closed span.arrow {
|
||||||
|
background-image: image_url('refinery/blog/icons/down.gif');
|
||||||
|
}
|
||||||
|
ul.collapsible_menu > div {
|
||||||
|
width: 93%;
|
||||||
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
ul.blog_categories{
|
||||||
|
height:200px;
|
||||||
|
overflow:auto;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
padding:5px;
|
||||||
|
}
|
||||||
|
ul.blog_categories, ul.blog_categories li {
|
||||||
|
list-style: none;
|
||||||
|
margin:5px 0;
|
||||||
|
}
|
||||||
|
a#copy_body_link {
|
||||||
|
background: image_url('refinery/blog/icons/add.png') no-repeat scroll 0 6px transparent;
|
||||||
|
border-bottom: 0 none;
|
||||||
|
display: inline;
|
||||||
|
line-height: 29px;
|
||||||
|
margin-top: 0;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
|
.blog_post header, .blog_post footer {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
.blog_post .posted_at{
|
.blog_post .posted_at{
|
||||||
display:block;
|
|
||||||
margin:0 0 10px;
|
|
||||||
}
|
}
|
||||||
.post_categories .filed_in {
|
.post_categories .filed_in {
|
||||||
display: inline;
|
display: inline;
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
#rss_feed_subscribe {
|
#rss_feed_subscribe {
|
||||||
display: block;
|
display: block;
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
background: url('/images/refinerycms-blog/rss-feed.png') no-repeat;
|
background: image_url('refinery/blog/rss-feed.png') no-repeat;
|
||||||
}
|
}
|
||||||
#next_prev_article{
|
#next_prev_article{
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
.flash_notice, .flash_message {
|
.flash_notice, .flash_message {
|
||||||
border: 1px solid #00A017;
|
border: 1px solid #00A017;
|
||||||
color: #00A017;
|
color: #00A017;
|
||||||
background: 7px 7px no-repeat url('/images/refinery/icons/accept.png') #E0F5E0;
|
background: 7px 7px no-repeat image_url('refinery/blog/icons/accept.png') #E0F5E0;
|
||||||
}
|
}
|
||||||
.flash_notice, .flash_notice * {
|
.flash_notice, .flash_notice * {
|
||||||
color: #00A017;
|
color: #00A017;
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
.flash_error {
|
.flash_error {
|
||||||
border: 1px solid #A00027;
|
border: 1px solid #A00027;
|
||||||
color: #A00027;
|
color: #A00027;
|
||||||
background: 7px 7px no-repeat url('/images/refinery/icons/cancel.png') #FFB1B1;
|
background: 7px 7px no-repeat image_url('refinery/blog/icons/cancel.png') #FFB1B1;
|
||||||
}
|
}
|
||||||
.flash.flash_notice #flash_close, .flash.flash_error #flash_close {
|
.flash.flash_notice #flash_close, .flash.flash_error #flash_close {
|
||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 251 B |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 104 B |
After Width: | Height: | Size: 125 B |
After Width: | Height: | Size: 105 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 90 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
|
@ -0,0 +1,330 @@
|
||||||
|
/*
|
||||||
|
* jQuery UI CSS Framework 1.8.13
|
||||||
|
*
|
||||||
|
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||||
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Theming/API
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Layout helpers
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-helper-hidden { display: none; }
|
||||||
|
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||||
|
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||||
|
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||||
|
.ui-helper-clearfix { display: inline-block; }
|
||||||
|
/* required comment for clearfix to work in Opera \*/
|
||||||
|
* html .ui-helper-clearfix { height:1%; }
|
||||||
|
.ui-helper-clearfix { display:block; }
|
||||||
|
/* end clearfix */
|
||||||
|
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||||
|
|
||||||
|
|
||||||
|
/* Interaction Cues
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-state-disabled { cursor: default !important; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Icons
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* states and images */
|
||||||
|
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc visuals
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* Overlays */
|
||||||
|
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||||
|
.ui-autocomplete{ background:#fff; border:solid #ccc; border-width:0 1px 1px; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* jQuery UI CSS Framework 1.8.13
|
||||||
|
*
|
||||||
|
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||||
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Theming/API
|
||||||
|
*
|
||||||
|
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Interaction states
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* Interaction Cues
|
||||||
|
----------------------------------*/
|
||||||
|
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
|
||||||
|
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||||
|
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
|
||||||
|
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
||||||
|
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
||||||
|
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||||
|
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||||
|
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||||
|
|
||||||
|
/* Icons
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* states and images */
|
||||||
|
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
||||||
|
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
||||||
|
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||||
|
.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
|
||||||
|
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
|
||||||
|
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
|
||||||
|
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
|
||||||
|
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
|
||||||
|
|
||||||
|
/* positioning */
|
||||||
|
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||||
|
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||||
|
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||||
|
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||||
|
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||||
|
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||||
|
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||||
|
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||||
|
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||||
|
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||||
|
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||||
|
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||||
|
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||||
|
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||||
|
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||||
|
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||||
|
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||||
|
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||||
|
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||||
|
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||||
|
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||||
|
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||||
|
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||||
|
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||||
|
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||||
|
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||||
|
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||||
|
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||||
|
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||||
|
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||||
|
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||||
|
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||||
|
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||||
|
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||||
|
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||||
|
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||||
|
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||||
|
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||||
|
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||||
|
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||||
|
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||||
|
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||||
|
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||||
|
.ui-icon-extlink { background-position: -32px -80px; }
|
||||||
|
.ui-icon-newwin { background-position: -48px -80px; }
|
||||||
|
.ui-icon-refresh { background-position: -64px -80px; }
|
||||||
|
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||||
|
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||||
|
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||||
|
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||||
|
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||||
|
.ui-icon-document { background-position: -32px -96px; }
|
||||||
|
.ui-icon-document-b { background-position: -48px -96px; }
|
||||||
|
.ui-icon-note { background-position: -64px -96px; }
|
||||||
|
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||||
|
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||||
|
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||||
|
.ui-icon-comment { background-position: -128px -96px; }
|
||||||
|
.ui-icon-person { background-position: -144px -96px; }
|
||||||
|
.ui-icon-print { background-position: -160px -96px; }
|
||||||
|
.ui-icon-trash { background-position: -176px -96px; }
|
||||||
|
.ui-icon-locked { background-position: -192px -96px; }
|
||||||
|
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||||
|
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||||
|
.ui-icon-tag { background-position: -240px -96px; }
|
||||||
|
.ui-icon-home { background-position: 0 -112px; }
|
||||||
|
.ui-icon-flag { background-position: -16px -112px; }
|
||||||
|
.ui-icon-calendar { background-position: -32px -112px; }
|
||||||
|
.ui-icon-cart { background-position: -48px -112px; }
|
||||||
|
.ui-icon-pencil { background-position: -64px -112px; }
|
||||||
|
.ui-icon-clock { background-position: -80px -112px; }
|
||||||
|
.ui-icon-disk { background-position: -96px -112px; }
|
||||||
|
.ui-icon-calculator { background-position: -112px -112px; }
|
||||||
|
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||||
|
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||||
|
.ui-icon-search { background-position: -160px -112px; }
|
||||||
|
.ui-icon-wrench { background-position: -176px -112px; }
|
||||||
|
.ui-icon-gear { background-position: -192px -112px; }
|
||||||
|
.ui-icon-heart { background-position: -208px -112px; }
|
||||||
|
.ui-icon-star { background-position: -224px -112px; }
|
||||||
|
.ui-icon-link { background-position: -240px -112px; }
|
||||||
|
.ui-icon-cancel { background-position: 0 -128px; }
|
||||||
|
.ui-icon-plus { background-position: -16px -128px; }
|
||||||
|
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||||
|
.ui-icon-minus { background-position: -48px -128px; }
|
||||||
|
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||||
|
.ui-icon-close { background-position: -80px -128px; }
|
||||||
|
.ui-icon-closethick { background-position: -96px -128px; }
|
||||||
|
.ui-icon-key { background-position: -112px -128px; }
|
||||||
|
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||||
|
.ui-icon-scissors { background-position: -144px -128px; }
|
||||||
|
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||||
|
.ui-icon-copy { background-position: -176px -128px; }
|
||||||
|
.ui-icon-contact { background-position: -192px -128px; }
|
||||||
|
.ui-icon-image { background-position: -208px -128px; }
|
||||||
|
.ui-icon-video { background-position: -224px -128px; }
|
||||||
|
.ui-icon-script { background-position: -240px -128px; }
|
||||||
|
.ui-icon-alert { background-position: 0 -144px; }
|
||||||
|
.ui-icon-info { background-position: -16px -144px; }
|
||||||
|
.ui-icon-notice { background-position: -32px -144px; }
|
||||||
|
.ui-icon-help { background-position: -48px -144px; }
|
||||||
|
.ui-icon-check { background-position: -64px -144px; }
|
||||||
|
.ui-icon-bullet { background-position: -80px -144px; }
|
||||||
|
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||||
|
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||||
|
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||||
|
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||||
|
.ui-icon-play { background-position: 0 -160px; }
|
||||||
|
.ui-icon-pause { background-position: -16px -160px; }
|
||||||
|
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||||
|
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||||
|
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||||
|
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||||
|
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||||
|
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||||
|
.ui-icon-stop { background-position: -96px -160px; }
|
||||||
|
.ui-icon-eject { background-position: -112px -160px; }
|
||||||
|
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||||
|
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||||
|
.ui-icon-power { background-position: 0 -176px; }
|
||||||
|
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||||
|
.ui-icon-signal { background-position: -32px -176px; }
|
||||||
|
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||||
|
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||||
|
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||||
|
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||||
|
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||||
|
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||||
|
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||||
|
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||||
|
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||||
|
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||||
|
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||||
|
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||||
|
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||||
|
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||||
|
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||||
|
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||||
|
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||||
|
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||||
|
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||||
|
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||||
|
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||||
|
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||||
|
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||||
|
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||||
|
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||||
|
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||||
|
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||||
|
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||||
|
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||||
|
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc visuals
|
||||||
|
----------------------------------*/
|
||||||
|
|
||||||
|
/* Corner radius */
|
||||||
|
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||||
|
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||||
|
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||||
|
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||||
|
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||||
|
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||||
|
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||||
|
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
||||||
|
|
||||||
|
/* Overlays */
|
||||||
|
.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
|
||||||
|
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
|
||||||
|
* jQuery UI Autocomplete 1.8.13
|
||||||
|
*
|
||||||
|
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||||
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||||
|
*/
|
||||||
|
.ui-autocomplete { position: absolute; cursor: default; }
|
||||||
|
|
||||||
|
/* workarounds */
|
||||||
|
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* jQuery UI Menu 1.8.13
|
||||||
|
*
|
||||||
|
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||||
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://docs.jquery.com/UI/Menu#theming
|
||||||
|
*/
|
||||||
|
.ui-menu {
|
||||||
|
list-style:none;
|
||||||
|
padding: 2px;
|
||||||
|
margin: 0;
|
||||||
|
display:block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu {
|
||||||
|
margin-top: -3px;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu-item {
|
||||||
|
margin:0;
|
||||||
|
padding: 0;
|
||||||
|
zoom: 1;
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu-item a {
|
||||||
|
text-decoration:none;
|
||||||
|
display:block;
|
||||||
|
padding:.2em .4em;
|
||||||
|
line-height:1.5;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||||
|
.ui-menu .ui-menu-item a.ui-state-active {
|
||||||
|
font-weight: normal;
|
||||||
|
margin: -1px;
|
||||||
|
}
|
||||||
|
|
0
app/assets/stylesheets/refinerycms-blog/.gitkeep
Normal file
0
app/controllers/.gitkeep
Normal file
|
@ -1,7 +0,0 @@
|
||||||
class Admin::Blog::CategoriesController < Admin::BaseController
|
|
||||||
|
|
||||||
crudify :blog_category,
|
|
||||||
:title_attribute => :title,
|
|
||||||
:order => 'title ASC'
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,36 +0,0 @@
|
||||||
class Admin::Blog::CommentsController < Admin::BaseController
|
|
||||||
|
|
||||||
crudify :blog_comment,
|
|
||||||
:title_attribute => :name,
|
|
||||||
:order => 'published_at DESC'
|
|
||||||
|
|
||||||
def index
|
|
||||||
@blog_comments = BlogComment.unmoderated
|
|
||||||
render :action => 'index'
|
|
||||||
end
|
|
||||||
|
|
||||||
def approved
|
|
||||||
unless params[:id].present?
|
|
||||||
@blog_comments = BlogComment.approved
|
|
||||||
render :action => 'index'
|
|
||||||
else
|
|
||||||
@blog_comment = BlogComment.find(params[:id])
|
|
||||||
@blog_comment.approve!
|
|
||||||
flash[:notice] = t('admin.blog.comments.approved', :author => @blog_comment.name)
|
|
||||||
redirect_to :action => params[:return_to] || 'index'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def rejected
|
|
||||||
unless params[:id].present?
|
|
||||||
@blog_comments = BlogComment.rejected
|
|
||||||
render :action => 'index'
|
|
||||||
else
|
|
||||||
@blog_comment = BlogComment.find(params[:id])
|
|
||||||
@blog_comment.reject!
|
|
||||||
flash[:notice] = t('admin.blog.comments.rejected', :author => @blog_comment.name)
|
|
||||||
redirect_to :action => params[:return_to] || 'index'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,14 +0,0 @@
|
||||||
class Admin::Blog::PostsController < Admin::BaseController
|
|
||||||
|
|
||||||
crudify :blog_post,
|
|
||||||
:title_attribute => :title,
|
|
||||||
:order => 'published_at DESC'
|
|
||||||
|
|
||||||
before_filter :find_all_categories,
|
|
||||||
:only => [:new, :edit, :create, :update]
|
|
||||||
|
|
||||||
protected
|
|
||||||
def find_all_categories
|
|
||||||
@blog_categories = BlogCategory.find(:all)
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,27 +0,0 @@
|
||||||
class Admin::Blog::SettingsController < Admin::BaseController
|
|
||||||
|
|
||||||
def notification_recipients
|
|
||||||
@recipients = BlogComment::Notification.recipients
|
|
||||||
|
|
||||||
if request.post?
|
|
||||||
BlogComment::Notification.recipients = params[:recipients]
|
|
||||||
flash[:notice] = t('admin.blog.settings.notification_recipients.updated',
|
|
||||||
:recipients => BlogComment::Notification.recipients)
|
|
||||||
unless request.xhr? or from_dialog?
|
|
||||||
redirect_back_or_default(admin_blog_posts_path)
|
|
||||||
else
|
|
||||||
render :text => "<script type='text/javascript'>parent.window.location = '#{admin_blog_posts_path}';</script>"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def moderation
|
|
||||||
enabled = BlogComment::Moderation.toggle!
|
|
||||||
unless request.xhr?
|
|
||||||
redirect_back_or_default(admin_blog_posts_path)
|
|
||||||
else
|
|
||||||
render :json => {:enabled => enabled}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
class Blog::CategoriesController < BlogController
|
|
||||||
|
|
||||||
def show
|
|
||||||
@category = BlogCategory.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,68 +0,0 @@
|
||||||
class Blog::PostsController < BlogController
|
|
||||||
|
|
||||||
before_filter :find_all_blog_posts, :except => [:archive]
|
|
||||||
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
|
|
||||||
|
|
||||||
def index
|
|
||||||
# TODO: respond_to block
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
@blog_comment = BlogComment.new
|
|
||||||
|
|
||||||
# TODO: respond_to block
|
|
||||||
end
|
|
||||||
|
|
||||||
def comment
|
|
||||||
if (@blog_comment = @blog_post.comments.create(params[:blog_comment])).valid?
|
|
||||||
if BlogComment::Moderation.enabled? or @blog_comment.ham?
|
|
||||||
begin
|
|
||||||
Blog::CommentMailer.deliver_notification(@blog_comment, request)
|
|
||||||
rescue
|
|
||||||
logger.warn "There was an error delivering a blog comment notification.\n#{$!}\n"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if BlogComment::Moderation.enabled?
|
|
||||||
flash[:notice] = t('blog.posts.comments.thank_you_moderated')
|
|
||||||
redirect_to blog_post_url(params[:id])
|
|
||||||
else
|
|
||||||
flash[:notice] = t('blog.posts.comments.thank_you')
|
|
||||||
redirect_to blog_post_url(params[:id],
|
|
||||||
:anchor => "comment-#{@blog_comment.to_param}")
|
|
||||||
end
|
|
||||||
else
|
|
||||||
render :action => 'show'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def archive
|
|
||||||
date = "#{params[:month]}/#{params[:year]}"
|
|
||||||
@archive_date = Time.parse(date)
|
|
||||||
@blog_posts = BlogPost.live.by_archive(@archive_date).paginate({
|
|
||||||
:page => params[:page],
|
|
||||||
:per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
|
|
||||||
})
|
|
||||||
# TODO: respond_to block
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def find_blog_post
|
|
||||||
unless (@blog_post = BlogPost.find(params[:id])).try(:live?)
|
|
||||||
if refinery_user? and current_user.authorized_plugins.include?("refinerycms_blog")
|
|
||||||
@blog_post = BlogPost.find(params[:id])
|
|
||||||
else
|
|
||||||
error_404
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_all_blog_posts
|
|
||||||
@blog_posts = BlogPost.live.paginate({
|
|
||||||
:page => params[:page],
|
|
||||||
:per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,16 +0,0 @@
|
||||||
class BlogController < ApplicationController
|
|
||||||
|
|
||||||
helper :blog_posts
|
|
||||||
before_filter :find_page, :find_all_blog_categories
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def find_page
|
|
||||||
@page = Page.find_by_link_url("/blog")
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_all_blog_categories
|
|
||||||
@blog_categories = BlogCategory.all
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
12
app/controllers/refinery/blog/admin/categories_controller.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
module Admin
|
||||||
|
class CategoriesController < ::Refinery::AdminController
|
||||||
|
|
||||||
|
crudify :'refinery/blog/category',
|
||||||
|
:order => 'title ASC'
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
49
app/controllers/refinery/blog/admin/comments_controller.rb
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
module Admin
|
||||||
|
class CommentsController < ::Refinery::AdminController
|
||||||
|
|
||||||
|
cache_sweeper Refinery::BlogSweeper
|
||||||
|
|
||||||
|
crudify :'refinery/blog/comment',
|
||||||
|
:title_attribute => :name,
|
||||||
|
:order => 'published_at DESC'
|
||||||
|
|
||||||
|
def index
|
||||||
|
@comments = Refinery::Blog::Comment.unmoderated.page(params[:page])
|
||||||
|
|
||||||
|
render :action => 'index'
|
||||||
|
end
|
||||||
|
|
||||||
|
def approved
|
||||||
|
unless params[:id].present?
|
||||||
|
@comments = Refinery::Blog::Comment.approved.page(params[:page])
|
||||||
|
|
||||||
|
render :action => 'index'
|
||||||
|
else
|
||||||
|
@comment = Refinery::Blog::Comment.find(params[:id])
|
||||||
|
@comment.approve!
|
||||||
|
flash[:notice] = t('approved', :scope => 'refinery.blog.admin.comments', :author => @comment.name)
|
||||||
|
|
||||||
|
redirect_to refinery.url_for(:action => params[:return_to] || 'index', :id => nil)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def rejected
|
||||||
|
unless params[:id].present?
|
||||||
|
@comments = Refinery::Blog::Comment.rejected.page(params[:page])
|
||||||
|
|
||||||
|
render :action => 'index'
|
||||||
|
else
|
||||||
|
@comment = Refinery::Blog::Comment.find(params[:id])
|
||||||
|
@comment.reject!
|
||||||
|
flash[:notice] = t('rejected', :scope => 'refinery.blog.admin.comments', :author => @comment.name)
|
||||||
|
|
||||||
|
redirect_to refinery.url_for(:action => params[:return_to] || 'index', :id => nil)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
90
app/controllers/refinery/blog/admin/posts_controller.rb
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
module Admin
|
||||||
|
class PostsController < ::Refinery::AdminController
|
||||||
|
|
||||||
|
cache_sweeper Refinery::BlogSweeper
|
||||||
|
|
||||||
|
crudify :'refinery/blog/post',
|
||||||
|
:order => 'published_at DESC'
|
||||||
|
|
||||||
|
before_filter :find_all_categories,
|
||||||
|
:only => [:new, :edit, :create, :update]
|
||||||
|
|
||||||
|
before_filter :check_category_ids, :only => :update
|
||||||
|
|
||||||
|
def uncategorized
|
||||||
|
@posts = Refinery::Blog::Post.uncategorized.page(params[:page])
|
||||||
|
end
|
||||||
|
|
||||||
|
def tags
|
||||||
|
if ActiveRecord::Base.connection.adapter_name.downcase == 'postgresql'
|
||||||
|
op = '~*'
|
||||||
|
wildcard = '.*'
|
||||||
|
else
|
||||||
|
op = 'LIKE'
|
||||||
|
wildcard = '%'
|
||||||
|
end
|
||||||
|
|
||||||
|
@tags = Refinery::Blog::Post.tag_counts_on(:tags).where(
|
||||||
|
["tags.name #{op} ?", "#{wildcard}#{params[:term].to_s.downcase}#{wildcard}"]
|
||||||
|
).map { |tag| {:id => tag.id, :value => tag.name}}
|
||||||
|
render :json => @tags.flatten
|
||||||
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
@post = ::Refinery::Blog::Post.new(:author => current_refinery_user)
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
# if the position field exists, set this object as last object, given the conditions of this class.
|
||||||
|
if Refinery::Blog::Post.column_names.include?("position")
|
||||||
|
params[:post].merge!({
|
||||||
|
:position => ((Refinery::Blog::Post.maximum(:position, :conditions => "")||-1) + 1)
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if (@post = Refinery::Blog::Post.create(params[:post])).valid?
|
||||||
|
(request.xhr? ? flash.now : flash).notice = t(
|
||||||
|
'refinery.crudify.created',
|
||||||
|
:what => "'#{@post.title}'"
|
||||||
|
)
|
||||||
|
|
||||||
|
unless from_dialog?
|
||||||
|
unless params[:continue_editing] =~ /true|on|1/
|
||||||
|
redirect_back_or_default(refinery.blog_admin_posts_path)
|
||||||
|
else
|
||||||
|
unless request.xhr?
|
||||||
|
redirect_to :back
|
||||||
|
else
|
||||||
|
render "/shared/message"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
render :text => "<script>parent.window.location = '#{refinery.blog_admin_posts_url}';</script>"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
unless request.xhr?
|
||||||
|
render :action => 'new'
|
||||||
|
else
|
||||||
|
render :partial => "/refinery/admin/error_messages",
|
||||||
|
:locals => {
|
||||||
|
:object => @post,
|
||||||
|
:include_object_name => true
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
def find_all_categories
|
||||||
|
@categories = Refinery::Blog::Category.find(:all)
|
||||||
|
end
|
||||||
|
|
||||||
|
def check_category_ids
|
||||||
|
params[:post][:category_ids] ||= []
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
55
app/controllers/refinery/blog/admin/settings_controller.rb
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
module Admin
|
||||||
|
class SettingsController < ::Refinery::AdminController
|
||||||
|
|
||||||
|
def notification_recipients
|
||||||
|
@recipients = Refinery::Blog::Comment::Notification.recipients
|
||||||
|
|
||||||
|
if request.post?
|
||||||
|
Refinery::Blog::Comment::Notification.recipients = params[:recipients]
|
||||||
|
flash[:notice] = t('updated', :scope => 'refinery.blog.admin.settings.notification_recipients',
|
||||||
|
:recipients => Refinery::Blog::Comment::Notification.recipients)
|
||||||
|
unless request.xhr? or from_dialog?
|
||||||
|
redirect_back_or_default(refinery.blog_admin_posts_path)
|
||||||
|
else
|
||||||
|
render :text => "<script type='text/javascript'>parent.window.location = '#{refinery.blog_admin_posts_path}';</script>",
|
||||||
|
:layout => false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def moderation
|
||||||
|
enabled = Refinery::Blog::Comment::Moderation.toggle!
|
||||||
|
unless request.xhr?
|
||||||
|
redirect_back_or_default(refinery.blog_admin_posts_path)
|
||||||
|
else
|
||||||
|
render :json => {:enabled => enabled},
|
||||||
|
:layout => false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def comments
|
||||||
|
enabled = Refinery::Blog::Comment.toggle!
|
||||||
|
unless request.xhr?
|
||||||
|
redirect_back_or_default(refinery.blog_admin_posts_path)
|
||||||
|
else
|
||||||
|
render :json => {:enabled => enabled},
|
||||||
|
:layout => false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def teasers
|
||||||
|
enabled = Refinery::Blog::Post.teaser_enabled_toggle!
|
||||||
|
unless request.xhr?
|
||||||
|
redirect_back_or_default(refinery.blog_admin_posts_path)
|
||||||
|
else
|
||||||
|
render :json => {:enabled => enabled},
|
||||||
|
:layout => false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
17
app/controllers/refinery/blog/blog_controller.rb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class BlogController < ::ApplicationController
|
||||||
|
|
||||||
|
include ControllerHelper
|
||||||
|
|
||||||
|
helper :'refinery/blog/posts'
|
||||||
|
before_filter :find_page, :find_all_blog_categories
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def find_page
|
||||||
|
@page = Refinery::Page.find_by_link_url("/blog")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
12
app/controllers/refinery/blog/categories_controller.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class CategoriesController < BlogController
|
||||||
|
|
||||||
|
def show
|
||||||
|
@category = Refinery::Blog::Category.find(params[:id])
|
||||||
|
@posts = @category.posts.live.includes(:comments, :categories).page(params[:page])
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
85
app/controllers/refinery/blog/posts_controller.rb
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class PostsController < BlogController
|
||||||
|
|
||||||
|
caches_page :index, :unless => proc {|c| c.refinery_user_signed_in? || c.flash.any? || params[:page].present? }
|
||||||
|
|
||||||
|
before_filter :find_all_blog_posts, :except => [:archive]
|
||||||
|
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
|
||||||
|
before_filter :find_tags
|
||||||
|
|
||||||
|
respond_to :html, :js, :rss
|
||||||
|
|
||||||
|
def index
|
||||||
|
# Rss feeders are greedy. Let's give them every blog post instead of paginating.
|
||||||
|
(@posts = Post.live.includes(:comments, :categories).all) if request.format.rss?
|
||||||
|
respond_with (@posts) do |format|
|
||||||
|
format.html
|
||||||
|
format.rss
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@comment = Comment.new
|
||||||
|
|
||||||
|
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
|
||||||
|
|
||||||
|
@post.increment!(:access_count, 1)
|
||||||
|
|
||||||
|
respond_with (@post) do |format|
|
||||||
|
format.html { present(@post) }
|
||||||
|
format.js { render :partial => 'post', :layout => false }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def comment
|
||||||
|
if (@comment = @post.comments.create(params[:comment])).valid?
|
||||||
|
if Comment::Moderation.enabled? or @comment.ham?
|
||||||
|
begin
|
||||||
|
CommentMailer.notification(@comment, request).deliver
|
||||||
|
rescue
|
||||||
|
logger.warn "There was an error delivering a blog comment notification.\n#{$!}\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if Comment::Moderation.enabled?
|
||||||
|
flash[:notice] = t('thank_you_moderated', :scope => 'refinery.blog.posts.comments')
|
||||||
|
redirect_to refinery.blog_post_url(params[:id])
|
||||||
|
else
|
||||||
|
flash[:notice] = t('thank_you', :scope => 'refinery.blog.posts.comments')
|
||||||
|
redirect_to refinery.blog_post_url(params[:id],
|
||||||
|
:anchor => "comment-#{@comment.to_param}")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
render :action => 'show'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def archive
|
||||||
|
if params[:month].present?
|
||||||
|
date = "#{params[:month]}/#{params[:year]}"
|
||||||
|
@archive_date = Time.parse(date)
|
||||||
|
@date_title = @archive_date.strftime('%B %Y')
|
||||||
|
@posts = Post.live.by_month(@archive_date).page(params[:page])
|
||||||
|
else
|
||||||
|
date = "01/#{params[:year]}"
|
||||||
|
@archive_date = Time.parse(date)
|
||||||
|
@date_title = @archive_date.strftime('%Y')
|
||||||
|
@posts = Post.live.by_year(@archive_date).page(params[:page])
|
||||||
|
end
|
||||||
|
respond_with (@posts)
|
||||||
|
end
|
||||||
|
|
||||||
|
def tagged
|
||||||
|
@tag = ActsAsTaggableOn::Tag.find(params[:tag_id])
|
||||||
|
@tag_name = @tag.name
|
||||||
|
@posts = Post.tagged_with(@tag_name).page(params[:page])
|
||||||
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
def canonical?
|
||||||
|
::Refinery.i18n_enabled? && ::Refinery::I18n.default_frontend_locale != ::Refinery::I18n.current_frontend_locale
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
0
app/helpers/.gitkeep
Normal file
|
@ -1,28 +0,0 @@
|
||||||
module BlogPostsHelper
|
|
||||||
def blog_archive_list
|
|
||||||
posts = BlogPost.select('published_at').all_previous
|
|
||||||
return nil if posts.blank?
|
|
||||||
html = '<section id="blog_archive_list"><h2>Archives</h2><nav><ul>'
|
|
||||||
links = []
|
|
||||||
|
|
||||||
posts.each do |e|
|
|
||||||
links << e.published_at.strftime('%m/%Y')
|
|
||||||
end
|
|
||||||
links.uniq!
|
|
||||||
links.each do |l|
|
|
||||||
year = l.split('/')[1]
|
|
||||||
month = l.split('/')[0]
|
|
||||||
count = BlogPost.by_archive(Time.parse(l)).size
|
|
||||||
text = "#{Date::MONTHNAMES[month.to_i]} #{year} (#{count})"
|
|
||||||
html += "<li>"
|
|
||||||
html += link_to(text, archive_blog_posts_path(:year => year, :month => month))
|
|
||||||
html += "</li>"
|
|
||||||
end
|
|
||||||
html += '</ul></nav></section>'
|
|
||||||
html.html_safe
|
|
||||||
end
|
|
||||||
|
|
||||||
def next_or_previous?(post)
|
|
||||||
post.next.present? or post.prev.present?
|
|
||||||
end
|
|
||||||
end
|
|
29
app/helpers/refinery/blog/controller_helper.rb
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
module ControllerHelper
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def find_blog_post
|
||||||
|
unless (@post = Refinery::Blog::Post.find(params[:id])).try(:live?)
|
||||||
|
if refinery_user? and current_refinery_user.authorized_plugins.include?("refinerycms_blog")
|
||||||
|
@post = Refinery::Blog::Post.find(params[:id])
|
||||||
|
else
|
||||||
|
error_404
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def find_all_blog_posts
|
||||||
|
@posts = Refinery::Blog::Post.live.includes(:comments, :categories).page(params[:page])
|
||||||
|
end
|
||||||
|
|
||||||
|
def find_tags
|
||||||
|
@tags = Refinery::Blog::Post.tag_counts_on(:tags)
|
||||||
|
end
|
||||||
|
def find_all_blog_categories
|
||||||
|
@categories = Refinery::Blog::Category.all
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
72
app/helpers/refinery/blog/posts_helper.rb
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
module PostsHelper
|
||||||
|
def next_or_previous?(post)
|
||||||
|
post.next.present? or post.prev.present?
|
||||||
|
end
|
||||||
|
|
||||||
|
def blog_post_teaser_enabled?
|
||||||
|
Refinery::Blog::Post.teasers_enabled?
|
||||||
|
end
|
||||||
|
|
||||||
|
def blog_post_teaser(post)
|
||||||
|
if post.respond_to?(:custom_teaser) && post.custom_teaser.present?
|
||||||
|
post.custom_teaser.html_safe
|
||||||
|
else
|
||||||
|
truncate(post.body, {
|
||||||
|
:length => Refinery::Blog.post_teaser_length,
|
||||||
|
:preserve_html_tags => true
|
||||||
|
}).html_safe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def blog_archive_widget(dates=blog_archive_dates)
|
||||||
|
ArchiveWidget.new(dates, self).display
|
||||||
|
end
|
||||||
|
|
||||||
|
def blog_archive_dates(cutoff=Time.now.beginning_of_month)
|
||||||
|
Refinery::Blog::Post.published_dates_older_than(cutoff)
|
||||||
|
end
|
||||||
|
|
||||||
|
class ArchiveWidget
|
||||||
|
delegate :t, :link_to, :refinery, :render, :to => :view_context
|
||||||
|
attr_reader :view_context
|
||||||
|
|
||||||
|
def initialize(dates, view_context, cutoff=3.years.ago.end_of_year)
|
||||||
|
@recent_dates, @old_dates = dates.sort_by {|date| -date.to_i }.
|
||||||
|
partition {|date| date > cutoff }
|
||||||
|
|
||||||
|
@view_context = view_context
|
||||||
|
end
|
||||||
|
|
||||||
|
def recent_links
|
||||||
|
@recent_dates.group_by {|date| [date.year, date.month] }.
|
||||||
|
map {|(year, month), dates| recent_link(year, month, dates.count) }
|
||||||
|
end
|
||||||
|
|
||||||
|
def recent_link(year, month, count)
|
||||||
|
link_to "#{t("date.month_names")[month]} #{year} (#{count})",
|
||||||
|
refinery.blog_archive_posts_path(:year => year, :month => month)
|
||||||
|
end
|
||||||
|
|
||||||
|
def old_links
|
||||||
|
@old_dates.group_by {|date| date.year }.
|
||||||
|
map {|year, dates| old_link(year, dates.size) }
|
||||||
|
end
|
||||||
|
|
||||||
|
def old_link(year, count)
|
||||||
|
link_to "#{year} (#{count})", refinery.blog_archive_posts_path(:year => year)
|
||||||
|
end
|
||||||
|
|
||||||
|
def links
|
||||||
|
recent_links + old_links
|
||||||
|
end
|
||||||
|
|
||||||
|
def display
|
||||||
|
return "" if links.empty?
|
||||||
|
render "refinery/blog/widgets/blog_archive", :links => links
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,11 +0,0 @@
|
||||||
class Blog::CommentMailer < ActionMailer::Base
|
|
||||||
|
|
||||||
def notification(comment, request)
|
|
||||||
subject BlogComment::Notification.subject
|
|
||||||
recipients BlogComment::Notification.recipients
|
|
||||||
from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
|
|
||||||
sent_on Time.now
|
|
||||||
@comment = comment
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
14
app/mailers/refinery/blog/comment_mailer.rb
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class CommentMailer < ActionMailer::Base
|
||||||
|
|
||||||
|
def notification(comment, request)
|
||||||
|
@comment = comment
|
||||||
|
mail :subject => Blog::Comment::Notification.subject,
|
||||||
|
:to => Blog::Comment::Notification.recipients,
|
||||||
|
:from => "\"#{Refinery::Core.site_name}\" <no-reply@#{request.domain}>"
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
0
app/models/.gitkeep
Normal file
|
@ -1 +0,0 @@
|
||||||
require File.expand_path('../../../mailers/blog/comment_mailer', __FILE__)
|
|
|
@ -1,23 +0,0 @@
|
||||||
class BlogCategory < ActiveRecord::Base
|
|
||||||
|
|
||||||
has_and_belongs_to_many :posts, :class_name => 'BlogPost'
|
|
||||||
|
|
||||||
acts_as_indexed :fields => [:title]
|
|
||||||
|
|
||||||
validates_presence_of :title
|
|
||||||
validates_uniqueness_of :title
|
|
||||||
|
|
||||||
has_friendly_id :title, :use_slug => true
|
|
||||||
|
|
||||||
# this might be able to be optimised a little more
|
|
||||||
def post_count
|
|
||||||
count = 0
|
|
||||||
|
|
||||||
self.posts.each do |p|
|
|
||||||
count += 1 if p.live?
|
|
||||||
end
|
|
||||||
|
|
||||||
count
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,116 +0,0 @@
|
||||||
class BlogComment < ActiveRecord::Base
|
|
||||||
|
|
||||||
filters_spam :author_field => :name,
|
|
||||||
:email_field => :email,
|
|
||||||
:message_field => :body
|
|
||||||
|
|
||||||
belongs_to :post, :class_name => 'BlogPost', :foreign_key => 'blog_post_id'
|
|
||||||
|
|
||||||
acts_as_indexed :fields => [:name, :email, :message]
|
|
||||||
|
|
||||||
alias_attribute :message, :body
|
|
||||||
|
|
||||||
validates_presence_of :name, :message
|
|
||||||
validates_format_of :email,
|
|
||||||
:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
|
|
||||||
|
|
||||||
named_scope :unmoderated, :conditions => {:state => nil}
|
|
||||||
named_scope :approved, :conditions => {:state => 'approved'}
|
|
||||||
named_scope :rejected, :conditions => {:state => 'rejected'}
|
|
||||||
|
|
||||||
def approve!
|
|
||||||
self.update_attribute(:state, 'approved')
|
|
||||||
end
|
|
||||||
|
|
||||||
def reject!
|
|
||||||
self.update_attribute(:state, 'rejected')
|
|
||||||
end
|
|
||||||
|
|
||||||
def rejected?
|
|
||||||
self.state == 'rejected'
|
|
||||||
end
|
|
||||||
|
|
||||||
def approved?
|
|
||||||
self.state == 'approved'
|
|
||||||
end
|
|
||||||
|
|
||||||
def unmoderated?
|
|
||||||
self.state.nil?
|
|
||||||
end
|
|
||||||
|
|
||||||
before_create do |comment|
|
|
||||||
unless BlogComment::Moderation.enabled?
|
|
||||||
comment.state = comment.ham? ? 'approved' : 'rejected'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Moderation
|
|
||||||
class << self
|
|
||||||
def enabled?
|
|
||||||
RefinerySetting.find_or_set(:comment_moderation, true, {
|
|
||||||
:scoping => 'blog',
|
|
||||||
:restricted => false
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
def toggle!
|
|
||||||
new_value = {
|
|
||||||
:value => !BlogComment::Moderation.enabled?,
|
|
||||||
:scoping => 'blog',
|
|
||||||
:restricted => false
|
|
||||||
}
|
|
||||||
if RefinerySetting.respond_to?(:set)
|
|
||||||
RefinerySetting.set(:comment_moderation, new_value)
|
|
||||||
else
|
|
||||||
RefinerySetting[:comment_moderation] = new_value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Notification
|
|
||||||
class << self
|
|
||||||
def recipients
|
|
||||||
RefinerySetting.find_or_set(:comment_notification_recipients, (Role[:refinery].users.first.email rescue ''),
|
|
||||||
{
|
|
||||||
:scoping => 'blog',
|
|
||||||
:restricted => false
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
def recipients=(emails)
|
|
||||||
new_value = {
|
|
||||||
:value => emails,
|
|
||||||
:scoping => 'blog',
|
|
||||||
:restricted => false
|
|
||||||
}
|
|
||||||
if RefinerySetting.respond_to?(:set)
|
|
||||||
RefinerySetting.set(:comment_notification_recipients, new_value)
|
|
||||||
else
|
|
||||||
RefinerySetting[:comment_notification_recipients] = new_value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def subject
|
|
||||||
RefinerySetting.find_or_set(:comment_notification_subject, "New inquiry from your website", {
|
|
||||||
:scoping => 'blog',
|
|
||||||
:restricted => false
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
def subject=(subject_line)
|
|
||||||
new_value = {
|
|
||||||
:value => subject_line,
|
|
||||||
:scoping => 'blog',
|
|
||||||
:restricted => false
|
|
||||||
}
|
|
||||||
if RefinerySetting.respond_to?(:set)
|
|
||||||
RefinerySetting.set(:comment_notification_subject, new_value)
|
|
||||||
else
|
|
||||||
RefinerySetting[:comment_notification_subject] = new_value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,65 +0,0 @@
|
||||||
class BlogPost < ActiveRecord::Base
|
|
||||||
|
|
||||||
has_many :comments, :class_name => 'BlogComment'
|
|
||||||
has_and_belongs_to_many :categories, :class_name => 'BlogCategory'
|
|
||||||
|
|
||||||
acts_as_indexed :fields => [:title, :body]
|
|
||||||
|
|
||||||
validates_presence_of :title
|
|
||||||
validates_uniqueness_of :title
|
|
||||||
|
|
||||||
has_friendly_id :title, :use_slug => true
|
|
||||||
|
|
||||||
named_scope :by_archive, lambda { |archive_date| {:conditions => ['published_at between ? and ?', archive_date.beginning_of_month, archive_date.end_of_month], :order => "published_at DESC"} }
|
|
||||||
|
|
||||||
named_scope :all_previous, :conditions => ['published_at <= ?', Time.now.beginning_of_month], :order => "published_at DESC"
|
|
||||||
|
|
||||||
named_scope :live, lambda { {:conditions => ["published_at < ? and draft = ?", Time.now, false], :order => "published_at DESC"} }
|
|
||||||
|
|
||||||
named_scope :previous, lambda { |i| { :conditions => ["published_at < ?", i.published_at], :order => "published_at DESC", :limit => 1 } }
|
|
||||||
named_scope :next, lambda { |i| { :condtions => ["published_at > ?", i.published_at], :order => "published_at ASC", :limit => 1 } }
|
|
||||||
|
|
||||||
def next
|
|
||||||
self.class.next(self).first
|
|
||||||
end
|
|
||||||
|
|
||||||
def prev
|
|
||||||
self.class.previous(self).first
|
|
||||||
end
|
|
||||||
|
|
||||||
def live?
|
|
||||||
!draft and published_at <= Time.now
|
|
||||||
end
|
|
||||||
|
|
||||||
def category_ids=(ids)
|
|
||||||
self.categories = ids.reject{|id| id.blank?}.collect {|c_id|
|
|
||||||
BlogCategory.find(c_id.to_i) rescue nil
|
|
||||||
}.compact
|
|
||||||
end
|
|
||||||
|
|
||||||
class << self
|
|
||||||
def comments_allowed?
|
|
||||||
RefinerySetting.find_or_set(:comments_allowed, true, {
|
|
||||||
:scoping => 'blog'
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module ShareThis
|
|
||||||
DEFAULT_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
||||||
|
|
||||||
class << self
|
|
||||||
def key
|
|
||||||
RefinerySetting.find_or_set(:share_this_key, BlogPost::ShareThis::DEFAULT_KEY, {
|
|
||||||
:scoping => 'blog'
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
def enabled?
|
|
||||||
key = BlogPost::ShareThis.key
|
|
||||||
key.present? and key != BlogPost::ShareThis::DEFAULT_KEY
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
25
app/models/refinery/blog/category.rb
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class Category < ActiveRecord::Base
|
||||||
|
extend FriendlyId
|
||||||
|
friendly_id :title, :use => [:slugged]
|
||||||
|
|
||||||
|
has_many :categorizations, :dependent => :destroy, :foreign_key => :blog_category_id
|
||||||
|
has_many :posts, :through => :categorizations, :source => :blog_post
|
||||||
|
|
||||||
|
acts_as_indexed :fields => [:title]
|
||||||
|
|
||||||
|
validates :title, :presence => true, :uniqueness => true
|
||||||
|
|
||||||
|
attr_accessible :title
|
||||||
|
|
||||||
|
def post_count
|
||||||
|
posts.live.count
|
||||||
|
end
|
||||||
|
|
||||||
|
# how many items to show per page
|
||||||
|
self.per_page = Refinery::Blog.posts_per_page
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
135
app/models/refinery/blog/comment.rb
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class Comment < ActiveRecord::Base
|
||||||
|
|
||||||
|
attr_accessible :name, :email, :message
|
||||||
|
|
||||||
|
filters_spam :author_field => :name,
|
||||||
|
:email_field => :email,
|
||||||
|
:message_field => :body
|
||||||
|
|
||||||
|
belongs_to :post, :foreign_key => 'blog_post_id'
|
||||||
|
|
||||||
|
acts_as_indexed :fields => [:name, :email, :message]
|
||||||
|
|
||||||
|
alias_attribute :message, :body
|
||||||
|
|
||||||
|
validates :name, :message, :presence => true
|
||||||
|
validates :email, :format => { :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i }
|
||||||
|
|
||||||
|
class << self
|
||||||
|
def unmoderated
|
||||||
|
where(:state => nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
def approved
|
||||||
|
where(:state => 'approved')
|
||||||
|
end
|
||||||
|
|
||||||
|
def rejected
|
||||||
|
where(:state => 'rejected')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self.per_page = Refinery::Blog.comments_per_page
|
||||||
|
|
||||||
|
def avatar_url(options = {})
|
||||||
|
options = {:size => 60}
|
||||||
|
require 'digest/md5'
|
||||||
|
size = ("?s=#{options[:size]}" if options[:size])
|
||||||
|
"http://gravatar.com/avatar/#{Digest::MD5.hexdigest(self.email.to_s.strip.downcase)}#{size}.jpg"
|
||||||
|
end
|
||||||
|
|
||||||
|
def approve!
|
||||||
|
self.update_attribute(:state, 'approved')
|
||||||
|
end
|
||||||
|
|
||||||
|
def reject!
|
||||||
|
self.update_attribute(:state, 'rejected')
|
||||||
|
end
|
||||||
|
|
||||||
|
def rejected?
|
||||||
|
self.state == 'rejected'
|
||||||
|
end
|
||||||
|
|
||||||
|
def approved?
|
||||||
|
self.state == 'approved'
|
||||||
|
end
|
||||||
|
|
||||||
|
def unmoderated?
|
||||||
|
self.state.nil?
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.toggle!
|
||||||
|
currently = Refinery::Setting.find_or_set(:comments_allowed, true, {
|
||||||
|
:scoping => 'blog'
|
||||||
|
})
|
||||||
|
Refinery::Setting.set(:comments_allowed, {:value => !currently, :scoping => 'blog'})
|
||||||
|
end
|
||||||
|
|
||||||
|
before_create do |comment|
|
||||||
|
unless Moderation.enabled?
|
||||||
|
comment.state = comment.ham? ? 'approved' : 'rejected'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
module Moderation
|
||||||
|
class << self
|
||||||
|
def enabled?
|
||||||
|
Refinery::Setting.find_or_set(:comment_moderation, true, {
|
||||||
|
:scoping => 'blog',
|
||||||
|
:restricted => false
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
def toggle!
|
||||||
|
new_value = {
|
||||||
|
:value => !Blog::Comment::Moderation.enabled?,
|
||||||
|
:scoping => 'blog',
|
||||||
|
:restricted => false
|
||||||
|
}
|
||||||
|
Refinery::Setting.set(:comment_moderation, new_value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
module Notification
|
||||||
|
class << self
|
||||||
|
def recipients
|
||||||
|
Refinery::Setting.find_or_set(:comment_notification_recipients, (Refinery::Role[:refinery].users.first.email rescue ''),
|
||||||
|
{
|
||||||
|
:scoping => 'blog',
|
||||||
|
:restricted => false
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
def recipients=(emails)
|
||||||
|
new_value = {
|
||||||
|
:value => emails,
|
||||||
|
:scoping => 'blog',
|
||||||
|
:restricted => false
|
||||||
|
}
|
||||||
|
Refinery::Setting.set(:comment_notification_recipients, new_value)
|
||||||
|
end
|
||||||
|
|
||||||
|
def subject
|
||||||
|
Refinery::Setting.find_or_set(:comment_notification_subject, "New inquiry from your website", {
|
||||||
|
:scoping => 'blog',
|
||||||
|
:restricted => false
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
def subject=(subject_line)
|
||||||
|
new_value = {
|
||||||
|
:value => subject_line,
|
||||||
|
:scoping => 'blog',
|
||||||
|
:restricted => false
|
||||||
|
}
|
||||||
|
Refinery::Setting.set(:comment_notification_subject, new_value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
120
app/models/refinery/blog/post.rb
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
require 'acts-as-taggable-on'
|
||||||
|
require 'seo_meta'
|
||||||
|
|
||||||
|
module Refinery
|
||||||
|
module Blog
|
||||||
|
class Post < ActiveRecord::Base
|
||||||
|
extend FriendlyId
|
||||||
|
friendly_id :friendly_id_source, :use => [:slugged]
|
||||||
|
|
||||||
|
is_seo_meta if self.table_exists?
|
||||||
|
|
||||||
|
default_scope :order => 'published_at DESC'
|
||||||
|
|
||||||
|
belongs_to :author, :class_name => 'Refinery::User', :foreign_key => :user_id, :readonly => true
|
||||||
|
|
||||||
|
has_many :comments, :dependent => :destroy, :foreign_key => :blog_post_id
|
||||||
|
acts_as_taggable
|
||||||
|
|
||||||
|
has_many :categorizations, :dependent => :destroy, :foreign_key => :blog_post_id
|
||||||
|
has_many :categories, :through => :categorizations, :source => :blog_category
|
||||||
|
|
||||||
|
acts_as_indexed :fields => [:title, :body]
|
||||||
|
|
||||||
|
validates :title, :presence => true, :uniqueness => true
|
||||||
|
validates :body, :presence => true
|
||||||
|
|
||||||
|
validates :source_url, :url => { :if => 'Refinery::Blog.validate_source_url',
|
||||||
|
:update => true,
|
||||||
|
:allow_nil => true,
|
||||||
|
:allow_blank => true,
|
||||||
|
:verify => [:resolve_redirects]}
|
||||||
|
|
||||||
|
attr_accessible :title, :body, :custom_teaser, :tag_list, :draft, :published_at, :custom_url, :author
|
||||||
|
attr_accessible :browser_title, :meta_keywords, :meta_description, :user_id, :category_ids
|
||||||
|
attr_accessible :source_url, :source_url_title
|
||||||
|
|
||||||
|
self.per_page = Refinery::Blog.posts_per_page
|
||||||
|
|
||||||
|
def next
|
||||||
|
self.class.next(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
def prev
|
||||||
|
self.class.previous(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
def live?
|
||||||
|
!draft and published_at <= Time.now
|
||||||
|
end
|
||||||
|
|
||||||
|
def friendly_id_source
|
||||||
|
custom_url.presence || title
|
||||||
|
end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
def by_month(date)
|
||||||
|
where(:published_at => date.beginning_of_month..date.end_of_month)
|
||||||
|
end
|
||||||
|
|
||||||
|
def by_archive(date)
|
||||||
|
Refinery.deprecate("Refinery::Blog::Post.by_archive(date)", {:replacement => "Refinery::Blog::Post.by_month(date)", :when => 2.2 })
|
||||||
|
by_month(date)
|
||||||
|
end
|
||||||
|
|
||||||
|
def by_year(date)
|
||||||
|
where(:published_at => date.beginning_of_year..date.end_of_year)
|
||||||
|
end
|
||||||
|
|
||||||
|
def published_dates_older_than(date)
|
||||||
|
published_before(date).pluck(:published_at)
|
||||||
|
end
|
||||||
|
|
||||||
|
def recent(count)
|
||||||
|
live.limit(count)
|
||||||
|
end
|
||||||
|
|
||||||
|
def popular(count)
|
||||||
|
unscoped.order("access_count DESC").limit(count)
|
||||||
|
end
|
||||||
|
|
||||||
|
def previous(item)
|
||||||
|
published_before(item.published_at).first
|
||||||
|
end
|
||||||
|
|
||||||
|
def uncategorized
|
||||||
|
live.includes(:categories).where(:categories => { Refinery::Categorization.table_name => { :blog_category_id => nil } })
|
||||||
|
end
|
||||||
|
|
||||||
|
def next(current_record)
|
||||||
|
where(["published_at > ? and draft = ?", current_record.published_at, false]).first
|
||||||
|
end
|
||||||
|
|
||||||
|
def published_before(date=Time.now)
|
||||||
|
where("published_at < ? and draft = ?", date, false)
|
||||||
|
end
|
||||||
|
alias_method :live, :published_before
|
||||||
|
|
||||||
|
def comments_allowed?
|
||||||
|
Refinery::Setting.find_or_set(:comments_allowed, true, :scoping => 'blog')
|
||||||
|
end
|
||||||
|
|
||||||
|
def teasers_enabled?
|
||||||
|
Refinery::Setting.find_or_set(:teasers_enabled, true, :scoping => 'blog')
|
||||||
|
end
|
||||||
|
|
||||||
|
def teaser_enabled_toggle!
|
||||||
|
currently = Refinery::Setting.find_or_set(:teasers_enabled, true, :scoping => 'blog')
|
||||||
|
Refinery::Setting.set(:teasers_enabled, :value => !currently, :scoping => 'blog')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
module ShareThis
|
||||||
|
def self.enabled?
|
||||||
|
Refinery::Blog.share_this_key != "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
10
app/models/refinery/categorization.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module Refinery
|
||||||
|
class Categorization < ActiveRecord::Base
|
||||||
|
|
||||||
|
self.table_name = 'refinery_blog_categories_blog_posts'
|
||||||
|
belongs_to :blog_post, :class_name => 'Refinery::Blog::Post', :foreign_key => :blog_post_id
|
||||||
|
belongs_to :blog_category, :class_name => 'Refinery::Blog::Category', :foreign_key => :blog_category_id
|
||||||
|
|
||||||
|
attr_accessible :blog_category_id, :blog_post_id
|
||||||
|
end
|
||||||
|
end
|
26
app/sweepers/refinery/blog_sweeper.rb
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
module Refinery
|
||||||
|
class BlogSweeper < ActionController::Caching::Sweeper
|
||||||
|
observe Blog::Post, Blog::Comment
|
||||||
|
|
||||||
|
def after_create(record)
|
||||||
|
expire_cache_for(record)
|
||||||
|
end
|
||||||
|
|
||||||
|
def after_update(record)
|
||||||
|
expire_cache_for(record)
|
||||||
|
end
|
||||||
|
|
||||||
|
def after_destroy(record)
|
||||||
|
expire_cache_for(record)
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def expire_cache_for(record)
|
||||||
|
# TODO: Convert these to url helpers
|
||||||
|
expire_page '/blog'
|
||||||
|
expire_page '/blog/feed.rss'
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
0
app/views/.gitkeep
Normal file
|
@ -1,89 +0,0 @@
|
||||||
<nav id='actions' class='multilist'>
|
|
||||||
<ul class='search_list'>
|
|
||||||
<li>
|
|
||||||
<%= render :partial => "/shared/admin/search",
|
|
||||||
:locals => {
|
|
||||||
:url => admin_blog_posts_url
|
|
||||||
} %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class='collapsible_menu'>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.posts.title'), '#',
|
|
||||||
:class => 'page_copy_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.posts.manage'), admin_blog_posts_path,
|
|
||||||
:class => 'page_icon' %>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.posts.new'), new_admin_blog_post_url,
|
|
||||||
:class => 'page_add_icon' %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class='collapsible_menu'>
|
|
||||||
<li>
|
|
||||||
<% if BlogComment.unmoderated.any? %>
|
|
||||||
<% title = t('.comments.title_with_count', :new_count => BlogComment.unmoderated.size) %>
|
|
||||||
<% else %>
|
|
||||||
<% title = t('.comments.title') %>
|
|
||||||
<% end %>
|
|
||||||
<%= link_to title, '#',
|
|
||||||
:class => 'comments_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.comments.new'), admin_blog_comments_path,
|
|
||||||
:class => 'comment_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.comments.approved'), approved_admin_blog_comments_path,
|
|
||||||
:class => 'comment_tick_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.comments.rejected'), rejected_admin_blog_comments_path,
|
|
||||||
:class => 'comment_cross_icon' %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class='collapsible_menu'>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.categories.title'), '#',
|
|
||||||
:class => 'folder_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.categories.manage'), admin_blog_categories_url,
|
|
||||||
:class => 'folder_edit_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.categories.new'), new_admin_blog_category_url(:dialog => true, :height => 325),
|
|
||||||
:class => 'folder_add_icon' %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class='collapsible_menu'>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.settings.title'), admin_blog_settings_path,
|
|
||||||
:class => 'settings_icon' %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.settings.moderation'), moderation_admin_blog_settings_url,
|
|
||||||
:class => "#{BlogComment::Moderation.enabled? ? 'success' : 'failure'}_icon" %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.settings.update_notified'),
|
|
||||||
notification_recipients_admin_blog_settings_url(:dialog => true, :height => 400),
|
|
||||||
:class => 'user_comment_icon' %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
<% if Refinery.version < '0.9.9' %>
|
|
||||||
<% content_for :head do %>
|
|
||||||
<%= stylesheet_link_tag('refinery/refinerycms-blog') %>
|
|
||||||
<%# this javascript is not even required in >= 0.9.9 because we made this sort of menu core. %>
|
|
||||||
<%= javascript_include_tag('refinery/refinerycms-blog') %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog')%>
|
|
||||||
<% end %>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<% form_for [:admin, @blog_category] do |f| -%>
|
|
||||||
<%= f.error_messages %>
|
|
||||||
|
|
||||||
<div class='field'>
|
|
||||||
<%= f.label :title -%>
|
|
||||||
<%= f.text_field :title, :class => 'larger widest' -%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= render :partial => "/shared/admin/form_actions",
|
|
||||||
:locals => {
|
|
||||||
:f => f,
|
|
||||||
:continue_editing => false,
|
|
||||||
:delete_title => t('admin.blog.categories.category.delete')
|
|
||||||
} %>
|
|
||||||
<% end %>
|
|
|
@ -1 +0,0 @@
|
||||||
<%= render :partial => "form" %>
|
|
|
@ -1,30 +0,0 @@
|
||||||
<%= render :partial => '/admin/blog/submenu' %>
|
|
||||||
<div id='records'>
|
|
||||||
<% if searching? %>
|
|
||||||
<h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
|
|
||||||
<% if @blog_categories.any? %>
|
|
||||||
<%= render :partial => "blog_categories",
|
|
||||||
:collection => @blog_categories %>
|
|
||||||
<% else %>
|
|
||||||
<p><%= t('admin.search_no_results') %></p>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% if @blog_categories.any? %>
|
|
||||||
<%= will_paginate @blog_categories,
|
|
||||||
:previous_label => '«',
|
|
||||||
:next_label => '»' %>
|
|
||||||
|
|
||||||
<%= render :partial => "sortable_list" %>
|
|
||||||
|
|
||||||
<%= will_paginate @blog_categories,
|
|
||||||
:previous_label => '«',
|
|
||||||
:next_label => '»' %>
|
|
||||||
<% else %>
|
|
||||||
<p>
|
|
||||||
<strong>
|
|
||||||
<%= t('.no_items_yet', :create => t('admin.blog.submenu.categories.new')) %>
|
|
||||||
</strong>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
|
@ -1 +0,0 @@
|
||||||
<%= render :partial => "form" %>
|
|
|
@ -1,35 +0,0 @@
|
||||||
<%= render :partial => '/admin/blog/submenu' %>
|
|
||||||
<div id='records'>
|
|
||||||
<% if searching? %>
|
|
||||||
<h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
|
|
||||||
<% if @blog_comments.any? %>
|
|
||||||
<%=# will_paginate @blog_comments
|
|
||||||
%>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<%= render :partial => "blog_comments",
|
|
||||||
:collection => @blog_comments %>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<%=# will_paginate @blog_comments
|
|
||||||
%>
|
|
||||||
<% else %>
|
|
||||||
<p><%= t('admin.search_no_results') %></p>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% if @blog_comments.any? %>
|
|
||||||
<%=# will_paginate @blog_comments
|
|
||||||
%>
|
|
||||||
|
|
||||||
<%= render :partial => "sortable_list" %>
|
|
||||||
|
|
||||||
<%=# will_paginate @blog_comments
|
|
||||||
%>
|
|
||||||
<% else %>
|
|
||||||
<h3>
|
|
||||||
<%= t('.no_items_yet',
|
|
||||||
:type => t("admin.blog.submenu.comments.#{action_name.gsub('index', 'new')}").downcase) %>
|
|
||||||
</h3>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
|
@ -1,66 +0,0 @@
|
||||||
<div id='actions'>
|
|
||||||
<h2><%= t('.details')%></h2>
|
|
||||||
<p>
|
|
||||||
<strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@blog_comment.created_at) %>
|
|
||||||
</p>
|
|
||||||
<h2><%= t('.actions') %></h2>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.back'), {:action => 'index'}, :class => "back_icon" %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.reject'), rejected_admin_blog_comment_path(@blog_comment, :return_to => 'rejected'),
|
|
||||||
:class => 'comment_cross_icon' unless @blog_comment.rejected? %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to t('.approve'), approved_admin_blog_comment_path(@blog_comment, :return_to => 'approved'),
|
|
||||||
:class => 'comment_tick_icon' unless @blog_comment.approved? %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id='records'>
|
|
||||||
<h2><%= t('.comment') %></h2>
|
|
||||||
<table id='inquiry'>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<strong><%= t('.blog_post') %></strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= link_to @blog_comment.post.title,
|
|
||||||
blog_post_url(@blog_comment.post, :anchor => "comment-#{@blog_comment.to_param}"),
|
|
||||||
:target => '_blank' %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<strong><%= t('.from') %></strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= @blog_comment.name %> [<%= mail_to @blog_comment.email, @blog_comment.email, {:title => t('.click_to_email')} %>]
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<strong><%= t('.date') %></strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= l(Date.parse(@blog_comment.created_at.to_s), :format => :long) %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<strong><%= t('.message') %></strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p style='margin-top: 0px'>
|
|
||||||
<%= @blog_comment.message.gsub("\r\n\r\n", "\r\n").gsub("\r\n", "</p><p>") %>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<% if Refinery.version < '0.9.9' %>
|
|
||||||
<% content_for :head, stylesheet_link_tag('refinery/refinerycms-blog') %>
|
|
||||||
<% else %>
|
|
||||||
<% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog') %>
|
|
||||||
<% end %>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<style type='text/css'>
|
|
||||||
ul.blog_categories, ul.blog_categories li {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,61 +0,0 @@
|
||||||
<% form_for [:admin, @blog_post] do |f| -%>
|
|
||||||
<%= f.error_messages %>
|
|
||||||
|
|
||||||
<div class='field'>
|
|
||||||
<%= f.label :title -%>
|
|
||||||
<%= f.text_field :title, :class => 'larger widest' -%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='field'>
|
|
||||||
<%= f.label :body -%>
|
|
||||||
<%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
|
|
||||||
</div>
|
|
||||||
<div id='more_options_field'>
|
|
||||||
<p>
|
|
||||||
<%= link_to t('.advanced_options'), "#",
|
|
||||||
:id => 'toggle_advanced_options',
|
|
||||||
:title => t('.toggle_advanced_options') %>
|
|
||||||
</p>
|
|
||||||
<span id='draft_field'>
|
|
||||||
<%= f.check_box :draft %>
|
|
||||||
<%= f.label :draft, t('.save_as_draft'), :class => "stripped" %>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div id='more_options' style="display:none;">
|
|
||||||
<div class="hemisquare">
|
|
||||||
<h3><%= t('admin.blog.submenu.categories.title') %></h3>
|
|
||||||
<ul class='blog_categories'>
|
|
||||||
<% @blog_categories.each do |category| %>
|
|
||||||
<li>
|
|
||||||
<%= check_box_tag 'blog_post[category_ids][]', category.id,
|
|
||||||
@blog_post.categories.include?(category),
|
|
||||||
:id => (id="blog_post_category_ids_#{category.id}") %>
|
|
||||||
<%= label_tag 'blog_post[category_ids][]', category.title,
|
|
||||||
:class => 'stripped',
|
|
||||||
:for => id %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
<h3><%= t('admin.blog.posts.form.published_at') %></h3>
|
|
||||||
<%= f.datetime_select :published_at %>
|
|
||||||
</div>
|
|
||||||
<div class='hemisquare right_side'>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<%= render :partial => "/shared/admin/form_actions",
|
|
||||||
:locals => {
|
|
||||||
:f => f,
|
|
||||||
:continue_editing => true,
|
|
||||||
:delete_title => t('admin.blog.posts.post.delete')
|
|
||||||
} %>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<% if Refinery.version < '0.9.9' %>
|
|
||||||
<% content_for :head do %>
|
|
||||||
<%= render :partial => 'form.css' %>
|
|
||||||
<%= render :partial => 'form.js' %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% content_for :stylesheets, render(:partial => 'form.css') -%>
|
|
||||||
<% content_for :javascripts, render(:partial => 'form.js') -%>
|
|
||||||
<% end %>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<script>
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('#toggle_advanced_options').click(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
$('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250);
|
|
||||||
|
|
||||||
$('html,body').animate({
|
|
||||||
scrollTop: $('#toggle_advanced_options').parent().offset().top
|
|
||||||
}, 250);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -1,18 +0,0 @@
|
||||||
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(post) -%>">
|
|
||||||
<span class='title'>
|
|
||||||
<%=h post.title %>
|
|
||||||
<span class="preview"> </span>
|
|
||||||
</span>
|
|
||||||
<span class='actions'>
|
|
||||||
<%= link_to refinery_icon_tag("application_go.png"), blog_post_url(post),
|
|
||||||
:title => t('.view_live'),
|
|
||||||
:target => "_blank" %>
|
|
||||||
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_blog_post_path(post),
|
|
||||||
:title => t('.edit') %>
|
|
||||||
<%= link_to refinery_icon_tag("delete.png"), admin_blog_post_path(post),
|
|
||||||
:class => "cancel confirm-delete",
|
|
||||||
:title => t('.delete'),
|
|
||||||
:'data-method' => 'delete',
|
|
||||||
:'data-confirm' => t('shared.admin.delete.message', :title => post.title) %>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
|
@ -1 +0,0 @@
|
||||||
<%= render :partial => "form" %>
|
|
|
@ -1,30 +0,0 @@
|
||||||
<%= render :partial => '/admin/blog/submenu' %>
|
|
||||||
<div id='records'>
|
|
||||||
<% if searching? %>
|
|
||||||
<h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
|
|
||||||
<% if @blog_posts.any? %>
|
|
||||||
<%= render :partial => "blog_posts",
|
|
||||||
:collection => @blog_posts %>
|
|
||||||
<% else %>
|
|
||||||
<p><%= t('admin.search_no_results') %></p>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% if @blog_posts.any? %>
|
|
||||||
<%= will_paginate @blog_posts,
|
|
||||||
:previous_label => '«',
|
|
||||||
:next_label => '»' %>
|
|
||||||
|
|
||||||
<%= render :partial => "sortable_list" %>
|
|
||||||
|
|
||||||
<%= will_paginate @blog_posts,
|
|
||||||
:previous_label => '«',
|
|
||||||
:next_label => '»' %>
|
|
||||||
<% else %>
|
|
||||||
<p>
|
|
||||||
<strong>
|
|
||||||
<%= t('.no_items_yet', :create => t('admin.blog.submenu.posts.new')) %>
|
|
||||||
</strong>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
|
@ -1 +0,0 @@
|
||||||
<%= render :partial => "form" %>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<% content_for :body_content_title, @category.title %>
|
|
||||||
|
|
||||||
<% content_for :body_content_left do %>
|
|
||||||
<% if @category.posts.any? %>
|
|
||||||
<article id="blog_posts">
|
|
||||||
<%= render :partial => "/blog/shared/post", :collection => @category.posts %>
|
|
||||||
</article>
|
|
||||||
<% else %>
|
|
||||||
<p>
|
|
||||||
<%= t('.no_posts') %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :body_content_right do %>
|
|
||||||
<%= render :partial => "/blog/shared/categories" %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render :partial => "/shared/content_page" %>
|
|
||||||
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<%= t('.greeting') %>,
|
|
||||||
|
|
||||||
<%= t('.you_recieved_new_comment') %>
|
|
||||||
|
|
||||||
<%= t('.comment_starts') %>
|
|
||||||
|
|
||||||
<%= t('.from') %>: <%= @comment.name %>
|
|
||||||
<%= t('.email') %>: <%= @comment.email %>
|
|
||||||
<%= t('.message') %>:
|
|
||||||
<%= @comment.body %>
|
|
||||||
|
|
||||||
<%= t('.comment_ends') %>
|
|
||||||
|
|
||||||
<%= t('.closing_line') %>,
|
|
||||||
<%= RefinerySetting[:site_name] %>
|
|
||||||
|
|
||||||
<%= t('.ps') %>
|
|
|
@ -1,11 +0,0 @@
|
||||||
<article class='blog_comment_message' id='<%= "comment-#{comment.to_param}" %>'>
|
|
||||||
<p>
|
|
||||||
<%= simple_format auto_link(comment.message.to_s) %>
|
|
||||||
</p>
|
|
||||||
<footer class='blog_comment_author'>
|
|
||||||
<p>
|
|
||||||
<%= t('blog.posts.comments.by', :who => comment.name) %>,
|
|
||||||
<%= t('blog.posts.comments.time_ago', :time => time_ago_in_words(comment.created_at)) %>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<% if next_or_previous?(@blog_post) -%>
|
|
||||||
<nav id="next_prev_article">
|
|
||||||
<% if @blog_post.next.present? -%>
|
|
||||||
<%= link_to raw(truncate(@blog_post.next.title) + " »"), @blog_post.next, :class => 'next' %>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%= link_to 'Blog Home', blog_root_path, :class => 'home' %>
|
|
||||||
|
|
||||||
<% if @blog_post.prev.present? -%>
|
|
||||||
<%= link_to "« ".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev' %>
|
|
||||||
<% end -%>
|
|
||||||
</nav><!-- /next_prev_article -->
|
|
||||||
<% end -%>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<% flash.each do |key, value| %>
|
|
||||||
<div id='flash' class="flash flash_<%= key %>">
|
|
||||||
<%= value %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<article id="blog_post">
|
|
||||||
<header>
|
|
||||||
<h1><%= @blog_post.title %></h1>
|
|
||||||
<details>
|
|
||||||
<time datetime="<%= @blog_post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
|
|
||||||
<%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.
|
|
||||||
</time>
|
|
||||||
<% if (categories = @blog_post.categories).any? %>
|
|
||||||
<aside class='filed_in'>
|
|
||||||
<%= t('.filed_in') %>
|
|
||||||
<% categories.each_with_index do |category, index| %>
|
|
||||||
<%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
|
|
||||||
<% end %>
|
|
||||||
</aside>
|
|
||||||
<% end %>
|
|
||||||
</details>
|
|
||||||
</header>
|
|
||||||
<%= @blog_post.body.html_safe %>
|
|
||||||
|
|
||||||
<% if BlogPost::ShareThis.enabled? %>
|
|
||||||
<span class="st_sharethis" displayText="ShareThis"></span>
|
|
||||||
<% end %>
|
|
||||||
</article>
|
|
||||||
<%= render :partial => '/shared/draft_page_message' unless @blog_post.nil? or @blog_post.live? -%>
|
|
||||||
<% if next_or_previous?(@blog_post) -%>
|
|
||||||
<nav id="next_prev_article">
|
|
||||||
<%= render 'nav' %>
|
|
||||||
</nav><!-- /next_prev_article -->
|
|
||||||
<% end -%>
|
|
|
@ -1,19 +0,0 @@
|
||||||
<% content_for :body_content_left do %>
|
|
||||||
<%= @page[Page.default_parts.first.to_sym] %>
|
|
||||||
<h1>Blog Archive for <%= @archive_date.strftime('%B %Y') %></h1>
|
|
||||||
<section id="blog_posts">
|
|
||||||
<%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
|
|
||||||
</section>
|
|
||||||
<%= "There are no blog articles posted for #{@archive_date.strftime('%B %Y')}. Stay tuned." unless @blog_posts.any? %>
|
|
||||||
<%# TODO: Add locale logic here - hubble is a n00b at that %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :body_content_right do %>
|
|
||||||
<%= @page[Page.default_parts.second.to_sym] %>
|
|
||||||
<%= render :partial => "/blog/shared/categories" %>
|
|
||||||
<%= render :partial => "/blog/shared/rss_feed" %>
|
|
||||||
<%= blog_archive_list %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render :partial => "/shared/content_page" %>
|
|
||||||
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<% content_for :body_content_left do %>
|
|
||||||
<%= @page[Page.default_parts.first.to_sym] %>
|
|
||||||
|
|
||||||
<section id="blog_posts">
|
|
||||||
<%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
|
|
||||||
</section>
|
|
||||||
<%= "<p>There are no blog articles posted yet. Stay tuned.</p>".html_safe unless @blog_posts.any? %>
|
|
||||||
<%# TODO: Add locale logic here - hubble is a n00b at that %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :body_content_right do %>
|
|
||||||
<%= @page[Page.default_parts.second.to_sym] %>
|
|
||||||
|
|
||||||
<%= render :partial => "/blog/shared/categories" %>
|
|
||||||
<%= render :partial => "/blog/shared/rss_feed" %>
|
|
||||||
<%= blog_archive_list %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render :partial => "/shared/content_page" %>
|
|
||||||
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
|
|
|
@ -1,17 +0,0 @@
|
||||||
xml.instruct! :xml, :version => "1.0"
|
|
||||||
xml.rss :version => "2.0" do
|
|
||||||
xml.channel do
|
|
||||||
xml.title RefinerySetting.find_or_set(:site_name, "Company Name")
|
|
||||||
xml.description RefinerySetting.find_or_set(:site_name, "Company Name") + " Blog Posts"
|
|
||||||
xml.link blog_root_url
|
|
||||||
|
|
||||||
@blog_posts.each do |post|
|
|
||||||
xml.item do
|
|
||||||
xml.title post.title
|
|
||||||
xml.description post.body
|
|
||||||
xml.pubDate post.published_at.to_s(:rfc822)
|
|
||||||
xml.link blog_post_url(post)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,75 +0,0 @@
|
||||||
<% content_for :body_content_left do %>
|
|
||||||
<div id="show_blog_post">
|
|
||||||
<%= render 'post' %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if BlogPost.comments_allowed? %>
|
|
||||||
<aside id="comments">
|
|
||||||
<h2><%= t('.comments.title') %></h2>
|
|
||||||
|
|
||||||
<% if (comments = @blog_post.comments.approved).any? %>
|
|
||||||
<%= render :partial => "comment", :collection => comments %>
|
|
||||||
<% else %>
|
|
||||||
<p>
|
|
||||||
<%= t('blog.shared.comments.none') %>.
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% flash.each do |key, value| %>
|
|
||||||
<div id='flash' class="flash flash_<%= key %>">
|
|
||||||
<%= value %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<h2><%= t('.comments.add') %></h2>
|
|
||||||
<% form_for [:blog_post, @blog_comment] do |f| %>
|
|
||||||
<%= f.error_messages %>
|
|
||||||
|
|
||||||
<div class='field'>
|
|
||||||
<%= f.label :name %>
|
|
||||||
<%= f.text_field :name %>
|
|
||||||
</div>
|
|
||||||
<div class='field'>
|
|
||||||
<%= f.label :email %>
|
|
||||||
<%= f.text_field :email %>
|
|
||||||
</div>
|
|
||||||
<div class='field message_field'>
|
|
||||||
<%= f.label :message %>
|
|
||||||
<%= f.text_area :message, :rows => 6 %>
|
|
||||||
</div>
|
|
||||||
<div class='field form-actions'>
|
|
||||||
<%= f.submit t('.submit') %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</aside>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :body_content_right do %>
|
|
||||||
<%= render :partial => "/blog/shared/categories" %>
|
|
||||||
<%= render :partial => "/blog/shared/posts" %>
|
|
||||||
<%= render :partial => "/blog/shared/rss_feed" %>
|
|
||||||
<%= blog_archive_list %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true } %>
|
|
||||||
|
|
||||||
<% if Refinery.version < '0.9.9' %>
|
|
||||||
<% content_for :head_libraries, jquery_include_tags(:jquery_ui => false) %>
|
|
||||||
<% content_for :head do %>
|
|
||||||
<%= stylesheet_link_tag 'refinerycms-blog' %>
|
|
||||||
<%= javascript_include_tag('refinerycms-blog') %>
|
|
||||||
<% if BlogPost::ShareThis.enabled? %>
|
|
||||||
<script src="http://w.sharethis.com/button/buttons.js"></script>
|
|
||||||
<script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
|
|
||||||
<% content_for :before_javascript_libraries, jquery_include_tags(:jquery_ui => false) %>
|
|
||||||
<% content_for :javascripts do %>
|
|
||||||
<%= javascript_include_tag 'refinerycms-blog' %>
|
|
||||||
<script src="http://w.sharethis.com/button/buttons.js"></script>
|
|
||||||
<script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script>
|
|
||||||
<% end if BlogPost::ShareThis.enabled? %>
|
|
||||||
<% end %>
|
|
|
@ -1,8 +0,0 @@
|
||||||
<h2><%= t('.title') %></h2>
|
|
||||||
<ul id='categories'>
|
|
||||||
<% @blog_categories.each do |category| %>
|
|
||||||
<li<%= " class='selected'" if @category.present? and @category.id == category.id %>>
|
|
||||||
<%= link_to "#{category.title} (#{category.post_count})", blog_category_url(category) %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<% if post.live? %>
|
|
||||||
<article class="blog_post" id="<%= dom_id(post) %>">
|
|
||||||
<header>
|
|
||||||
<h1><%= link_to post.title, blog_post_url(post) %></h1>
|
|
||||||
<details>
|
|
||||||
<time datetime="<%= post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
|
|
||||||
<%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>.
|
|
||||||
</time>
|
|
||||||
<% if (categories = post.categories).any? %>
|
|
||||||
<aside class='filed_in'>
|
|
||||||
<%= t('filed_in', :scope => 'blog.posts.show') %>
|
|
||||||
<% categories.each_with_index do |category, index| %>
|
|
||||||
<%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
|
|
||||||
<% end %>
|
|
||||||
</aside>
|
|
||||||
<% end %>
|
|
||||||
</details>
|
|
||||||
</header>
|
|
||||||
<section class='clearfix'>
|
|
||||||
<%= truncate(post.body,
|
|
||||||
:length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
|
|
||||||
:preserve_html_tags => true) %>
|
|
||||||
</section>
|
|
||||||
<footer>
|
|
||||||
<p>
|
|
||||||
<%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
|
|
||||||
|
|
||||||
<aside class='comment_count'>
|
|
||||||
<% if post.comments.any? %>
|
|
||||||
(<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
|
|
||||||
<% else %>
|
|
||||||
(<%= t('blog.shared.comments.none') %>)
|
|
||||||
<% end %>
|
|
||||||
</aside>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
</article>
|
|
||||||
<% end %>
|
|