Compare commits
1195 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
984641e46c | ||
|
|
ddb54d1924 | ||
|
|
af6d0ec107 | ||
|
|
e693f71775 | ||
|
|
0ff1c95c3d | ||
|
|
b5bc3a4ca3 | ||
|
|
8e73a2e0d6 | ||
|
|
e373284934 | ||
|
|
b5a9a1b6bf | ||
|
|
13c8f0a230 | ||
|
|
f733c7f207 | ||
|
|
d3c423f7ce | ||
|
|
52f68dac33 | ||
|
|
f984871b23 | ||
|
|
f09cd9e477 | ||
|
|
d6f21b24da | ||
|
|
34b2f72ae8 | ||
|
|
e6bdd2303d | ||
|
|
a9a68151ec | ||
|
|
f586dbc3e1 | ||
|
|
54028f4e7e | ||
|
|
e8b83bef41 | ||
|
|
78b22c4a82 | ||
|
|
e252414263 | ||
|
|
320db21d5c | ||
|
|
c253d73d11 | ||
|
|
08fdc8a5bd | ||
|
|
9cc0bb831a | ||
|
|
a5a00e9cef | ||
|
|
4134cbfc9c | ||
|
|
58379a5e28 | ||
|
|
aae1689a27 | ||
|
|
4338f632f6 | ||
|
|
fa0cc6f2c8 | ||
|
|
e284ad62b2 | ||
|
|
d28c0159ab | ||
|
|
e40ecae681 | ||
|
|
1e142aa628 | ||
|
|
6586e67a5c | ||
|
|
d9b3366a5c | ||
|
|
61969f5c84 | ||
|
|
2a4737147f | ||
|
|
a909f0ddb8 | ||
|
|
25cdd4af8e | ||
|
|
be7e46300c | ||
|
|
9ba07a2afb | ||
|
|
a39d15d685 | ||
|
|
d424c2eb20 | ||
|
|
c8c8f0d02d | ||
|
|
8221f1f193 | ||
|
|
c83952571f | ||
|
|
18a8efed5f | ||
|
|
82dc2a8c98 | ||
|
|
001ae19b26 | ||
|
|
c003dcded9 | ||
|
|
7aa8f2c73c | ||
|
|
41837eb31d | ||
|
|
860a537f30 | ||
|
|
33fd88507d | ||
|
|
d8bf66a6c9 | ||
|
|
2065d81bb4 | ||
|
|
7994e2594a | ||
|
|
baa6fda3e0 | ||
|
|
fb33be78dd | ||
|
|
db3637fe84 | ||
|
|
ee0a226388 | ||
|
|
5cd269411d | ||
|
|
cb679a6aba | ||
|
|
ad1ef877c0 | ||
|
|
c5ba0b8f8c | ||
|
|
365c6b3a83 | ||
|
|
a504a10b52 | ||
|
|
caf35d0ad7 | ||
|
|
b718cf729a | ||
|
|
489feb4e01 | ||
|
|
89c3758bae | ||
|
|
4bde890eaa | ||
|
|
ee10a4b173 | ||
|
|
6f375306c2 | ||
|
|
98f8f7b89f | ||
|
|
7028fbe288 | ||
|
|
07384edb2d | ||
|
|
12e685bd92 | ||
|
|
6dd05ca4da | ||
|
|
a1c7a44fa0 | ||
|
|
cb9e3b43f9 | ||
|
|
011c8c74d9 | ||
|
|
38e37a4dfa | ||
|
|
607b674c57 | ||
|
|
fa3b43a970 | ||
|
|
bf0db2287b | ||
|
|
339074a66e | ||
|
|
c568ac4d64 | ||
|
|
3d7786e185 | ||
|
|
9b12b86053 | ||
|
|
84817b0124 | ||
|
|
5624fa0c5e | ||
|
|
10434f5ee3 | ||
|
|
e32e3ddf70 | ||
|
|
70e6428c1f | ||
|
|
9dc1294ec5 | ||
|
|
e81858c0dc | ||
|
|
8035b3f24a | ||
|
|
d201e4a039 | ||
|
|
e999b5715a | ||
|
|
3fb6fba0f0 | ||
|
|
e21735b037 | ||
|
|
e553b8c590 | ||
|
|
4d83bf2135 | ||
|
|
385fd91e70 | ||
|
|
2d666caaf2 | ||
|
|
c61cb1bdcd | ||
|
|
eedb2854ec | ||
|
|
1cb51b5c71 | ||
|
|
48d4c8733d | ||
|
|
302bdfd628 | ||
|
|
cc6ef7b8f5 | ||
|
|
50738f28e9 | ||
|
|
8b8da33ffc | ||
|
|
17fa0d2baf | ||
|
|
3f8420b0e9 | ||
|
|
ddc7e86e6c | ||
|
|
8a77062888 | ||
|
|
e3b43243cc | ||
|
|
61a4228e6b | ||
|
|
f0a2098826 | ||
|
|
a624a57bfb | ||
|
|
0af8377844 | ||
|
|
e4f855b64a | ||
|
|
16b80a2f1b | ||
|
|
21b8445753 | ||
|
|
63432c2acc | ||
|
|
03f98af60b | ||
|
|
852a12db61 | ||
|
|
b804a70469 | ||
|
|
924d155012 | ||
|
|
604418d699 | ||
|
|
b9f6cb8800 | ||
|
|
f2de498d61 | ||
|
|
55da83d0c0 | ||
|
|
1d8719b474 | ||
|
|
3647b17110 | ||
|
|
533a94267a | ||
|
|
ecb9646ccb | ||
|
|
162b11dcc5 | ||
|
|
93a4f19b40 | ||
|
|
92d8ee1a36 | ||
|
|
4b8146dd00 | ||
|
|
abc906186e | ||
|
|
564c1a3650 | ||
|
|
c44f9d2537 | ||
|
|
7e932f091d | ||
|
|
2c9697ff4e | ||
|
|
6bfe1be045 | ||
|
|
efaf728737 | ||
|
|
ddcfe1535a | ||
|
|
9e0b97dc9c | ||
|
|
245db8971a | ||
|
|
0586a71071 | ||
|
|
2146a55c3b | ||
|
|
a0254f30cd | ||
|
|
7a498362b3 | ||
|
|
cfbfe8416f | ||
|
|
1b0897d53a | ||
|
|
9d1ca6eaca | ||
|
|
39a062e90a | ||
|
|
af5eec7094 | ||
|
|
668bffcd84 | ||
|
|
02d093f6b6 | ||
|
|
383f7c57aa | ||
|
|
10133a13f2 | ||
|
|
8838a89ecc | ||
|
|
cf94d67caf | ||
|
|
97e53900ad | ||
|
|
9fc7908af5 | ||
|
|
7bc118b598 | ||
|
|
1d837c32ee | ||
|
|
e5ca494db8 | ||
|
|
5de9eed48a | ||
|
|
fe739f6a8d | ||
|
|
02be661163 | ||
|
|
22ae668c74 | ||
|
|
fc69adb135 | ||
|
|
4e4175ee4c | ||
|
|
aa04da48f3 | ||
|
|
a2d875655c | ||
|
|
6a610ff7a4 | ||
|
|
5d3adc0bdb | ||
|
|
6a3f6e7bfa | ||
|
|
d043de08cd | ||
|
|
858beb97c5 | ||
|
|
379bad9f46 | ||
|
|
041d9814a7 | ||
|
|
c66ac0827e | ||
|
|
419402c554 | ||
|
|
93f0a7c58d | ||
|
|
38316bae3f | ||
|
|
bd4debe91b | ||
|
|
08eaff1c24 | ||
|
|
547fcf49e0 | ||
|
|
3a813cb612 | ||
|
|
da57e04a50 | ||
|
|
ba2d5548ff | ||
|
|
a4e5e49a08 | ||
|
|
027976626c | ||
|
|
9f56494c4c | ||
|
|
ab37cd2577 | ||
|
|
559f7afc60 | ||
|
|
ef418c7f50 | ||
|
|
c80255e9ab | ||
|
|
7b994adc23 | ||
|
|
f8ec0d316a | ||
|
|
7040e4baae | ||
|
|
fed3ae9e85 | ||
|
|
89ae77dfd9 | ||
|
|
7bf6881cb2 | ||
|
|
ed1a06495b | ||
|
|
e5d2e5010b | ||
|
|
3760a34b2b | ||
|
|
26bb1a9beb | ||
|
|
d59dea29ab | ||
|
|
78b4a35d12 | ||
|
|
7fc37e4737 | ||
|
|
2214c83ec7 | ||
|
|
d10719330d | ||
|
|
38efa218d0 | ||
|
|
8c747f02b5 | ||
|
|
6c625297f2 | ||
|
|
8a47d49dfc | ||
|
|
d5a7e907a3 | ||
|
|
6ecf896fa2 | ||
|
|
6dd989484a | ||
|
|
a37820a963 | ||
|
|
f90e7d3239 | ||
|
|
08f0011244 | ||
|
|
3e231da472 | ||
|
|
064e3c426e | ||
|
|
f0b80b47f1 | ||
|
|
22a6661b51 | ||
|
|
7f1fc56f78 | ||
|
|
3cac9c452f | ||
|
|
57ec7bb9a9 | ||
|
|
8b5e5105a8 | ||
|
|
1833f0dd5d | ||
|
|
019e16c5ba | ||
|
|
885d489bc3 | ||
|
|
63b644551c | ||
|
|
70ce58f5e1 | ||
|
|
33d0f9fc1b | ||
|
|
00858656b5 | ||
|
|
ef0e41e624 | ||
|
|
a11696b85e | ||
|
|
9ac6de4215 | ||
|
|
bed7ec5953 | ||
|
|
1d7308bf5d | ||
|
|
4d6a21254f | ||
|
|
fa5fa9e228 | ||
|
|
36a4aab020 | ||
|
|
42a327211e | ||
|
|
88e9eb59cf | ||
|
|
65895752da | ||
|
|
8996acf314 | ||
|
|
1384140e41 | ||
|
|
1220ff8a06 | ||
|
|
f691636c75 | ||
|
|
824a29624f | ||
|
|
daa5b00a2a | ||
|
|
36f4df2931 | ||
|
|
cf40e0432a | ||
|
|
8f8a1191cb | ||
|
|
2b921542a5 | ||
|
|
ad6037ac63 | ||
|
|
43d6e49c3a | ||
|
|
53d50f16d6 | ||
|
|
7f38f1dd1c | ||
|
|
2367b73d3a | ||
|
|
23e598f2f8 | ||
|
|
7bec139987 | ||
|
|
a26266159c | ||
|
|
28d40bf27d | ||
|
|
779be7c5a0 | ||
|
|
6cba935a65 | ||
|
|
06d7665bf9 | ||
|
|
5151779f80 | ||
|
|
3dcfa810fd | ||
|
|
9b3139dba9 | ||
|
|
b2d78e7df6 | ||
|
|
dac90c8003 | ||
|
|
35117f7af4 | ||
|
|
5e39b11c2f | ||
|
|
cfe062918b | ||
|
|
8695dea0a5 | ||
|
|
792e17c385 | ||
|
|
6fbbe580c5 | ||
|
|
8a62d26af4 | ||
|
|
fee0f90a1b | ||
|
|
292d027498 | ||
|
|
a1bcdc616f | ||
|
|
17f69bd182 | ||
|
|
d45b525497 | ||
|
|
243f59c87d | ||
|
|
9e321a63c0 | ||
|
|
f986c5898e | ||
|
|
8dd2d17cd5 | ||
|
|
a0e9163d27 | ||
|
|
cc7d27b030 | ||
|
|
cbd0ace098 | ||
|
|
6884f5533e | ||
|
|
30ed6df38d | ||
|
|
240be2be0f | ||
|
|
ae88a9c2e1 | ||
|
|
af4c8bee94 | ||
|
|
44ac44e1dd | ||
|
|
4033a78887 | ||
|
|
51629cd0c0 | ||
|
|
4fc33c7da2 | ||
|
|
abfb8149d9 | ||
|
|
a1ebd18b7c | ||
|
|
0b820361de | ||
|
|
fc719230a3 | ||
|
|
49febc6333 | ||
|
|
48f1794d70 | ||
|
|
e17b609517 | ||
|
|
a25f4fdf44 | ||
|
|
831df0b222 | ||
|
|
ecd32819a6 | ||
|
|
9e4610f9bd | ||
|
|
df5b554f24 | ||
|
|
ef0d6bd4d6 | ||
|
|
f15e948085 | ||
|
|
53e6d391e3 | ||
|
|
a2c58c7ca1 | ||
|
|
0ac87b9e55 | ||
|
|
59b564c4be | ||
|
|
193580d5d9 | ||
|
|
eb846e27fd | ||
|
|
e3ed831e30 | ||
|
|
e6b1d545a3 | ||
|
|
b79b0d7586 | ||
|
|
39e3374ece | ||
|
|
1483023769 | ||
|
|
bc048a943c | ||
|
|
4414a3f287 | ||
|
|
27fdfb60af | ||
|
|
852dce2dff | ||
|
|
b050f27a84 | ||
|
|
44077a2c6f | ||
|
|
0ed97d820c | ||
|
|
9b5bfdeb00 | ||
|
|
f8e3f29d1a | ||
|
|
d844dc8e1b | ||
|
|
6c5aaef86e | ||
|
|
d8c17d160a | ||
|
|
c099711f97 | ||
|
|
d278b72289 | ||
|
|
82bc26fe90 | ||
|
|
47df106237 | ||
|
|
f70b1f4572 | ||
|
|
ed134bac84 | ||
|
|
33aad10e73 | ||
|
|
3d78b375c6 | ||
|
|
f9acee2be4 | ||
|
|
86c80124fc | ||
|
|
443e232ea4 | ||
|
|
c74c274a9e | ||
|
|
f902474591 | ||
|
|
bf72864c2b | ||
|
|
4c2552e0bf | ||
|
|
066190c16f | ||
|
|
3aea387b9a | ||
|
|
d12c486dd2 | ||
|
|
97bcbb81b9 | ||
|
|
04f661f646 | ||
|
|
c4f92fd4cc | ||
|
|
813dff8af2 | ||
|
|
db0b345241 | ||
|
|
21be27d722 | ||
|
|
3d31a37dd3 | ||
|
|
17f168ed06 | ||
|
|
de35940341 | ||
|
|
d67db76b88 | ||
|
|
5a6caa294e | ||
|
|
c4f499d518 | ||
|
|
7b75fab7a1 | ||
|
|
5149c5118b | ||
|
|
df36386757 | ||
|
|
31302fb930 | ||
|
|
d51cfccd7e | ||
|
|
79ad05d405 | ||
|
|
6d0dc438a7 | ||
|
|
ca0c677d46 | ||
|
|
276d3026c8 | ||
|
|
41970ecf07 | ||
|
|
2a9e35355e | ||
|
|
a48b992ec0 | ||
|
|
599e39ce16 | ||
|
|
d07daede68 | ||
|
|
16741598fd | ||
|
|
56a6593dd6 | ||
|
|
096962b778 | ||
|
|
2d97bc49bd | ||
|
|
da10b5decf | ||
|
|
430c6c0642 | ||
|
|
bfaefa4dc9 | ||
|
|
b43e770420 | ||
|
|
3a083723f0 | ||
|
|
ba49a5a783 | ||
|
|
4adf332480 | ||
|
|
d9d5d9cda5 | ||
|
|
a4efd3d44c | ||
|
|
6eb6a01339 | ||
|
|
388b25ddf9 | ||
|
|
e81ef564e3 | ||
|
|
e1fdd3a210 | ||
|
|
2546603a67 | ||
|
|
e81343c8e4 | ||
|
|
51f94119ff | ||
|
|
ac88817a34 | ||
|
|
2a3b3b6dd2 | ||
|
|
711f525d98 | ||
|
|
21a7942de6 | ||
|
|
b7320a0bd7 | ||
|
|
5225686d8f | ||
|
|
3e5f53b082 | ||
|
|
3595685f9a | ||
|
|
b324207121 | ||
|
|
fe3c0b8d29 | ||
|
|
02cc5adf78 | ||
|
|
02cbad2697 | ||
|
|
071ee9ab54 | ||
|
|
61fb34e738 | ||
|
|
f2c8ea9722 | ||
|
|
b6406b54b4 | ||
|
|
9ce5c45799 | ||
|
|
f1cc3a7b0d | ||
|
|
d925c2aefc | ||
|
|
7e65b3176d | ||
|
|
9645ec727b | ||
|
|
6f29a8b642 | ||
|
|
27d7b3026b | ||
|
|
c1647ccd2c | ||
|
|
28e2d4041f | ||
|
|
780ec598d6 | ||
|
|
73b53e02fc | ||
|
|
1440544b2d | ||
|
|
6300f87987 | ||
|
|
bc2223fb8e | ||
|
|
b5d4f8b781 | ||
|
|
939356ef26 | ||
|
|
4966290f87 | ||
|
|
422061f137 | ||
|
|
7e6d544180 | ||
|
|
c1d068aeb9 | ||
|
|
6a2319e16d | ||
|
|
0d65838e5d | ||
|
|
587d06dced | ||
|
|
465649475d | ||
|
|
aff346071f | ||
|
|
3f466e86b6 | ||
|
|
4bf27982f4 | ||
|
|
8e1b4e299c | ||
|
|
51d77d5781 | ||
|
|
186d1c1f26 | ||
|
|
e00fe824ac | ||
|
|
b2657ddc72 | ||
|
|
4de0a5c220 | ||
|
|
ed40ebace6 | ||
|
|
1d83809866 | ||
|
|
6ee4e4190e | ||
|
|
f280b96215 | ||
|
|
e16ca82e76 | ||
|
|
77e74c5642 | ||
|
|
f288c09380 | ||
|
|
488daed8f3 | ||
|
|
f05f88c1cb | ||
|
|
28b143da73 | ||
|
|
8f37aa0522 | ||
|
|
7008d26f68 | ||
|
|
f06d909c23 | ||
|
|
095b420997 | ||
|
|
59745fbc73 | ||
|
|
caa8818f02 | ||
|
|
a66582a8fb | ||
|
|
0bd9dc7af0 | ||
|
|
69ee1a98a7 | ||
|
|
137003c671 | ||
|
|
4a7a40425a | ||
|
|
81ec3fef60 | ||
|
|
7cb64e8804 | ||
|
|
39708d773d | ||
|
|
ec55af5b8a | ||
|
|
2abee3fcdd | ||
|
|
23a1c2a772 | ||
|
|
f394cf559c | ||
|
|
54ecdb670d | ||
|
|
68db9b9926 | ||
|
|
cb33ede9dc | ||
|
|
a8d7732a39 | ||
|
|
1770cbb6bf | ||
|
|
21ce7ab30a | ||
|
|
d89e9620ac | ||
|
|
45a7b13e9a | ||
|
|
8928e461d4 | ||
|
|
4621f625a0 | ||
|
|
5e71790cd1 | ||
|
|
b5204a4820 | ||
|
|
b84f49a1c3 | ||
|
|
8e88cd6255 | ||
|
|
c07fefde1a | ||
|
|
098d313163 | ||
|
|
a7e3b2d9df | ||
|
|
71862e00a7 | ||
|
|
68f3d0951a | ||
|
|
4feb7c893b | ||
|
|
1b62dd06b8 | ||
|
|
687fb6f0aa | ||
|
|
98961fef74 | ||
|
|
8b070fddbb | ||
|
|
8af6866ae4 | ||
|
|
146797ea61 | ||
|
|
8bd5a36aaf | ||
|
|
a64a501dbb | ||
|
|
0a90a48b04 | ||
|
|
540687515e | ||
|
|
62c6530ca9 | ||
|
|
f78826c9c7 | ||
|
|
2f602f2a57 | ||
|
|
fa543fed63 | ||
|
|
235c463849 | ||
|
|
ff493c21d4 | ||
|
|
d0b7b4ee50 | ||
|
|
339f3fc2f0 | ||
|
|
d8d803546b | ||
|
|
6d80d91873 | ||
|
|
7c4e9e5838 | ||
|
|
f756749e02 | ||
|
|
3bcd3257a1 | ||
|
|
fbedff4eca | ||
|
|
af7e3380d3 | ||
|
|
0c65d1ddd8 | ||
|
|
378a703cc3 | ||
|
|
fe41430d1e | ||
|
|
1ec329284c | ||
|
|
b7a88fd03b | ||
|
|
5f188650d8 | ||
|
|
c98e44c5a1 | ||
|
|
0c0c98a0b0 | ||
|
|
6d39cc39c6 | ||
|
|
a0a61b65cb | ||
|
|
5d20b4fb51 | ||
|
|
3621c34bd5 | ||
|
|
eba636c929 | ||
|
|
0d0eb6117f | ||
|
|
6df8f73bb0 | ||
|
|
b0207f2b49 | ||
|
|
920d3bb974 | ||
|
|
0d5d015d88 | ||
|
|
6193bb896b | ||
|
|
4314bfb99c | ||
|
|
ae03170984 | ||
|
|
977ff7b35d | ||
|
|
1e288e5f14 | ||
|
|
9747b0cf96 | ||
|
|
258e84fc0a | ||
|
|
17cda86dfa | ||
|
|
bdd6d3ba6b | ||
|
|
d699f8321a | ||
|
|
b4976a5445 | ||
|
|
e2722710de | ||
|
|
45d4dd6b88 | ||
|
|
d79a6d7e19 | ||
|
|
6a2e07064b | ||
|
|
52d5b8936e | ||
|
|
c91eb9f345 | ||
|
|
44508f0f1e | ||
|
|
1738db9e1f | ||
|
|
f7387048b0 | ||
|
|
92cfcb8fc9 | ||
|
|
614f83799e | ||
|
|
d39b62aa31 | ||
|
|
ec3e158781 | ||
|
|
d5e51dada6 | ||
|
|
23e774bede | ||
|
|
0cb5dfbbe0 | ||
|
|
6ba534fb58 | ||
|
|
38cac3a3c4 | ||
|
|
82182d24e7 | ||
|
|
83d248469f | ||
|
|
2d620071f0 | ||
|
|
50c657133a | ||
|
|
fb7fb62f79 | ||
|
|
98e5df6aac | ||
|
|
ee168bcbfb | ||
|
|
8cdf2254d8 | ||
|
|
57a929d718 | ||
|
|
2b0788ec9c | ||
|
|
c7f6d4e4fe | ||
|
|
979baf80dd | ||
|
|
3db79aa6b2 | ||
|
|
2ebad800b2 | ||
|
|
dbe7fbc760 | ||
|
|
ad2e10c33e | ||
|
|
ac413937f3 | ||
|
|
48b02db70d | ||
|
|
eef62d4128 | ||
|
|
f5ff5bd5b0 | ||
|
|
bd19bf5f3c | ||
|
|
0ad3d8f351 | ||
|
|
2be005d344 | ||
|
|
79808acd9f | ||
|
|
dcb07237d8 | ||
|
|
381fb6291e | ||
|
|
e3b9ce4d80 | ||
|
|
fb557dd682 | ||
|
|
4438cbd5d0 | ||
|
|
ec6b0f873e | ||
|
|
92d830b884 | ||
|
|
3c8df7c4aa | ||
|
|
c0afa6be49 | ||
|
|
d0cb9008a2 | ||
|
|
e551a6b9f5 | ||
|
|
533124fe91 | ||
|
|
5b73b80e81 | ||
|
|
ccd66bba9c | ||
|
|
02616a8ac7 | ||
|
|
aa8457c40f | ||
|
|
a9c37c162e | ||
|
|
93de2e4b02 | ||
|
|
a0f51af355 | ||
|
|
3dd3cfa7ec | ||
|
|
295ee47c3a | ||
|
|
c9a8d7efa5 | ||
|
|
1f1b0bd783 | ||
|
|
d562f6537e | ||
|
|
1c46b8dccb | ||
|
|
8c1a16b371 | ||
|
|
ea796d4f94 | ||
|
|
d5aea1b00d | ||
|
|
fd9de730c8 | ||
|
|
fbdeb557ca | ||
|
|
07d691fc97 | ||
|
|
eeb31f65c3 | ||
|
|
046d0f0d19 | ||
|
|
a611e73bed | ||
|
|
aea766327c | ||
|
|
f68f7ea2b6 | ||
|
|
ddf6eef370 | ||
|
|
9979e31220 | ||
|
|
669642292b | ||
|
|
ecf1aac5cb | ||
|
|
4103ed0ba7 | ||
|
|
0bbae19b41 | ||
|
|
607a66b6c6 | ||
|
|
a3f7ff19b0 | ||
|
|
0f4479aceb | ||
|
|
1d38866f86 | ||
|
|
e423e890e0 | ||
|
|
25454d3e97 | ||
|
|
75127f2a63 | ||
|
|
94785d4157 | ||
|
|
d01da727f0 | ||
|
|
5a62098b95 | ||
|
|
0ee078e232 | ||
|
|
2921958788 | ||
|
|
34c603a9c3 | ||
|
|
6c0dd7e25f | ||
|
|
53d97dab08 | ||
|
|
3b7700131c | ||
|
|
14c8683535 | ||
|
|
e070168c4a | ||
|
|
cc4dc068ab | ||
|
|
64cd52e067 | ||
|
|
4553bc2997 | ||
|
|
521f227f74 | ||
|
|
cab6871de3 | ||
|
|
7cd8f35ac8 | ||
|
|
2b70ddb23c | ||
|
|
9eaec6061e | ||
|
|
54e7677888 | ||
|
|
c781113a65 | ||
|
|
4237a83028 | ||
|
|
f11e878e7f | ||
|
|
68e2b9a0b9 | ||
|
|
406338ea05 | ||
|
|
2c3ff37980 | ||
|
|
c33835e751 | ||
|
|
826d045532 | ||
|
|
c4b0245399 | ||
|
|
0c434c197b | ||
|
|
a07eabca55 | ||
|
|
1cfb5a7feb | ||
|
|
00af6ef9de | ||
|
|
7a998663b2 | ||
|
|
749061d60a | ||
|
|
667d1c5428 | ||
|
|
f5db1cd921 | ||
|
|
770a8d0b17 | ||
|
|
262a8e75f9 | ||
|
|
81b688f0e8 | ||
|
|
698d36180d | ||
|
|
46382e669f | ||
|
|
217fa9a57c | ||
|
|
01bf64e6b0 | ||
|
|
839bf8794f | ||
|
|
037c524df2 | ||
|
|
71569324f4 | ||
|
|
030f4f63ed | ||
|
|
257b5a9eef | ||
|
|
ac650ebd46 | ||
|
|
e24027a8d0 | ||
|
|
a27e593924 | ||
|
|
09086b8dd8 | ||
|
|
6992d66202 | ||
|
|
9342ceb968 | ||
|
|
324f58a636 | ||
|
|
20b3ad2cd6 | ||
|
|
823a6bff5b | ||
|
|
59c51f9e7c | ||
|
|
f9435a3c34 | ||
|
|
59adf88cad | ||
|
|
48896ab3d8 | ||
|
|
668c6ff74f | ||
|
|
da0810382b | ||
|
|
90e627ad60 | ||
|
|
7e50cc9ce8 | ||
|
|
5e081ce3ee | ||
|
|
2a4f3f9ae4 | ||
|
|
ed48b691e1 | ||
|
|
30141bd488 | ||
|
|
e16e3fba40 | ||
|
|
69ab113201 | ||
|
|
7192f12a49 | ||
|
|
ec6962ea2c | ||
|
|
8a390dd237 | ||
|
|
5290d0be6b | ||
|
|
6cd7fbb455 | ||
|
|
8ccf527e01 | ||
|
|
d2ec4fcf88 | ||
|
|
8fa293f561 | ||
|
|
b58306aad8 | ||
|
|
2a2f8f3531 | ||
|
|
16ab8f04c3 | ||
|
|
61a58bca7d | ||
|
|
e67e22ee73 | ||
|
|
7a23f671a2 | ||
|
|
d115eb816e | ||
|
|
4b5e33d5b0 | ||
|
|
c579d302d5 | ||
|
|
2f2ebf419c | ||
|
|
2f13ab6adf | ||
|
|
b121984e76 | ||
|
|
23b9dd5c71 | ||
|
|
bc6110c178 | ||
|
|
72f7e545dc | ||
|
|
e0da49e4df | ||
|
|
b004060679 | ||
|
|
ea68619f0b | ||
|
|
555f639026 | ||
|
|
26a2f1a280 | ||
|
|
83e3fb98f7 | ||
|
|
bac4fcbd8f | ||
|
|
ecd11702c3 | ||
|
|
fe0652e243 | ||
|
|
f49722ba90 | ||
|
|
0370723edd | ||
|
|
d46712de84 | ||
|
|
199a3c38f9 | ||
|
|
0ed8cf973d | ||
|
|
76d4f74f6b | ||
|
|
ca3c464fda | ||
|
|
85f61364f8 | ||
|
|
c1d04af5cc | ||
|
|
5b72f53738 | ||
|
|
da325780b1 | ||
|
|
a40a03905f | ||
|
|
044e423543 | ||
|
|
cb9b61f393 | ||
|
|
58031408f1 | ||
|
|
e20b06bb97 | ||
|
|
cc4f9dd09b | ||
|
|
18ea0c1717 | ||
|
|
2bb85eb8e0 | ||
|
|
5d28a7fdf8 | ||
|
|
befc558224 | ||
|
|
c91f1301f0 | ||
|
|
e6a51bb49d | ||
|
|
ae0ad73b4a | ||
|
|
b7edf5e046 | ||
|
|
81f244025f | ||
|
|
fcc328f00a | ||
|
|
758b1f8e64 | ||
|
|
bb58473b90 | ||
|
|
1d46c2febd | ||
|
|
15ea64b409 | ||
|
|
6787709693 | ||
|
|
a3874d42af | ||
|
|
3f8d470d23 | ||
|
|
ae3061df80 | ||
|
|
5579fa5e0b | ||
|
|
e33ede0ec2 | ||
|
|
76d4fbccf9 | ||
|
|
60e971ad63 | ||
|
|
222b390b31 | ||
|
|
932ac45ea5 | ||
|
|
80ebaece2d | ||
|
|
3419198635 | ||
|
|
1026b81d0c | ||
|
|
c74463404d | ||
|
|
2081744cf6 | ||
|
|
cbaf2a0cb3 | ||
|
|
6e7b6b5dfc | ||
|
|
815694de31 | ||
|
|
2daceb1111 | ||
|
|
eb07680f1f | ||
|
|
47c23c986a | ||
|
|
742e2279ae | ||
|
|
eaae16a486 | ||
|
|
ae945ace9d | ||
|
|
9d5606a4fd | ||
|
|
cd7721a127 | ||
|
|
ee447c9ce6 | ||
|
|
eba2aae353 | ||
|
|
c1a80b1e8f | ||
|
|
6998df25e0 | ||
|
|
921210012a | ||
|
|
8d270e919f | ||
|
|
1e397a41ae | ||
|
|
243ef4ee16 | ||
|
|
ea6974d438 | ||
|
|
ccb23cd186 | ||
|
|
d4ee20455e | ||
|
|
ef603a070e | ||
|
|
1a4448c6d2 | ||
|
|
a78d8fa6af | ||
|
|
8c0a82f26f | ||
|
|
93c42d24c7 | ||
|
|
036ffeb634 | ||
|
|
3dcbdad088 | ||
|
|
7820c31976 | ||
|
|
d314f07887 | ||
|
|
2efaedc225 | ||
|
|
c5e2ed5aa1 | ||
|
|
8f917817b8 | ||
|
|
a2c0088c91 | ||
|
|
9fef0a9909 | ||
|
|
29bfac5f54 | ||
|
|
efa7c215e2 | ||
|
|
1589bd9ac3 | ||
|
|
a810a6e2b7 | ||
|
|
c4fb4a8510 | ||
|
|
d67a5aba0e | ||
|
|
d5c4da3bf0 | ||
|
|
261a464b50 | ||
|
|
0f2ae79e05 | ||
|
|
caffdee047 | ||
|
|
d320b2e7d4 | ||
|
|
e8ccd35363 | ||
|
|
bd854bf2dd | ||
|
|
10edb2b056 | ||
|
|
86f1afae92 | ||
|
|
1cffd35968 | ||
|
|
baeacfb8a9 | ||
|
|
7ecf5df26a | ||
|
|
a5a886c51f | ||
|
|
96aace971f | ||
|
|
6c254c534f | ||
|
|
b341c1ef8a | ||
|
|
7e6b43266f | ||
|
|
3975eef0c4 | ||
|
|
a2a87cc68f | ||
|
|
4bdc1bc418 | ||
|
|
33454a7090 | ||
|
|
6268b7cc7e | ||
|
|
75846a4d1f | ||
|
|
c199e22190 | ||
|
|
3b2bdb8397 | ||
|
|
767671c3b4 | ||
|
|
76414dedff | ||
|
|
ae7fb91a9a | ||
|
|
229070a76b | ||
|
|
8bfe459241 | ||
|
|
bb6fb2f5e8 | ||
|
|
6de44877c8 | ||
|
|
b6f3e6eca6 | ||
|
|
a86cc96452 | ||
|
|
178e5f59e6 | ||
|
|
7fffa03d8d | ||
|
|
888e4d80ef | ||
|
|
d3c7c46800 | ||
|
|
c432ed9e08 | ||
|
|
e175149e76 | ||
|
|
1b5901317d | ||
|
|
2f4b5bad26 | ||
|
|
64e8927ae9 | ||
|
|
c932d20ef5 | ||
|
|
5d5fda3a25 | ||
|
|
a96cdd5ee7 | ||
|
|
4191e2b6f0 | ||
|
|
88fd9f72e6 | ||
|
|
3d36ebe2e6 | ||
|
|
6966fbba7c | ||
|
|
2310bc95bc | ||
|
|
27a5791e26 | ||
|
|
be8038e9d0 | ||
|
|
1556d38b1e | ||
|
|
4e4de65cba | ||
|
|
6e8d807408 | ||
|
|
095466cb43 | ||
|
|
2719c699d7 | ||
|
|
34030276d7 | ||
|
|
330977186e | ||
|
|
fc57255b40 | ||
|
|
266820742d | ||
|
|
722471a111 | ||
|
|
86b5e810e5 | ||
|
|
f8a31e8864 | ||
|
|
639472b917 | ||
|
|
193325f81b | ||
|
|
5a7cac652c | ||
|
|
b5aaf36bd2 | ||
|
|
c5a26249ea | ||
|
|
69ead3c829 | ||
|
|
93caa4a11d | ||
|
|
e20d8d3e95 | ||
|
|
fb3e292e20 | ||
|
|
f499dd627a | ||
|
|
8e1bade355 | ||
|
|
a32321df68 | ||
|
|
5a29311137 | ||
|
|
3e7a12cca1 | ||
|
|
81a6e07d5c | ||
|
|
727ecae62b | ||
|
|
85e45fa558 | ||
|
|
83c0093665 | ||
|
|
46a9304ae1 | ||
|
|
d794981ecf | ||
|
|
6476ce6ba9 | ||
|
|
a06b452e7e | ||
|
|
0b6cbb43d6 | ||
|
|
27903a46e6 | ||
|
|
330882c689 | ||
|
|
b1bac703ed | ||
|
|
bf6bd2dc68 | ||
|
|
eb7b2e7a3b | ||
|
|
73c80cb5e5 | ||
|
|
6769c2c729 | ||
|
|
afef9e3211 | ||
|
|
a9e5f2912f | ||
|
|
66d1e4297e | ||
|
|
5e59048705 | ||
|
|
4d4e2d4abd | ||
|
|
db4e8382e4 | ||
|
|
51762753f4 | ||
|
|
2483eef4be | ||
|
|
38d2616ea0 | ||
|
|
5db64b6f21 | ||
|
|
0505a45de5 | ||
|
|
e96fa967b8 | ||
|
|
8b29612614 | ||
|
|
90d52151b6 | ||
|
|
6666de96b2 | ||
|
|
b7d92786d0 | ||
|
|
d731d4e803 | ||
|
|
2277b9f5a6 | ||
|
|
aef8b9648e | ||
|
|
65589d25c6 | ||
|
|
5ffad4d343 | ||
|
|
50a551a87e | ||
|
|
1494389d34 | ||
|
|
b43049af47 | ||
|
|
f563f04f1c | ||
|
|
ae7e744644 | ||
|
|
625e0888ea | ||
|
|
a3d638df67 | ||
|
|
9227df54b6 | ||
|
|
015f3eb9ac | ||
|
|
fd747f9012 | ||
|
|
7350dbb75e | ||
|
|
94e1264aef | ||
|
|
aec3980a93 | ||
|
|
4eed222f18 | ||
|
|
f63a80300b | ||
|
|
87cf3eda41 | ||
|
|
02423d3a41 | ||
|
|
cb1f79f59a | ||
|
|
18a7317185 | ||
|
|
c5810fc003 | ||
|
|
f60b6994eb | ||
|
|
50b3635e7e | ||
|
|
ab7bfd10c5 | ||
|
|
cdb0c2db33 | ||
|
|
21e5895a8a | ||
|
|
33e1322a44 | ||
|
|
b08556ec7f | ||
|
|
a71999ba84 | ||
|
|
2d468f5022 | ||
|
|
eba13a0dd7 | ||
|
|
1946bac8e4 | ||
|
|
e52f7165c3 | ||
|
|
6dfae1b014 | ||
|
|
40972cc6ec | ||
|
|
795830d94d | ||
|
|
039fcb80eb | ||
|
|
6a70c162bb | ||
|
|
0fd29dd32e | ||
|
|
bbeeb8a493 | ||
|
|
6c1619ba60 | ||
|
|
df34f6ef8e | ||
|
|
dc8166ec84 | ||
|
|
ef08977dbe | ||
|
|
9b2653aa2d | ||
|
|
adf0a84669 | ||
|
|
7163664725 | ||
|
|
2053fbecda | ||
|
|
6781051fe6 | ||
|
|
2357f46a4e | ||
|
|
8bd78eb139 | ||
|
|
f152e4054c | ||
|
|
62d31f79ed | ||
|
|
2ea1a59666 | ||
|
|
a95727b376 | ||
|
|
b35df3c945 | ||
|
|
421774e46c | ||
|
|
5b3e052f78 | ||
|
|
47fb2270bd | ||
|
|
f12fd7b4a3 | ||
|
|
40d627cb34 | ||
|
|
6e7fc6a0f7 | ||
|
|
104b100fe6 | ||
|
|
3a505abfc7 | ||
|
|
ecc3bad8c8 | ||
|
|
13fc36bad6 | ||
|
|
a766f007fc | ||
|
|
4fbeb0c3b1 | ||
|
|
de80e6d5bf | ||
|
|
92f7b72056 | ||
|
|
b22d591775 | ||
|
|
1ad0f95536 | ||
|
|
a71410042f | ||
|
|
815df3d667 | ||
|
|
27741863c5 | ||
|
|
1751a95909 | ||
|
|
c169e4af92 | ||
|
|
7d379dbe4b | ||
|
|
5f80043857 | ||
|
|
e9d1cf6eb5 | ||
|
|
d2470685cd | ||
|
|
a4db4ee782 | ||
|
|
9115e1175e | ||
|
|
56fd91f82b | ||
|
|
d62775a785 | ||
|
|
8b40d094ee | ||
|
|
91fae79be4 | ||
|
|
5aa3ebde9c | ||
|
|
bd737ef727 | ||
|
|
31e7ca9fa2 | ||
|
|
0eed8b4578 | ||
|
|
6b1e66ed26 | ||
|
|
da42032d92 | ||
|
|
143c005f0a | ||
|
|
ae96541112 | ||
|
|
f8725a0174 | ||
|
|
9c6264c4a0 | ||
|
|
10bc3919ca | ||
|
|
b5bc4701fa | ||
|
|
7552776349 | ||
|
|
8f40702369 | ||
|
|
9dc0598870 | ||
|
|
4f05b9c28d | ||
|
|
aa4f1f1dec | ||
|
|
14fbeda29e | ||
|
|
1c6f3f4877 | ||
|
|
2dcbe2b4f2 | ||
|
|
27384439f8 | ||
|
|
13adb61b3a | ||
|
|
77c10dafd6 | ||
|
|
4a8f9d1e36 | ||
|
|
0debdcdd9c | ||
|
|
ae30007fed | ||
|
|
aa183dc9e0 | ||
|
|
b1285cd07f | ||
|
|
79497d28d2 | ||
|
|
5eb20fd8cd | ||
|
|
01c9560a19 | ||
|
|
6cc403cd92 | ||
|
|
11c3cf5f71 | ||
|
|
448bd12e9f | ||
|
|
204a3275ac | ||
|
|
6665f9b4a0 | ||
|
|
ddb0aa4e74 | ||
|
|
aa8e486a45 | ||
|
|
619c4959ff | ||
|
|
1b2a06572b | ||
|
|
cc26321ab2 | ||
|
|
fb01f6d32a | ||
|
|
0fbd26a3c5 | ||
|
|
6f3fad5864 | ||
|
|
5f61952785 | ||
|
|
128b6853f4 | ||
|
|
bed3815df5 | ||
|
|
7c5816af82 | ||
|
|
15df1f7f26 | ||
|
|
065bc087d5 | ||
|
|
c53b5f3edb | ||
|
|
60cd5ce879 | ||
|
|
8bbda5715d | ||
|
|
92eb5ed367 | ||
|
|
70de4fd1fd | ||
|
|
c2c0c3684d | ||
|
|
38e3690f56 | ||
|
|
2048800c43 | ||
|
|
cc0f1ccfa7 | ||
|
|
d3e8966e65 | ||
|
|
e6f6a3ad81 | ||
|
|
160c0d75fe | ||
|
|
f2389ee672 | ||
|
|
0812643136 | ||
|
|
3e9a61a693 | ||
|
|
e3e59d76a9 | ||
|
|
65c26296bd | ||
|
|
9c4ed5f092 | ||
|
|
f0fa696d2f | ||
|
|
4d58faefd8 | ||
|
|
311ffc3dc9 | ||
|
|
d51c69d353 | ||
|
|
ee8a86d495 | ||
|
|
fa8c3d65dc | ||
|
|
b4e58a1a79 | ||
|
|
550434dfe8 | ||
|
|
fc44e57171 | ||
|
|
77f735c722 | ||
|
|
b736e209ca | ||
|
|
af2bc99c71 | ||
|
|
924b3b4cc3 | ||
|
|
b724745acc | ||
|
|
bbe25da117 | ||
|
|
77e361dd52 | ||
|
|
083d7327bc | ||
|
|
2fa217df56 | ||
|
|
6489848eff | ||
|
|
b8e40d799b | ||
|
|
205a7f1673 | ||
|
|
2e591b98e1 | ||
|
|
0b4a43d77a | ||
|
|
ce87ea54cd | ||
|
|
637e5c4fee | ||
|
|
ecca23488d | ||
|
|
2488411b94 | ||
|
|
3f822ed0e3 | ||
|
|
33af6cbfb1 | ||
|
|
326c972f63 | ||
|
|
11892ffe21 | ||
|
|
10cd654ff5 | ||
|
|
3e53decd85 | ||
|
|
4f0e75893e | ||
|
|
e61abb92d2 | ||
|
|
832f47d6b0 | ||
|
|
415dac3ae3 | ||
|
|
8b6f5b4a99 | ||
|
|
06010bd8ad | ||
|
|
85c99102dd | ||
|
|
d908701b59 | ||
|
|
db19303f1a | ||
|
|
2c22d4e774 | ||
|
|
5fe31e6333 | ||
|
|
e3085d9224 | ||
|
|
3dbc2e0382 | ||
|
|
baaa192967 | ||
|
|
2f05fc3824 | ||
|
|
955f41633a | ||
|
|
fd37324359 | ||
|
|
63ec0d7dcf | ||
|
|
91ca5f0213 | ||
|
|
f5b45fa0ba | ||
|
|
73376b30e2 | ||
|
|
3565548e91 | ||
|
|
6999bcfd4e | ||
|
|
2fe5d7c73f | ||
|
|
3a3bf19cf8 | ||
|
|
30e04b509d | ||
|
|
4279742de5 | ||
|
|
713c93a570 | ||
|
|
36584f0177 | ||
|
|
6b1c125b03 | ||
|
|
0f1ec17698 | ||
|
|
9103e83ce2 | ||
|
|
99709b53ed | ||
|
|
717b3b6494 | ||
|
|
ca665dc6bc | ||
|
|
67b17de695 | ||
|
|
8d5a0aea9f | ||
|
|
803d790b7a | ||
|
|
375bdc0586 | ||
|
|
9b7fd1c16b | ||
|
|
05437e2a56 |
16
.codeclimate.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
engines:
|
||||
rubocop:
|
||||
enabled: true
|
||||
exclude_fingerprints:
|
||||
- ac41db8d4ec4cbf508c353d9b65a024f
|
||||
- 8e3b6322aef5be9f38700b3fd0cd347e
|
||||
scss-lint:
|
||||
enabled: true
|
||||
ratings:
|
||||
paths:
|
||||
- app/**
|
||||
- lib/**
|
||||
- "**.rb"
|
||||
exclude_paths:
|
||||
- spec/**/*
|
||||
- vendor/**/*
|
||||
2
.gitignore
vendored
@@ -34,7 +34,9 @@ config/abr.yml
|
||||
config/heroku_env.rb
|
||||
config/newrelic.yml
|
||||
config/initializers/feature_toggle.rb
|
||||
config/initializers/db2fog.rb
|
||||
NERD_tree*
|
||||
coverage
|
||||
libpeerconnection.log
|
||||
/config/application.yml
|
||||
node_modules
|
||||
|
||||
29
.rubocop.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
AllCops:
|
||||
Include:
|
||||
- '**/Rakefile'
|
||||
- '**/config.ru'
|
||||
Exclude:
|
||||
- 'db/**/*'
|
||||
- 'config/**/*'
|
||||
- 'script/**/*'
|
||||
- 'spec/**/*'
|
||||
- !ruby/regexp /old_and_unused\.rb$/
|
||||
|
||||
Documentation:
|
||||
Enabled: false
|
||||
|
||||
Style/EmptyLinesAroundClassBody:
|
||||
Enabled: false
|
||||
|
||||
Style/BracesAroundHashParameters:
|
||||
Enabled: false
|
||||
|
||||
Metrics/LineLength:
|
||||
Enabled: false
|
||||
Max: 120
|
||||
|
||||
MethodLength:
|
||||
Enabled: false
|
||||
|
||||
StringLiterals:
|
||||
Enabled: false
|
||||
@@ -1 +1 @@
|
||||
1.9.3-p392
|
||||
2.1.5
|
||||
|
||||
3
.scss-lint.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
scss_files: 'app/assets/stylesheets/**/*.css.scss'
|
||||
|
||||
exclude: 'app/assets/stylesheets/shared/**'
|
||||
58
.travis.yml
@@ -1,15 +1,61 @@
|
||||
language: ruby
|
||||
sudo: false
|
||||
cache: bundler
|
||||
bundler_args: --without development
|
||||
rvm:
|
||||
- "1.9.3"
|
||||
services: postgresql
|
||||
before_install:
|
||||
- "2.1.5"
|
||||
|
||||
# Set the timezone for phantomjs with TZ
|
||||
# Set the timezone for karma with TIMEZONE
|
||||
#
|
||||
# The test cases are roughly split according to their test times.
|
||||
# It would be better to use https://github.com/ArturT/knapsack.
|
||||
env:
|
||||
global:
|
||||
- TZ="Australia/Melbourne"
|
||||
- TIMEZONE="Australia/Melbourne"
|
||||
- CI_NODE_TOTAL=5
|
||||
matrix:
|
||||
- CI_NODE_INDEX=0
|
||||
- CI_NODE_INDEX=1
|
||||
- CI_NODE_INDEX=2
|
||||
- CI_NODE_INDEX=3
|
||||
- CI_NODE_INDEX=4 KARMA="true" GITHUB_DEPLOY="true"
|
||||
|
||||
before_script:
|
||||
- cp config/database.travis.yml config/database.yml
|
||||
- psql -c 'create database open_food_network_test;' -U postgres
|
||||
- cp config/application.yml.example config/application.yml
|
||||
- RAILS_ENV=test bundle exec rake db:create db:schema:load
|
||||
|
||||
# Only install PhantomJS if it is not already present (ie. cached)
|
||||
- npm list -g phantomjs-prebuilt@~2.1.7 --depth=0 || npm install -g phantomjs-prebuilt@~2.1.7
|
||||
- export PATH=`npm bin -g`:$PATH
|
||||
|
||||
- >
|
||||
if [ "$KARMA" = "true" ]; then
|
||||
npm install -g npm@'3.8.8'
|
||||
npm install
|
||||
npm install -g karma-cli@0.1.2
|
||||
fi
|
||||
|
||||
script:
|
||||
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
||||
- bundle exec rake spec
|
||||
- 'if [ "$KARMA" = "true" ]; then bundle exec rake karma:run; else echo "Skipping karma run"; fi'
|
||||
#- "KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec"
|
||||
- "bundle exec rake 'knapsack:rspec[--tag ~performance]'"
|
||||
|
||||
after_success:
|
||||
- >
|
||||
if [ "$GITHUB_DEPLOY" = "true" -a "$TRAVIS_PULL_REQUEST" = "false" -a -n "$TRAVIS_BRANCH" -a -n "$GITHUB_API_SECRET" ]; then
|
||||
description="`git show "$TRAVIS_BRANCH" -s --oneline --no-color`"
|
||||
data="{
|
||||
\"ref\":\"$TRAVIS_BRANCH\",
|
||||
\"description\":\"$description\",
|
||||
\"environment\":\"staging\",
|
||||
\"required_contexts\":[]}"
|
||||
curl -u "$GITHUB_API_SECRET" -d "$data" "https://api.github.com/repos/$TRAVIS_REPO_SLUG/deployments"
|
||||
else
|
||||
echo "Not deploying on this build."
|
||||
fi
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
8
.tx/config
Normal file
@@ -0,0 +1,8 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[open-food-network.enyml]
|
||||
file_filter = config/locales/<lang>.yml
|
||||
source_lang = en
|
||||
type = YML
|
||||
|
||||
33
CONTRIBUTING.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Contributing
|
||||
|
||||
We love pull requests from everyone. Here are some instructions for
|
||||
contributing code to Open Food Network. See the [developer wiki](https://github.com/openfoodfoundation/openfoodnetwork/wiki) for more information.
|
||||
|
||||
Fork, then clone the repo:
|
||||
|
||||
git clone git@github.com:your-username/openfoodnetwork.git
|
||||
|
||||
Follow the instructions in README.markdown to set up your machine.
|
||||
|
||||
Make sure the tests pass:
|
||||
|
||||
rspec spec
|
||||
|
||||
Make your change. Add tests for your change. Make the tests pass:
|
||||
|
||||
rspec spec
|
||||
|
||||
Push to your fork and [submit a pull request][pr].
|
||||
|
||||
[pr]: https://github.com/openfoodfoundation/openfoodnetwork/compare/
|
||||
|
||||
At this point you're waiting on us. We may suggest some changes or
|
||||
improvements or alternatives.
|
||||
|
||||
To increase the chance that your pull request is swiftly accepted:
|
||||
|
||||
* Write tests
|
||||
* Use a style consistent with the rest of the codebase
|
||||
* Before submitting, [rebase your work][rebase] on the current master branch
|
||||
|
||||
[rebase]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough
|
||||
32
Gemfile
@@ -1,18 +1,22 @@
|
||||
source 'https://rubygems.org'
|
||||
ruby "1.9.3"
|
||||
ruby "2.1.5"
|
||||
|
||||
gem 'rails', '3.2.21'
|
||||
gem 'rails-i18n', '~> 3.0.0'
|
||||
gem 'i18n', '~> 0.6.11'
|
||||
|
||||
gem 'pg'
|
||||
gem 'spree', :github => 'openfoodfoundation/spree', :branch => '1-3-stable'
|
||||
gem 'spree_i18n', :github => 'spree/spree_i18n', :branch => '1-3-stable'
|
||||
gem 'spree_auth_devise', :github => 'spree/spree_auth_devise', :branch => '1-3-stable'
|
||||
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
|
||||
gem 'nokogiri', '>= 1.6.7.1'
|
||||
|
||||
# Waiting on merge of PR #117
|
||||
# https://github.com/spree-contrib/better_spree_paypal_express/pull/117
|
||||
gem 'spree_paypal_express', :github => "openfoodfoundation/better_spree_paypal_express", :branch => "1-3-stable"
|
||||
gem 'pg'
|
||||
gem 'spree', github: 'openfoodfoundation/spree', branch: '1-3-stable'
|
||||
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '1-3-stable'
|
||||
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '1-3-stable'
|
||||
|
||||
# Our branch contains two changes
|
||||
# - Pass customer email and phone number to PayPal (merged to upstream master)
|
||||
# - Change type of password from string to password to hide it in the form
|
||||
gem 'spree_paypal_express', :github => "openfoodfoundation/better_spree_paypal_express", :branch => "hide-password"
|
||||
#gem 'spree_paypal_express', :github => "spree-contrib/better_spree_paypal_express", :branch => "1-3-stable"
|
||||
|
||||
gem 'delayed_job_active_record'
|
||||
@@ -24,7 +28,7 @@ gem 'comfortable_mexican_sofa'
|
||||
gem 'simple_form', :github => 'RohanM/simple_form'
|
||||
|
||||
gem 'unicorn'
|
||||
gem 'angularjs-rails', '1.2.13'
|
||||
gem 'angularjs-rails', '1.5.5'
|
||||
gem 'bugsnag'
|
||||
gem 'newrelic_rpm'
|
||||
gem 'haml'
|
||||
@@ -52,6 +56,11 @@ gem 'roadie-rails', '~> 1.0.3'
|
||||
gem 'figaro'
|
||||
gem 'blockenspiel'
|
||||
gem 'acts-as-taggable-on', '~> 3.4'
|
||||
gem 'paper_trail', '~> 3.0.8'
|
||||
gem 'diffy'
|
||||
|
||||
gem 'wicked_pdf'
|
||||
gem 'wkhtmltopdf-binary'
|
||||
|
||||
gem 'foreigner'
|
||||
gem 'immigrant'
|
||||
@@ -91,7 +100,6 @@ group :test, :development do
|
||||
gem 'factory_girl_rails', :require => false
|
||||
gem 'capybara'
|
||||
gem 'database_cleaner', '0.7.1', :require => false
|
||||
gem 'simplecov', :require => false
|
||||
gem 'awesome_print'
|
||||
gem 'letter_opener'
|
||||
gem 'timecop'
|
||||
@@ -99,6 +107,8 @@ group :test, :development do
|
||||
gem 'rspec-retry'
|
||||
gem 'json_spec'
|
||||
gem 'unicorn-rails'
|
||||
gem 'atomic'
|
||||
gem 'knapsack'
|
||||
end
|
||||
|
||||
group :test do
|
||||
@@ -109,7 +119,7 @@ group :test do
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'pry-debugger'
|
||||
gem 'pry-byebug'
|
||||
gem 'debugger-linecache'
|
||||
gem 'guard'
|
||||
gem 'guard-livereload'
|
||||
|
||||
220
Gemfile.lock
@@ -14,8 +14,8 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: git://github.com/openfoodfoundation/better_spree_paypal_express.git
|
||||
revision: cdd61161ccd27cd8d183f9321422c7be113796b8
|
||||
branch: 1-3-stable
|
||||
revision: 840d973cd5bd3250b17674a624dad494aeb09eb3
|
||||
branch: hide-password
|
||||
specs:
|
||||
spree_paypal_express (2.0.3)
|
||||
paypal-sdk-merchant (= 1.106.1)
|
||||
@@ -23,7 +23,7 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: git://github.com/openfoodfoundation/spree.git
|
||||
revision: afcc23e489eb604a3e2651598a7c8364e2acc7b3
|
||||
revision: 6e3edfe40a5de8eba0095b2c5f3db9ea54c3afda
|
||||
branch: 1-3-stable
|
||||
specs:
|
||||
spree (1.3.6.beta)
|
||||
@@ -54,7 +54,7 @@ GIT
|
||||
rabl (= 0.7.2)
|
||||
rails (~> 3.2.16)
|
||||
ransack (= 0.7.2)
|
||||
select2-rails (= 3.2.1)
|
||||
select2-rails (= 3.5.9.3)
|
||||
state_machine (= 1.1.2)
|
||||
stringex (~> 1.3.2)
|
||||
truncate_html (~> 0.5.5)
|
||||
@@ -107,6 +107,7 @@ GIT
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (2.3.2)
|
||||
actionmailer (3.2.21)
|
||||
actionpack (= 3.2.21)
|
||||
mail (~> 2.5.4)
|
||||
@@ -121,10 +122,10 @@ GEM
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.2.1)
|
||||
active_link_to (1.0.0)
|
||||
active_model_serializers (0.8.1)
|
||||
active_model_serializers (0.8.3)
|
||||
activemodel (>= 3.0)
|
||||
activemerchant (1.48.0)
|
||||
activesupport (>= 3.2.14, < 5.0.0)
|
||||
activemerchant (1.57.0)
|
||||
activesupport (>= 3.2.14, < 5.1)
|
||||
builder (>= 2.1.2, < 4.0.0)
|
||||
i18n (>= 0.6.9)
|
||||
nokogiri (~> 1.4)
|
||||
@@ -152,9 +153,10 @@ GEM
|
||||
sprockets (~> 2)
|
||||
tilt
|
||||
angularjs-file-upload-rails (1.1.0)
|
||||
angularjs-rails (1.2.13)
|
||||
angularjs-rails (1.5.5)
|
||||
ansi (1.4.2)
|
||||
arel (3.0.3)
|
||||
atomic (1.1.99)
|
||||
awesome_nested_set (2.1.5)
|
||||
activerecord (>= 3.0.0)
|
||||
awesome_print (1.0.2)
|
||||
@@ -170,8 +172,12 @@ GEM
|
||||
httparty (>= 0.6, < 1.0)
|
||||
multi_json (~> 1.0)
|
||||
builder (3.0.4)
|
||||
byebug (2.7.0)
|
||||
columnize (~> 0.3)
|
||||
debugger-linecache (~> 1.2)
|
||||
cancan (1.6.8)
|
||||
capybara (2.2.1)
|
||||
capybara (2.7.1)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
@@ -190,12 +196,12 @@ GEM
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (~> 3.2.0)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.3.3)
|
||||
coffee-script-source (1.10.0)
|
||||
colorize (0.7.7)
|
||||
columnize (0.3.6)
|
||||
columnize (0.9.0)
|
||||
comfortable_mexican_sofa (1.6.24)
|
||||
active_link_to (~> 1.0.0)
|
||||
paperclip (>= 2.3.0)
|
||||
@@ -229,12 +235,7 @@ GEM
|
||||
activerecord (~> 3.0)
|
||||
fog (~> 1.0)
|
||||
rails (~> 3.0)
|
||||
debugger (1.6.1)
|
||||
columnize (>= 0.3.1)
|
||||
debugger-linecache (~> 1.2.0)
|
||||
debugger-ruby_core_source (~> 1.2.3)
|
||||
debugger-linecache (1.2.0)
|
||||
debugger-ruby_core_source (1.2.3)
|
||||
delayed_job (4.0.4)
|
||||
activesupport (>= 3.0, < 4.2)
|
||||
delayed_job_active_record (4.0.2)
|
||||
@@ -248,13 +249,14 @@ GEM
|
||||
devise-encryptable (0.1.2)
|
||||
devise (>= 2.1.0)
|
||||
diff-lcs (1.2.4)
|
||||
diffy (3.1.0)
|
||||
em-websocket (0.5.0)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.5.3)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.0.3)
|
||||
excon (0.25.3)
|
||||
execjs (2.5.2)
|
||||
eventmachine (1.0.8)
|
||||
excon (0.45.4)
|
||||
execjs (2.6.0)
|
||||
factory_girl (3.3.0)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_girl_rails (3.3.0)
|
||||
@@ -265,19 +267,117 @@ GEM
|
||||
figaro (0.7.0)
|
||||
bundler (~> 1.0)
|
||||
rails (>= 3, < 5)
|
||||
fog (1.14.0)
|
||||
fission (0.5.0)
|
||||
CFPropertyList (~> 2.2)
|
||||
fog (1.36.0)
|
||||
fog-aliyun (>= 0.1.0)
|
||||
fog-atmos
|
||||
fog-aws (>= 0.6.0)
|
||||
fog-brightbox (~> 0.4)
|
||||
fog-core (~> 1.32)
|
||||
fog-dynect (~> 0.0.2)
|
||||
fog-ecloud (~> 0.1)
|
||||
fog-google (<= 0.1.0)
|
||||
fog-json
|
||||
fog-local
|
||||
fog-powerdns (>= 0.1.1)
|
||||
fog-profitbricks
|
||||
fog-radosgw (>= 0.0.2)
|
||||
fog-riakcs
|
||||
fog-sakuracloud (>= 0.0.4)
|
||||
fog-serverlove
|
||||
fog-softlayer
|
||||
fog-storm_on_demand
|
||||
fog-terremark
|
||||
fog-vmfusion
|
||||
fog-voxel
|
||||
fog-xenserver
|
||||
fog-xml (~> 0.1.1)
|
||||
ipaddress (~> 0.5)
|
||||
nokogiri (~> 1.5, >= 1.5.11)
|
||||
fog-aliyun (0.1.0)
|
||||
fog-core (~> 1.27)
|
||||
fog-json (~> 1.0)
|
||||
ipaddress (~> 0.8)
|
||||
xml-simple (~> 1.1)
|
||||
fog-atmos (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-aws (0.7.6)
|
||||
fog-core (~> 1.27)
|
||||
fog-json (~> 1.0)
|
||||
fog-xml (~> 0.1)
|
||||
ipaddress (~> 0.8)
|
||||
fog-brightbox (0.9.0)
|
||||
fog-core (~> 1.22)
|
||||
fog-json
|
||||
inflecto (~> 0.0.2)
|
||||
fog-core (1.35.0)
|
||||
builder
|
||||
excon (~> 0.25.0)
|
||||
formatador (~> 0.2.0)
|
||||
mime-types
|
||||
multi_json (~> 1.0)
|
||||
net-scp (~> 1.1)
|
||||
net-ssh (>= 2.1.3)
|
||||
nokogiri (~> 1.5)
|
||||
ruby-hmac
|
||||
excon (~> 0.45)
|
||||
formatador (~> 0.2)
|
||||
fog-dynect (0.0.2)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-ecloud (0.3.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-google (0.1.0)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-json (1.0.2)
|
||||
fog-core (~> 1.0)
|
||||
multi_json (~> 1.10)
|
||||
fog-local (0.2.1)
|
||||
fog-core (~> 1.27)
|
||||
fog-powerdns (0.1.1)
|
||||
fog-core (~> 1.27)
|
||||
fog-json (~> 1.0)
|
||||
fog-xml (~> 0.1)
|
||||
fog-profitbricks (0.0.5)
|
||||
fog-core
|
||||
fog-xml
|
||||
nokogiri
|
||||
fog-radosgw (0.0.4)
|
||||
fog-core (>= 1.21.0)
|
||||
fog-json
|
||||
fog-xml (>= 0.0.1)
|
||||
fog-riakcs (0.1.0)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-sakuracloud (1.4.0)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-serverlove (0.1.2)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-softlayer (1.0.2)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-storm_on_demand (0.1.1)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-terremark (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-vmfusion (0.1.0)
|
||||
fission
|
||||
fog-core
|
||||
fog-voxel (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-xenserver (0.2.2)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-xml (0.1.2)
|
||||
fog-core
|
||||
nokogiri (~> 1.5, >= 1.5.11)
|
||||
foreigner (1.6.1)
|
||||
activerecord (>= 3.0.0)
|
||||
formatador (0.2.4)
|
||||
formatador (0.2.5)
|
||||
foundation-icons-sass-rails (3.0.0)
|
||||
railties (>= 3.1.1)
|
||||
sass-rails (>= 3.1.1)
|
||||
@@ -319,6 +419,8 @@ GEM
|
||||
immigrant (0.1.6)
|
||||
activerecord (>= 3.0)
|
||||
foreigner (>= 1.2.1)
|
||||
inflecto (0.0.2)
|
||||
ipaddress (0.8.0)
|
||||
journey (1.0.4)
|
||||
jquery-rails (2.2.2)
|
||||
railties (>= 3.0, < 5.0)
|
||||
@@ -331,11 +433,14 @@ GEM
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
kgio (2.9.3)
|
||||
knapsack (1.5.1)
|
||||
rake
|
||||
timecop (>= 0.1.0)
|
||||
launchy (2.1.2)
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.0.0)
|
||||
launchy (>= 2.0.4)
|
||||
libv8 (3.16.14.3)
|
||||
libv8 (3.16.14.11)
|
||||
listen (2.2.0)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
@@ -346,21 +451,21 @@ GEM
|
||||
treetop (~> 1.4.8)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mini_portile (0.6.2)
|
||||
mini_portile2 (2.0.0)
|
||||
momentjs-rails (2.5.1)
|
||||
railties (>= 3.1)
|
||||
money (5.1.1)
|
||||
i18n (~> 0.6.0)
|
||||
multi_json (1.11.0)
|
||||
multi_json (1.12.0)
|
||||
multi_xml (0.5.5)
|
||||
net-scp (1.1.2)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.6.8)
|
||||
newrelic_rpm (3.12.0.288)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
nokogiri (1.6.7.2)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
oj (2.1.2)
|
||||
orm_adapter (0.5.0)
|
||||
paper_trail (3.0.8)
|
||||
activerecord (>= 3.0, < 5.0)
|
||||
activesupport (>= 3.0, < 5.0)
|
||||
paperclip (3.5.4)
|
||||
activemodel (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
@@ -375,7 +480,7 @@ GEM
|
||||
paypal-sdk-merchant (1.106.1)
|
||||
paypal-sdk-core (~> 0.2.3)
|
||||
pg (0.13.2)
|
||||
poltergeist (1.5.0)
|
||||
poltergeist (1.9.0)
|
||||
capybara (~> 2.1)
|
||||
cliver (~> 0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
@@ -387,13 +492,13 @@ GEM
|
||||
coderay (~> 1.0.5)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
pry-debugger (0.2.2)
|
||||
debugger (~> 1.3)
|
||||
pry (~> 0.9.10)
|
||||
pry-byebug (1.3.2)
|
||||
byebug (~> 2.7)
|
||||
pry (~> 0.9.12)
|
||||
rabl (0.7.2)
|
||||
activesupport (>= 2.3.14)
|
||||
multi_json (~> 1.0)
|
||||
rack (1.4.5)
|
||||
rack (1.4.7)
|
||||
rack-cache (1.2)
|
||||
rack (>= 0.4)
|
||||
rack-livereload (0.3.15)
|
||||
@@ -464,7 +569,6 @@ GEM
|
||||
rspec-mocks (~> 2.14.0)
|
||||
rspec-retry (0.4.2)
|
||||
rspec-core
|
||||
ruby-hmac (0.4.0)
|
||||
ruby-progressbar (1.7.1)
|
||||
safe_yaml (0.9.5)
|
||||
sass (3.3.14)
|
||||
@@ -472,14 +576,10 @@ GEM
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
select2-rails (3.2.1)
|
||||
select2-rails (3.5.9.3)
|
||||
thor (~> 0.14)
|
||||
shoulda-matchers (1.1.0)
|
||||
activesupport (>= 3.0.0)
|
||||
simplecov (0.7.1)
|
||||
multi_json (~> 1.0)
|
||||
simplecov-html (~> 0.7.1)
|
||||
simplecov-html (0.7.1)
|
||||
slop (3.4.5)
|
||||
spinjs-rails (1.3)
|
||||
rails (>= 3.1)
|
||||
@@ -527,10 +627,15 @@ GEM
|
||||
webmock (1.13.0)
|
||||
addressable (>= 2.2.7)
|
||||
crack (>= 0.3.2)
|
||||
websocket-driver (0.3.2)
|
||||
websocket-driver (0.6.3)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
whenever (0.9.2)
|
||||
activesupport (>= 2.3.4)
|
||||
chronic (>= 0.6.3)
|
||||
wicked_pdf (0.11.0)
|
||||
rails
|
||||
wkhtmltopdf-binary (0.9.9.3)
|
||||
xml-simple (1.1.4)
|
||||
xpath (2.0.0)
|
||||
nokogiri (~> 1.3)
|
||||
@@ -546,7 +651,8 @@ DEPENDENCIES
|
||||
andand
|
||||
angular-rails-templates (~> 0.2.0)
|
||||
angularjs-file-upload-rails (~> 1.1.0)
|
||||
angularjs-rails (= 1.2.13)
|
||||
angularjs-rails (= 1.5.5)
|
||||
atomic
|
||||
awesome_print
|
||||
aws-sdk
|
||||
blockenspiel
|
||||
@@ -564,6 +670,7 @@ DEPENDENCIES
|
||||
debugger-linecache
|
||||
deface!
|
||||
delayed_job_active_record
|
||||
diffy
|
||||
factory_girl_rails
|
||||
figaro
|
||||
foreigner
|
||||
@@ -583,15 +690,18 @@ DEPENDENCIES
|
||||
immigrant
|
||||
jquery-rails
|
||||
json_spec
|
||||
knapsack
|
||||
letter_opener
|
||||
momentjs-rails
|
||||
newrelic_rpm
|
||||
nokogiri (>= 1.6.7.1)
|
||||
oj
|
||||
paper_trail (~> 3.0.8)
|
||||
paperclip
|
||||
parallel_tests
|
||||
pg
|
||||
poltergeist
|
||||
pry-debugger
|
||||
pry-byebug
|
||||
rabl
|
||||
rack-livereload
|
||||
rack-ssl
|
||||
@@ -606,7 +716,6 @@ DEPENDENCIES
|
||||
sass-rails (~> 3.2.3)
|
||||
shoulda-matchers
|
||||
simple_form!
|
||||
simplecov
|
||||
spinjs-rails
|
||||
spree!
|
||||
spree_auth_devise!
|
||||
@@ -622,3 +731,8 @@ DEPENDENCIES
|
||||
unicorn-rails
|
||||
webmock
|
||||
whenever
|
||||
wicked_pdf
|
||||
wkhtmltopdf-binary
|
||||
|
||||
BUNDLED WITH
|
||||
1.11.2
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
[](https://travis-ci.org/openfoodfoundation/openfoodnetwork)
|
||||
[](https://codeclimate.com/github/openfoodfoundation/openfoodnetwork)
|
||||
|
||||
# Open Food Network
|
||||
@@ -14,19 +15,21 @@ We're part of global movement - get involved!
|
||||
|
||||
## Getting started
|
||||
|
||||
Below are instructions for setting up a development environment for Open Food Network. If you're interested in provisioning a server, see [the project's Ansible playbooks](https://github.com/openfoodfoundation/ofn_deployment).
|
||||
Below are instructions for setting up a development environment for Open Food Network. More information is in the [developer wiki](https://github.com/openfoodfoundation/openfoodnetwork/wiki).
|
||||
|
||||
If you're interested in provisioning a server, see [the project's Ansible playbooks](https://github.com/openfoodfoundation/ofn_deployment).
|
||||
|
||||
|
||||
## Dependencies
|
||||
### Dependencies
|
||||
|
||||
* Rails 3.2.x
|
||||
* Ruby 1.9.3
|
||||
* Ruby 2.1.5
|
||||
* PostgreSQL database
|
||||
* PhantomJS (for testing)
|
||||
* See Gemfile for a list of gems required
|
||||
|
||||
|
||||
## Get it
|
||||
### Get it
|
||||
|
||||
The source code is managed with Git (a version control system) and
|
||||
hosted at GitHub.
|
||||
@@ -40,11 +43,11 @@ You can download the source with the command:
|
||||
git clone https://github.com/openfoodfoundation/openfoodnetwork.git
|
||||
|
||||
|
||||
## Get it running
|
||||
### Get it running
|
||||
|
||||
For those new to Rails, the following tutorial will help get you up to speed with configuring a Rails environment: http://guides.rubyonrails.org/getting_started.html .
|
||||
|
||||
First, check your dependencies: Ensure that you have Ruby >= 1.9.3 installed:
|
||||
First, check your dependencies: Ensure that you have Ruby 2.1.5 installed:
|
||||
|
||||
ruby --version
|
||||
|
||||
@@ -58,6 +61,15 @@ Configure the site:
|
||||
cp config/application.yml.example config/application.yml
|
||||
edit config/application.yml
|
||||
|
||||
Create a PostgreSQL user:
|
||||
|
||||
* Login as your system postrgresql priviledged user: `sudo -i -u postgres` (this may vary on your OS). Now your prompt looks like: `[postgres@your_host ~]$`
|
||||
* Create the `ofn` database superuser and give it the password `f00d`:
|
||||
|
||||
```
|
||||
createuser -s -P ofn
|
||||
```
|
||||
|
||||
Create the development and test databases, using the settings specified in `config/database.yml`, and populate them with a schema and seed data:
|
||||
|
||||
rake db:setup
|
||||
@@ -71,7 +83,7 @@ At long last, your dreams of spinning up a development server can be realised:
|
||||
rails server
|
||||
|
||||
|
||||
## Testing
|
||||
### Testing
|
||||
|
||||
Tests, both unit and integration, are based on RSpec. To run the test suite, first prepare the test database:
|
||||
|
||||
@@ -97,6 +109,10 @@ usage instructions.
|
||||
* Will Marshall (http://soundcloud.com/willmarshall)
|
||||
* Laura Summers (https://github.com/summerscope)
|
||||
* Maikel Linke (https://github.com/mkllnk)
|
||||
* Lynne Davis (https://github.com/lin-d-hop)
|
||||
* Paul Mackay (https://github.com/pmackay)
|
||||
* Steve Petitt (https://github.com/stveep)
|
||||
|
||||
|
||||
## Licence
|
||||
|
||||
2
Rakefile
@@ -5,3 +5,5 @@
|
||||
require File.expand_path('../config/application', __FILE__)
|
||||
|
||||
Openfoodnetwork::Application.load_tasks
|
||||
|
||||
Knapsack.load_tasks if defined?(Knapsack)
|
||||
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 1003 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 570 KiB |
|
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 784 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 840 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
app/assets/images/ofn-logo-footer.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
80
app/assets/images/ofn-logo-mobile.svg
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 300 104"
|
||||
enable-background="new 0 0 300 104"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="logo-black.svg"
|
||||
width="100%"
|
||||
height="100%">
|
||||
<metadata
|
||||
id="metadata24">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs22" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="741"
|
||||
id="namedview20"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.8101934"
|
||||
inkscape:cx="126.57728"
|
||||
inkscape:cy="62.030566"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g4" />
|
||||
<g
|
||||
id="g4"
|
||||
fill="#fff">
|
||||
<path
|
||||
d="M142.7 15.6c.4 3.2.4 7.5 0 10.7-.5 4.6-3.8 8.4-9.1 8.4s-8.5-3.8-9.1-8.4c-.4-3.2-.4-7.5 0-10.7.5-4.6 3.8-8.4 9.1-8.4s8.6 3.8 9.1 8.4m-5.3 10.7c.4-3.2.4-7.5 0-10.7-.2-1.7-1.4-3-3.7-3-2.3 0-3.5 1.4-3.7 3-.4 3.2-.4 7.5 0 10.7.2 1.7 1.4 3 3.7 3 2.3 0 3.5-1.3 3.7-3"
|
||||
id="path6"
|
||||
style="fill:#000000" />
|
||||
<path
|
||||
d="M156.4 7.6c4.4 0 8 3.6 8 8s-3.6 8-8 8H153c-.2 0-.4.2-.4.4v9.5c0 .4-.3.8-.8.8H148c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h8.4zm-3.5 5.3c-.2 0-.4.2-.4.4v4.6c0 .2.2.4.4.4h3.4c1.4 0 2.7-1.2 2.7-2.7 0-1.4-1.2-2.7-2.7-2.7h-3.4zM172.9 28.6c0 .2.2.4.4.4h9c.4 0 .8.3.8.8v3.8c0 .4-.3.8-.8.8h-14c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h13.8c.4 0 .8.3.8.8v3.8c0 .4-.3.8-.8.8h-8.9c-.2 0-.4.2-.4.4V18c0 .2.2.4.4.4h8.6c.4 0 .8.3.8.8V23c0 .4-.3.8-.8.8h-8.6c-.2 0-.4.2-.4.4v4.4zM199.4 34.3c-.6 0-.9-.3-1-.6l-5.2-13.4c-.1-.2-.3-.2-.3.1v13.2c0 .4-.3.8-.8.8h-3.8c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h4.5c.6 0 .8.3 1 .7l5.2 14.5c.1.2.3.2.3-.1V8.4c0-.4.3-.8.8-.8h3.8c.4 0 .8.3.8.8v25.1c0 .4-.3.8-.8.8h-4.5zM224.4 24v9.5c0 .4-.3.8-.8.8h-3.8c-.4 0-.8-.3-.8-.8V8.4c0-.4.3-.8.8-.8h13.3c.4 0 .8.3.8.8v3.8c0 .4-.3.8-.8.8h-8.4c-.2 0-.4.2-.4.4V18c0 .2.2.4.4.4h8c.4 0 .8.3.8.8V23c0 .4-.3.8-.8.8h-8c-.1-.2-.3 0-.3.2M255.6 15.6c.4 3.2.4 7.5 0 10.7-.5 4.6-3.8 8.4-9.1 8.4s-8.5-3.8-9.1-8.4c-.4-3.2-.4-7.5 0-10.7.5-4.6 3.8-8.4 9.1-8.4s8.6 3.8 9.1 8.4m-5.3 10.7c.4-3.2.4-7.5 0-10.7-.2-1.7-1.4-3-3.7-3-2.3 0-3.5 1.4-3.7 3-.4 3.2-.4 7.5 0 10.7.2 1.7 1.4 3 3.7 3 2.3 0 3.5-1.3 3.7-3M278 15.6c.4 3.2.4 7.5 0 10.7-.5 4.6-3.8 8.4-9.1 8.4s-8.5-3.8-9.1-8.4c-.4-3.2-.4-7.5 0-10.7.5-4.6 3.8-8.4 9.1-8.4s8.5 3.8 9.1 8.4m-5.4 10.7c.4-3.2.4-7.5 0-10.7-.2-1.7-1.4-3-3.7-3-2.3 0-3.5 1.4-3.7 3-.4 3.2-.4 7.5 0 10.7.2 1.7 1.4 3 3.7 3 2.3 0 3.5-1.3 3.7-3"
|
||||
id="path8"
|
||||
style="fill:#000000" />
|
||||
<path
|
||||
d="M291.2 7.6c4.7 0 8 3.8 8.5 8.4.4 3.2.4 6.6 0 9.8-.5 4.6-3.8 8.4-8.5 8.4h-8c-.4 0-.8-.3-.8-.8v-25c0-.4.3-.8.8-.8h8zm-3 5.3c-.2 0-.4.2-.4.4v15.2c0 .2.2.4.4.4h3c1.8 0 2.9-1.4 3.1-3.1.4-3.2.4-6.6 0-9.8-.2-1.7-1.4-3.1-3.1-3.1h-3zM137.5 67.9c-.4 0-.6-.1-.8-.6l-9.1-20.8c-.1-.1-.3-.1-.3.1v20.6c0 .4-.3.7-.8.7h-.8c-.4 0-.8-.3-.8-.7V43.3c0-.4.3-.7.8-.7h2c.4 0 .6.1.8.6l9.1 20.6c.1.1.3.1.3-.1V43.3c0-.4.3-.7.8-.7h.8c.4 0 .8.3.8.7v23.9c0 .4-.3.7-.8.7h-2zM146.7 65.3c0 .2.2.4.4.4h9.9c.4 0 .8.3.8.7v.9c0 .4-.3.7-.8.7h-12c-.4 0-.8-.3-.8-.7v-24c0-.4.3-.7.8-.7h12c.4 0 .8.3.8.7v.9c0 .4-.3.7-.8.7h-9.9c-.2 0-.4.1-.4.4v8.2c0 .2.2.4.4.4h9.4c.4 0 .8.3.8.7v.8c0 .4-.3.7-.8.7h-9.4c-.2 0-.4.1-.4.4v8.8zM170 45.3v21.9c0 .4-.3.7-.8.7h-1c-.4 0-.8-.3-.8-.7V45.3c0-.2-.2-.4-.4-.4h-5.6c-.4 0-.8-.3-.8-.7v-.9c0-.4.3-.7.8-.7H176c.4 0 .8.3.8.7v.9c0 .4-.3.7-.8.7h-5.6c-.2 0-.4.2-.4.4M187 67.9h-2.1c-.3 0-.6-.2-.7-.5L179 43.3c-.1-.4.2-.7.8-.7h.9c.3 0 .6.1.7.5l4.3 20.7c0 .1.1.2.2.2h.1c.1 0 .2-.1.2-.2l4-20.7c.1-.4.4-.5.7-.5h1.3c.3 0 .6.2.7.5l4.3 20.7c0 .1.1.2.2.2h.1c.1 0 .2-.1.2-.2l4.6-20.7c.1-.4.4-.5.7-.5h.9c.6 0 .8.4.8.7l-5.5 24.1c-.1.4-.4.5-.7.5h-2.1c-.3 0-.6-.2-.7-.5l-4-19.3c0-.2-.3-.2-.3 0l-3.8 19.3c0 .4-.3.5-.6.5M223.9 49.8c.4 2.9.4 7.9 0 10.9-.6 4.7-3.9 7.5-8.5 7.5s-7.8-2.9-8.5-7.5c-.4-2.9-.4-8 0-10.9.6-3.9 3.5-7.5 8.5-7.5s7.9 3.6 8.5 7.5m-2.6 10.9c.5-3 .5-7.9 0-10.9-.4-2.6-2.3-5.2-5.9-5.2-3.6 0-5.5 2.6-5.9 5.2-.5 3-.5 7.9 0 10.9.3 2.1 1.8 5.2 5.9 5.2 4.1 0 5.6-3.1 5.9-5.2"
|
||||
id="path10"
|
||||
style="fill:#000000" />
|
||||
<path
|
||||
d="m 230.9,57.8 c -0.2,0 -0.4,0.1 -0.4,0.4 l 0,9 c 0,0.4 -0.3,0.7 -0.8,0.7 l -0.9,0 c -0.4,0 -0.8,-0.3 -0.8,-0.7 l 0,-23.9 c 0,-0.4 0.3,-0.7 0.8,-0.7 l 6.5,0 c 4.4,0 8,3.4 8,7.6 0,3.3 -1.8,5.2 -4.5,6.9 -0.5,0.3 -0.6,0.6 -0.3,1.2 l 4.8,8.6 c 0.3,0.5 0,1.1 -0.7,1.1 l -0.8,0 c -0.6,0 -0.9,-0.3 -1.1,-0.7 l -4.9,-9 c -0.1,-0.2 -0.3,-0.4 -0.7,-0.4 l -4.2,0 z m 0,-12.9 c -0.2,0 -0.4,0.1 -0.4,0.4 l 0,9.8 c 0,0.2 0.2,0.4 0.4,0.4 l 4.4,0 c 3,0 5.6,-2.4 5.6,-5.3 0,-2.9 -2.5,-5.3 -5.6,-5.3 z m 18.4,12.2 C 249.2,57 249,57 249,57.2 l 0,10 c 0,0.4 -0.3,0.7 -0.8,0.7 l -0.9,0 c -0.4,0 -0.8,-0.3 -0.8,-0.7 l 0,-23.9 c 0,-0.4 0.3,-0.7 0.8,-0.7 l 0.9,0 c 0.4,0 0.8,0.3 0.8,0.7 l 0,9.6 c 0,0.2 0.2,0.2 0.3,0.1 l 8.8,-10 c 0.1,-0.1 0.4,-0.4 1,-0.4 l 0.6,0 c 0.9,0 1.1,0.8 0.6,1.3 l -9.4,10.5 c -0.2,0.3 -0.3,0.5 0,0.9 L 261,66.6 c 0.4,0.5 0.3,1.3 -0.7,1.3 l -0.8,0 c -0.6,0 -0.8,-0.3 -1,-0.5 z"
|
||||
id="path12"
|
||||
style="fill:#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cssssssssscccssccsccsssssssscssssssssssccssccccsscc" />
|
||||
<path
|
||||
d="m 3,44.3 0.5,0 c 1.2,0 2.2,-0.9 2.4,-2 0.5,-2.4 1.1,-4.7 2,-7 6.6,-18.2 23.5,-30.4 42,-30.4 18.5,0 35.4,12.2 42,30.3 0.8,2.2 1.5,4.6 2,6.9 0.3,1.3 1.6,2.2 2.9,1.9 1.3,-0.3 2.2,-1.6 1.9,-2.9 C 98.2,38.5 97.4,36 96.5,33.5 89.2,13.5 70.5,0 49.9,0 29.3,0 10.6,13.5 3.3,33.6 2.4,36.1 1.7,38.7 1.1,41.3 l 0,0.2 L 3.5,42 1.1,41.5 C 0.8,42.8 1.7,44.1 3,44.3 M 99.8,53 C 99.9,52 99.4,51 98.4,50.5 95,48.9 90.7,47.4 85.9,46.3 84.4,45.9 82.8,45.6 81.2,45.3 77.9,44.7 74.3,44.1 70.5,43.7 69.8,36.3 66.6,30.9 61,27.1 54.7,22.9 46.9,22.7 40.1,26.5 33.5,30.1 29.3,36.6 29,43.8 17.9,45.2 8.2,47.6 1.4,50.9 1.3,50.9 1.3,51 1.2,51 1.1,51 1.1,51.1 1,51.1 l -0.1,0.1 c -0.1,0.1 -0.2,0.1 -0.2,0.2 -0.4,0.4 -0.6,1 -0.6,1.6 0,1.4 0.1,2.7 0.2,4.1 0,0.4 0.1,0.7 0.1,1.1 0.3,2.6 0.8,5.2 1.5,7.7 0.2,0.7 0.3,1.4 0.5,2 0.3,0.9 0.6,1.7 0.9,2.6 0.7,1.8 1.4,3.6 2.2,5.2 0.8,1.6 1.7,3.1 2.6,4.6 0.7,1.2 1.5,2.3 2.4,3.5 1,1.3 2,2.6 3.2,3.8 1.5,1.7 3.1,3.2 4.8,4.6 1.4,1.2 2.9,2.3 4.4,3.3 1.9,1.3 3.8,2.4 5.9,3.4 2,0.9 4,1.8 6.1,2.4 2.1,0.7 4.3,1.2 6.5,1.6 2.8,0.5 5.7,0.8 8.7,0.8 l 0.1,0 c 13.6,0 26.5,-5.9 35.8,-15.9 1.8,-1.9 3.4,-3.9 4.9,-6.1 0.2,-0.2 0.3,-0.5 0.5,-0.7 1.5,-2.4 2.9,-4.8 4,-7.4 0.9,-2 1.6,-4 2.2,-6 1.3,-4.5 2.1,-9.5 2.2,-14.6 0,0.1 0,0.1 0,0 M 85.7,51.3 c 3.3,0.8 6.3,1.8 8.9,2.9 -3.4,1.6 -6.7,2.9 -9.9,4.1 -1.9,0.7 -3.7,1.2 -5.5,1.7 -3.5,1 -7.1,1.6 -10.7,2 1.3,-4.4 2,-8.8 2.2,-13.4 3.6,0.4 7,1 10.2,1.6 1.7,0.4 3.3,0.7 4.8,1.1 m -13,23.1 C 69.5,74.8 66.2,75 63,75 c 1.5,-2.5 2.7,-5.2 3.8,-7.8 3.6,-0.2 7,-0.7 10.4,-1.5 -1.3,2.9 -2.8,5.8 -4.5,8.7 m -9.8,12.5 c -2.8,0 -5.6,-0.1 -8.4,-0.5 1.9,-2.1 3.7,-4.3 5.4,-6.5 1.2,0.1 2.5,0.1 3.7,0.1 1.8,0 3.7,-0.1 5.5,-0.2 -1.9,2.4 -4,4.8 -6.2,7.1 M 40.2,82.4 c 1.6,-1.7 3,-3.4 4.4,-5.2 3.2,0.9 6.4,1.6 9.5,2 -1.7,2.1 -3.5,4.1 -5.4,6 -2.8,-0.7 -5.6,-1.6 -8.5,-2.8 M 6.6,65 C 6.1,63.1 5.7,61.2 5.4,59.2 c 7.2,-1.8 16.6,-1.4 26.2,1.3 -0.9,2 -2,3.9 -3.2,5.8 C 19.3,64 11.6,64.2 6.6,65 m 50.7,9.7 c -3.2,-0.3 -6.5,-0.9 -9.8,-1.7 1.4,-2.2 2.6,-4.5 3.7,-6.9 3.5,0.6 6.8,1 10.1,1.1 -1.1,2.5 -2.4,5.1 -4,7.5 M 42.7,71.4 c -1.5,-0.5 -3,-1.1 -4.5,-1.8 -1.7,-0.7 -3.3,-1.3 -4.9,-1.9 1.1,-1.9 2.2,-3.8 3.1,-5.8 3.5,1.2 6.8,2.2 10,3 -1.1,2.3 -2.4,4.5 -3.7,6.5 M 30.5,72 c 1.8,0.6 3.8,1.3 5.7,2.2 1.2,0.5 2.3,1 3.5,1.4 -1.3,1.7 -2.8,3.3 -4.3,4.8 -3.1,-1.2 -6.2,-2.3 -9.3,-3 1.5,-1.8 3,-3.6 4.4,-5.4 m 12,-41.3 c 5.2,-2.9 11.1,-2.7 15.8,0.4 4.2,2.8 6.5,6.7 7.3,12 -5,-0.4 -10.2,-0.6 -15.5,-0.6 -5.5,0 -10.9,0.3 -16,0.7 0.4,-5.1 3.5,-9.8 8.4,-12.5 m 7.5,16.8 2.1,0 c 1,0 2,0 3.1,0.1 3.6,0.1 7.2,0.3 10.6,0.6 -0.2,4.8 -1,9.5 -2.5,14.1 -3.2,0 -6.5,-0.3 -10,-0.9 -1.6,-0.3 -3.2,-0.6 -4.9,-1 -3.2,-0.7 -6.6,-1.7 -10.2,-3 -0.1,0 -0.2,-0.1 -0.3,-0.1 C 36.4,56.8 35,56.3 33.5,55.9 23.9,53.1 14.6,52.4 6.8,53.9 17.1,49.8 32.9,47.5 50,47.5 M 8.2,69.7 c 4.2,-0.5 10.1,-0.7 17.2,0.9 -1.5,1.9 -3.2,3.8 -5,5.5 -3.3,-0.5 -6.5,-0.8 -9.6,-0.7 -1,-1.8 -1.9,-3.7 -2.6,-5.7 m 9.5,15.2 c -1.1,-1.2 -2.2,-2.4 -3.2,-3.8 -0.2,-0.3 -0.4,-0.5 -0.6,-0.8 0.5,0 1,0 1.5,0.1 2,0.2 4.2,0.4 6.5,0.9 2.8,0.6 6,1.5 9.3,2.7 -2.5,2.1 -5.3,4.1 -8.2,5.8 -1.8,-1.4 -3.6,-3.1 -5.3,-4.9 m 9.9,8 c 3.2,-2 6.1,-4.3 8.8,-6.8 2.7,1.2 5.3,2.2 8,2.9 -3,2.6 -6.3,5.1 -10,7.1 -2.4,-0.8 -4.7,-1.9 -6.8,-3.2 m 13.1,5.2 c 3.5,-2.3 6.6,-5 9.4,-7.5 2.7,0.5 5.3,0.9 7.9,1.1 -3.2,3 -6.3,5.4 -9.4,7.4 -2.6,-0.2 -5.3,-0.5 -7.9,-1 m 17.1,0.2 c 2.4,-1.9 4.7,-4.1 7.2,-6.6 3.6,-0.1 7.2,-0.6 10.8,-1.3 -5.3,4 -11.5,6.7 -18,7.9 M 86.7,79.2 c -1.1,1.6 -2.3,3.1 -3.5,4.5 -4.4,1.2 -8.8,2.2 -13.2,2.7 2.1,-2.4 3.9,-4.9 5.6,-7.5 4.4,-0.7 8.8,-1.7 13.1,-3 -0.7,1.2 -1.3,2.2 -2,3.3 m -7.8,-5.9 c 1.6,-3.1 3,-6.2 4.1,-9.3 3.7,-1.2 7.4,-2.6 11.3,-4.3 -0.5,3.5 -1.5,6.9 -2.7,10.2 -4.2,1.4 -8.4,2.5 -12.7,3.4"
|
||||
id="path18"
|
||||
style="fill:#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="csccsccsccscccccccccccccccscscscccscsccccccccsscccccccccccccccccccccccsccccccccccccccccccccccccccccccccscccscccccccccccccccccccccccccccccccccccccccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
BIN
app/assets/images/ofn-logo.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 39 KiB |
BIN
app/assets/images/select2.png
Normal file
|
After Width: | Height: | Size: 881 B |
BIN
app/assets/images/select2x2.png
Normal file
|
After Width: | Height: | Size: 928 B |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 54 KiB |
@@ -0,0 +1 @@
|
||||
angular.module("admin.accounts_and_billing_settings", ["admin.utils"])
|
||||
@@ -0,0 +1,14 @@
|
||||
angular.module("admin.accounts_and_billing_settings").directive "methodSettingsFor", ->
|
||||
template: "<div ng-include='include_html'></div>"
|
||||
restrict: 'A'
|
||||
scope: {
|
||||
enterprise_id: '=methodSettingsFor'
|
||||
}
|
||||
link: (scope, element, attrs) ->
|
||||
scope.include_html = ""
|
||||
|
||||
scope.$watch "enterprise_id", (newVal, oldVal)->
|
||||
if !newVal? || newVal == ""
|
||||
scope.include_html = ""
|
||||
else
|
||||
scope.include_html = "/admin/accounts_and_billing_settings/show_methods?enterprise_id=#{newVal};"
|
||||
@@ -1,3 +1,3 @@
|
||||
angular.module("ofn.admin", ["ngResource", "ngAnimate", "admin.indexUtils", "admin.dropdown", "admin.products", "admin.taxons", "infinite-scroll"]).config ($httpProvider) ->
|
||||
angular.module("ofn.admin", ["ngResource", "ngAnimate", "admin.utils", "admin.indexUtils", "admin.dropdown", "admin.products", "admin.taxons", "infinite-scroll"]).config ($httpProvider) ->
|
||||
$httpProvider.defaults.headers.common["X-CSRF-Token"] = $("meta[name=csrf-token]").attr("content")
|
||||
$httpProvider.defaults.headers.common["Accept"] = "application/json, text/javascript, */*"
|
||||
@@ -21,21 +21,33 @@
|
||||
//= require ../shared/ng-tags-input.min.js
|
||||
//= require angular-rails-templates
|
||||
//= require_tree ../templates/admin
|
||||
//= require ./admin
|
||||
//= require ./admin_ofn
|
||||
//= require ./accounts_and_billing_settings/accounts_and_billing_settings
|
||||
//= require ./business_model_configuration/business_model_configuration
|
||||
//= require ./customers/customers
|
||||
//= require ./dropdown/dropdown
|
||||
//= require ./enterprises/enterprises
|
||||
//= require ./enterprise_fees/enterprise_fees
|
||||
//= require ./enterprise_groups/enterprise_groups
|
||||
//= require ./index_utils/index_utils
|
||||
//= require ./inventory_items/inventory_items
|
||||
//= require ./line_items/line_items
|
||||
//= require ./orders/orders
|
||||
//= require ./order_cycles/order_cycles
|
||||
//= require ./payment_methods/payment_methods
|
||||
//= require ./products/products
|
||||
//= require ./shipping_methods/shipping_methods
|
||||
//= require ./side_menu/side_menu
|
||||
//= require ./tag_rules/tag_rules
|
||||
//= require ./taxons/taxons
|
||||
//= require ./utils/utils
|
||||
//= require ./users/users
|
||||
//= require textAngular.min.js
|
||||
//= require ./variant_overrides/variant_overrides
|
||||
//= require textAngular-rangy.min.js
|
||||
//= require textAngular-sanitize.min.js
|
||||
//= require ../shared/bindonce.min.js
|
||||
//= require textAngular.min.js
|
||||
//= require darkswarm/i18n.js
|
||||
//= require darkswarm/i18n.translate.js
|
||||
|
||||
|
||||
//= require_tree .
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
angular.module("ofn.admin").controller "AdminOrderMgmtCtrl", [
|
||||
"$scope", "$http", "$filter", "dataFetcher", "blankOption", "pendingChanges", "VariantUnitManager", "OptionValueNamer", "SpreeApiKey", "Columns"
|
||||
($scope, $http, $filter, dataFetcher, blankOption, pendingChanges, VariantUnitManager, OptionValueNamer, SpreeApiKey, Columns) ->
|
||||
$scope.loading = true
|
||||
|
||||
$scope.initialiseVariables = ->
|
||||
start = daysFromToday -7
|
||||
end = daysFromToday 1
|
||||
$scope.lineItems = []
|
||||
$scope.filteredLineItems = []
|
||||
$scope.confirmDelete = true
|
||||
$scope.startDate = formatDate start
|
||||
$scope.endDate = formatDate end
|
||||
$scope.pendingChanges = pendingChanges
|
||||
$scope.quickSearch = ""
|
||||
$scope.bulkActions = [ { name: "Delete Selected", callback: $scope.deleteLineItems } ]
|
||||
$scope.selectedBulkAction = $scope.bulkActions[0]
|
||||
$scope.selectedUnitsProduct = {};
|
||||
$scope.selectedUnitsVariant = {};
|
||||
$scope.sharedResource = false
|
||||
$scope.columns = Columns.setColumns
|
||||
order_no: { name: "Order No.", visible: false }
|
||||
full_name: { name: "Name", visible: true }
|
||||
email: { name: "Email", visible: false }
|
||||
phone: { name: "Phone", visible: false }
|
||||
order_date: { name: "Order Date", visible: true }
|
||||
producer: { name: "Producer", visible: true }
|
||||
order_cycle: { name: "Order Cycle", visible: false }
|
||||
hub: { name: "Hub", visible: false }
|
||||
variant: { name: "Variant", visible: true }
|
||||
quantity: { name: "Quantity", visible: true }
|
||||
max: { name: "Max", visible: true }
|
||||
final_weight_volume: { name: "Weight/Volume", visible: false }
|
||||
price: { name: "Price", visible: false }
|
||||
$scope.initialise = ->
|
||||
$scope.initialiseVariables()
|
||||
authorise_api_reponse = ""
|
||||
dataFetcher("/api/users/authorise_api?token=" + SpreeApiKey).then (data) ->
|
||||
authorise_api_reponse = data
|
||||
$scope.spree_api_key_ok = data.hasOwnProperty("success") and data["success"] == "Use of API Authorised"
|
||||
if $scope.spree_api_key_ok
|
||||
$http.defaults.headers.common["X-Spree-Token"] = SpreeApiKey
|
||||
dataFetcher("/api/enterprises/accessible?template=bulk_index&q[is_primary_producer_eq]=true").then (data) ->
|
||||
$scope.suppliers = $filter('orderBy')(data, 'name')
|
||||
$scope.suppliers.unshift blankOption()
|
||||
dataFetcher("/api/enterprises/accessible?template=bulk_index&q[sells_in][]=own&q[sells_in][]=any").then (data) ->
|
||||
$scope.distributors = $filter('orderBy')(data, 'name')
|
||||
$scope.distributors.unshift blankOption()
|
||||
ocFetcher = dataFetcher("/api/order_cycles/accessible?as=distributor&q[orders_close_at_gt]=#{formatDate(daysFromToday(-90))}").then (data) ->
|
||||
$scope.orderCycles = data
|
||||
$scope.orderCyclesByID = []
|
||||
$scope.orderCyclesByID[oc.id] = oc for oc in $scope.orderCycles
|
||||
$scope.orderCycles.unshift blankOption()
|
||||
$scope.fetchOrders()
|
||||
ocFetcher.then ->
|
||||
$scope.resetSelectFilters()
|
||||
else if authorise_api_reponse.hasOwnProperty("error")
|
||||
$scope.api_error_msg = authorise_api_reponse("error")
|
||||
else
|
||||
api_error_msg = "You don't have an API key yet. An attempt was made to generate one, but you are currently not authorised, please contact your site administrator for access."
|
||||
|
||||
$scope.fetchOrders = ->
|
||||
$scope.loading = true
|
||||
dataFetcher("/admin/orders/managed?template=bulk_index;page=1;per_page=500;q[state_not_eq]=canceled;q[completed_at_not_null]=true;q[completed_at_gt]=#{$scope.startDate};q[completed_at_lt]=#{$scope.endDate}").then (data) ->
|
||||
$scope.resetOrders data
|
||||
$scope.loading = false
|
||||
|
||||
$scope.resetOrders = (data) ->
|
||||
$scope.orders = data
|
||||
$scope.resetLineItems()
|
||||
pendingChanges.removeAll()
|
||||
|
||||
$scope.resetLineItems = ->
|
||||
$scope.lineItems = $scope.orders.reduce (lineItems,order) ->
|
||||
orderWithoutLineItems = $scope.lineItemOrder order
|
||||
for i,line_item of order.line_items
|
||||
line_item.checked = false
|
||||
line_item.supplier = $scope.matchObject $scope.suppliers, line_item.supplier, null
|
||||
line_item.order = orderWithoutLineItems
|
||||
lineItems.concat order.line_items
|
||||
, []
|
||||
|
||||
$scope.lineItemOrder = (order) ->
|
||||
lineItemOrder = angular.copy(order)
|
||||
delete lineItemOrder.line_items
|
||||
lineItemOrder.distributor = $scope.matchObject $scope.distributors, order.distributor, null
|
||||
lineItemOrder.order_cycle = $scope.matchObject $scope.orderCycles, order.order_cycle, null
|
||||
lineItemOrder
|
||||
|
||||
$scope.matchObject = (list, testObject, noMatch) ->
|
||||
for i, object of list
|
||||
if angular.equals(object, testObject)
|
||||
return object
|
||||
return noMatch
|
||||
|
||||
$scope.deleteLineItem = (lineItem) ->
|
||||
if ($scope.confirmDelete && confirm("Are you sure?")) || !$scope.confirmDelete
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/orders/" + lineItem.order.number + "/line_items/" + lineItem.id
|
||||
).success (data) ->
|
||||
$scope.lineItems.splice $scope.lineItems.indexOf(lineItem), 1
|
||||
|
||||
$scope.deleteLineItems = (lineItems) ->
|
||||
existingState = $scope.confirmDelete
|
||||
$scope.confirmDelete = false
|
||||
$scope.deleteLineItem lineItem for lineItem in lineItems when lineItem.checked
|
||||
$scope.confirmDelete = existingState
|
||||
|
||||
$scope.allBoxesChecked = ->
|
||||
checkedCount = $scope.filteredLineItems.reduce (count,lineItem) ->
|
||||
count + (if lineItem.checked then 1 else 0 )
|
||||
, 0
|
||||
checkedCount == $scope.filteredLineItems.length
|
||||
|
||||
$scope.toggleAllCheckboxes = ->
|
||||
changeTo = !$scope.allBoxesChecked()
|
||||
lineItem.checked = changeTo for lineItem in $scope.filteredLineItems
|
||||
|
||||
$scope.setSelectedUnitsVariant = (unitsProduct,unitsVariant) ->
|
||||
$scope.selectedUnitsProduct = unitsProduct
|
||||
$scope.selectedUnitsVariant = unitsVariant
|
||||
|
||||
$scope.sumUnitValues = ->
|
||||
sum = $scope.filteredLineItems.reduce (sum,lineItem) ->
|
||||
sum = sum + lineItem.quantity * lineItem.units_variant.unit_value
|
||||
, 0
|
||||
|
||||
$scope.sumMaxUnitValues = ->
|
||||
sum = $scope.filteredLineItems.reduce (sum,lineItem) ->
|
||||
sum = sum + Math.max(lineItem.max_quantity,lineItem.quantity) * lineItem.units_variant.unit_value
|
||||
, 0
|
||||
|
||||
$scope.allUnitValuesPresent = ->
|
||||
for i,lineItem of $scope.filteredLineItems
|
||||
return false if !lineItem.units_variant.hasOwnProperty('unit_value') || !(lineItem.units_variant.unit_value > 0)
|
||||
true
|
||||
|
||||
# How is this different to OptionValueNamer#name?
|
||||
# Should it be extracted to that class or VariantUnitManager?
|
||||
$scope.formattedValueWithUnitName = (value, unitsProduct, unitsVariant) ->
|
||||
# A Units Variant is an API object which holds unit properies of a variant
|
||||
if unitsProduct.hasOwnProperty("variant_unit") && (unitsProduct.variant_unit == "weight" || unitsProduct.variant_unit == "volume") && value > 0
|
||||
scale = VariantUnitManager.getScale(value, unitsProduct.variant_unit)
|
||||
Math.round(value/scale * 1000)/1000 + " " + VariantUnitManager.getUnitName(scale, unitsProduct.variant_unit)
|
||||
else
|
||||
''
|
||||
|
||||
$scope.fulfilled = (sumOfUnitValues) ->
|
||||
# A Units Variant is an API object which holds unit properies of a variant
|
||||
if $scope.selectedUnitsProduct.hasOwnProperty("group_buy_unit_size") && $scope.selectedUnitsProduct.group_buy_unit_size > 0 &&
|
||||
$scope.selectedUnitsProduct.hasOwnProperty("variant_unit") &&
|
||||
( $scope.selectedUnitsProduct.variant_unit == "weight" || $scope.selectedUnitsProduct.variant_unit == "volume" )
|
||||
Math.round( sumOfUnitValues / $scope.selectedUnitsProduct.group_buy_unit_size * 1000)/1000
|
||||
else
|
||||
''
|
||||
|
||||
$scope.unitsVariantSelected = ->
|
||||
!angular.equals($scope.selectedUnitsVariant,{})
|
||||
|
||||
$scope.resetSelectFilters = ->
|
||||
$scope.distributorFilter = $scope.distributors[0].id
|
||||
$scope.supplierFilter = $scope.suppliers[0].id
|
||||
$scope.orderCycleFilter = $scope.orderCycles[0].id
|
||||
$scope.quickSearch = ""
|
||||
|
||||
$scope.weightAdjustedPrice = (lineItem, oldValue) ->
|
||||
if oldValue <= 0
|
||||
oldValue = lineItem.units_variant.unit_value * line_item.quantity
|
||||
if lineItem.final_weight_volume <= 0
|
||||
lineItem.final_weight_volume = lineItem.units_variant.unit_value * lineItem.quantity
|
||||
lineItem.price = lineItem.price * lineItem.final_weight_volume / oldValue
|
||||
#$scope.bulk_order_form.line_item.price.$setViewValue($scope.bulk_order_form.line_item.price.$viewValue)
|
||||
|
||||
$scope.unitValueLessThanZero = (lineItem) ->
|
||||
if lineItem.units_variant.unit_value <= 0
|
||||
true
|
||||
else
|
||||
false
|
||||
|
||||
$scope.updateOnQuantity = (lineItem, oldQuantity) ->
|
||||
if lineItem.quantity <= 0
|
||||
lineItem.quantity = 1
|
||||
# reset price to original unit value
|
||||
lineItem.price = lineItem.price * (oldQuantity * lineItem.units_variant.unit_value) / lineItem.final_weight_volume
|
||||
lineItem.final_weight_volume = lineItem.units_variant.unit_value * lineItem.quantity
|
||||
|
||||
$scope.$watch "orderCycleFilter", (newVal, oldVal) ->
|
||||
unless $scope.orderCycleFilter == "0" || angular.equals(newVal, oldVal)
|
||||
$scope.startDate = $scope.orderCyclesByID[$scope.orderCycleFilter].first_order
|
||||
$scope.endDate = $scope.orderCyclesByID[$scope.orderCycleFilter].last_order
|
||||
]
|
||||
|
||||
daysFromToday = (days) ->
|
||||
now = new Date
|
||||
now.setHours(0)
|
||||
now.setMinutes(0)
|
||||
now.setSeconds(0)
|
||||
now.setDate( now.getDate() + days )
|
||||
now
|
||||
|
||||
formatDate = (date) ->
|
||||
year = date.getFullYear()
|
||||
month = twoDigitNumber date.getMonth() + 1
|
||||
day = twoDigitNumber date.getDate()
|
||||
return year + "-" + month + "-" + day
|
||||
|
||||
formatTime = (date) ->
|
||||
hours = twoDigitNumber date.getHours()
|
||||
mins = twoDigitNumber date.getMinutes()
|
||||
secs = twoDigitNumber date.getSeconds()
|
||||
return hours + ":" + mins + ":" + secs
|
||||
|
||||
twoDigitNumber = (number) ->
|
||||
twoDigits = "" + number
|
||||
twoDigits = ("0" + number) if number < 10
|
||||
twoDigits
|
||||
@@ -1,35 +1,24 @@
|
||||
angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout, $http, BulkProducts, DisplayProperties, dataFetcher, DirtyProducts, VariantUnitManager, StatusMessage, producers, Taxons, SpreeApiAuth, Columns, tax_categories) ->
|
||||
angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout, $http, $window, BulkProducts, DisplayProperties, dataFetcher, DirtyProducts, VariantUnitManager, StatusMessage, producers, Taxons, SpreeApiAuth, Columns, tax_categories) ->
|
||||
$scope.loading = true
|
||||
|
||||
$scope.StatusMessage = StatusMessage
|
||||
|
||||
$scope.columns = Columns.setColumns
|
||||
producer: {name: "Producer", visible: true}
|
||||
sku: {name: "SKU", visible: false}
|
||||
name: {name: "Name", visible: true}
|
||||
unit: {name: "Unit", visible: true}
|
||||
price: {name: "Price", visible: true}
|
||||
on_hand: {name: "On Hand", visible: true}
|
||||
on_demand: {name: "On Demand", visible: false}
|
||||
category: {name: "Category", visible: false}
|
||||
tax_category: {name: "Tax Category", visible: false}
|
||||
inherits_properties: {name: "Inherits Properties?", visible: false}
|
||||
available_on: {name: "Available On", visible: false}
|
||||
$scope.columns = Columns.columns
|
||||
|
||||
$scope.variant_unit_options = VariantUnitManager.variantUnitOptions()
|
||||
|
||||
$scope.filterableColumns = [
|
||||
{ name: "Producer", db_column: "producer_name" },
|
||||
{ name: "Name", db_column: "name" }
|
||||
{ name: t("label_producers"), db_column: "producer_name" },
|
||||
{ name: t("name"), db_column: "name" }
|
||||
]
|
||||
|
||||
$scope.filterTypes = [
|
||||
{ name: "Equals", predicate: "eq" },
|
||||
{ name: "Contains", predicate: "cont" }
|
||||
{ name: t("equals"), predicate: "eq" },
|
||||
{ name: t("contains"), predicate: "cont" }
|
||||
]
|
||||
|
||||
$scope.optionTabs =
|
||||
filters: { title: "Filter Products", visible: false }
|
||||
filters: { title: t("filter_products"), visible: false }
|
||||
|
||||
|
||||
$scope.producers = producers
|
||||
@@ -105,7 +94,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$scope.categoryFilter = "0"
|
||||
|
||||
$scope.editWarn = (product, variant) ->
|
||||
if (DirtyProducts.count() > 0 and confirm("Unsaved changes will be lost. Continue anyway?")) or (DirtyProducts.count() == 0)
|
||||
if (DirtyProducts.count() > 0 and confirm(t("unsaved_changes_confirmation"))) or (DirtyProducts.count() == 0)
|
||||
window.location = "/admin/products/" + product.permalink_live + ((if variant then "/variants/" + variant.id else "")) + "/edit"
|
||||
|
||||
|
||||
@@ -150,14 +139,14 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
if !$scope.variantSaved(variant)
|
||||
$scope.removeVariant(product, variant)
|
||||
else
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t("are_you_sure"))
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/products/" + product.permalink_live + "/variants/" + variant.id + "/soft_delete"
|
||||
).success (data) ->
|
||||
$scope.removeVariant(product, variant)
|
||||
else
|
||||
alert("The last variant cannot be deleted!")
|
||||
alert(t("delete_product_variant"))
|
||||
|
||||
$scope.removeVariant = (product, variant) ->
|
||||
product.variants.splice product.variants.indexOf(variant), 1
|
||||
@@ -194,7 +183,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
if productsToSubmit.length > 0
|
||||
$scope.updateProducts productsToSubmit # Don't submit an empty list
|
||||
else
|
||||
StatusMessage.display 'alert', 'No changes to save.'
|
||||
StatusMessage.display 'alert', t("products_change")
|
||||
|
||||
|
||||
$scope.updateProducts = (productsToSubmit) ->
|
||||
@@ -212,11 +201,13 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
).error (data, status) ->
|
||||
if status == 400 && data.errors? && data.errors.length > 0
|
||||
errors = error + "\n" for error in data.errors
|
||||
alert "Saving failed with the following error(s):\n" + errors
|
||||
$scope.displayFailure "Save failed due to invalid data"
|
||||
alert t("products_update_error") + "\n" + errors
|
||||
$scope.displayFailure t("products_update_error")
|
||||
else
|
||||
$scope.displayFailure "Server returned with error status: " + status
|
||||
$scope.displayFailure t("products_update_error_data") + status
|
||||
|
||||
$scope.cancel = (destination) ->
|
||||
$window.location = destination
|
||||
|
||||
$scope.packProduct = (product) ->
|
||||
if product.variant_unit_with_scale
|
||||
@@ -253,23 +244,24 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
|
||||
|
||||
$scope.displayUpdating = ->
|
||||
StatusMessage.display 'progress', 'Saving...'
|
||||
StatusMessage.display 'progress', t("saving")
|
||||
|
||||
|
||||
$scope.displaySuccess = ->
|
||||
StatusMessage.display 'success', 'Changes saved.'
|
||||
StatusMessage.display 'success',t("products_changes_saved")
|
||||
$scope.bulk_product_form.$setPristine()
|
||||
|
||||
|
||||
$scope.displayFailure = (failMessage) ->
|
||||
StatusMessage.display 'failure', "Saving failed. #{failMessage}"
|
||||
StatusMessage.display 'failure', t("products_update_error_msg") + "#{failMessage}"
|
||||
|
||||
|
||||
$scope.displayDirtyProducts = ->
|
||||
if DirtyProducts.count() > 0
|
||||
message = if DirtyProducts.count() == 1 then "one product" else DirtyProducts.count() + " products"
|
||||
StatusMessage.display 'notice', "Changes to #{message} remain unsaved."
|
||||
else
|
||||
StatusMessage.clear()
|
||||
count = DirtyProducts.count()
|
||||
switch count
|
||||
when 0 then StatusMessage.clear()
|
||||
when 1 then StatusMessage.display 'notice', t("one_product_unsaved")
|
||||
else StatusMessage.display 'notice', t("products_unsaved", n: count)
|
||||
|
||||
|
||||
filterSubmitProducts = (productsToFilter) ->
|
||||
@@ -352,6 +344,9 @@ filterSubmitVariant = (variant) ->
|
||||
filteredVariant = {}
|
||||
if not variant.deleted_at? and variant.hasOwnProperty("id")
|
||||
filteredVariant.id = variant.id unless variant.id <= 0
|
||||
if variant.hasOwnProperty("sku")
|
||||
filteredVariant.sku = variant.sku
|
||||
hasUpdatableProperty = true
|
||||
if variant.hasOwnProperty("on_hand")
|
||||
filteredVariant.on_hand = variant.on_hand
|
||||
hasUpdatableProperty = true
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
angular.module("admin.businessModelConfiguration", ["admin.utils"])
|
||||
@@ -0,0 +1,25 @@
|
||||
angular.module("admin.businessModelConfiguration").controller "BusinessModelConfigCtrl", ($scope, $filter) ->
|
||||
$scope.turnover = 1000
|
||||
|
||||
$scope.bill = ->
|
||||
return $filter('currency')(0) unless $scope.fixed || $scope.rate
|
||||
Number($scope.fixed) + Number($scope.turnover) * Number($scope.rate)
|
||||
|
||||
$scope.cappedBill = ->
|
||||
return $scope.bill() if !$scope.cap? || Number($scope.cap) == 0
|
||||
Math.min($scope.bill(), Number($scope.cap))
|
||||
|
||||
$scope.finalBill = ->
|
||||
return 0 if Number($scope.turnover) < Number($scope.minBillableTurnover)
|
||||
$scope.cappedBill()
|
||||
|
||||
$scope.capReached = ->
|
||||
return "No" if !$scope.cap? || Number($scope.cap) == 0
|
||||
if $scope.bill() >= Number($scope.cap) then "Yes" else "No"
|
||||
|
||||
$scope.includedTax = ->
|
||||
return 0 if !$scope.taxRate? || Number($scope.taxRate) == 0
|
||||
($scope.cappedBill() * Number($scope.taxRate))
|
||||
|
||||
$scope.total = ->
|
||||
$scope.finalBill() + $scope.includedTax()
|
||||
@@ -7,7 +7,7 @@ angular.module("ofn.admin").controller "AdminEnterpriseRelationshipsCtrl", ($sco
|
||||
$scope.EnterpriseRelationships.create($scope.parent_id, $scope.child_id, $scope.permissions)
|
||||
|
||||
$scope.delete = (enterprise_relationship) ->
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t("are_you_sure"))
|
||||
$scope.EnterpriseRelationships.delete enterprise_relationship
|
||||
|
||||
$scope.toggleKeyword = (string, key) ->
|
||||
|
||||
@@ -7,5 +7,5 @@ angular.module("ofn.admin").controller "AdminEnterpriseRolesCtrl", ($scope, Ente
|
||||
$scope.EnterpriseRoles.create($scope.user_id, $scope.enterprise_id)
|
||||
|
||||
$scope.delete = (enterprise_role) ->
|
||||
if confirm("Are you sure?")
|
||||
if confirm(t('are_you_sure'))
|
||||
$scope.EnterpriseRoles.delete enterprise_role
|
||||
|
||||
@@ -1,5 +1,2 @@
|
||||
angular.module("ofn.admin").controller "enterprisesDashboardCtrl", [
|
||||
"$scope"
|
||||
($scope) ->
|
||||
$scope.activeTab = "hubs"
|
||||
]
|
||||
angular.module("ofn.admin").controller "enterprisesDashboardCtrl", ($scope) ->
|
||||
$scope.activeTab = "hubs"
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
angular.module("ofn.admin").controller "AdminVariantOverridesCtrl", ($scope, $timeout, Indexer, SpreeApiAuth, PagedFetcher, StatusMessage, hubs, producers, hubPermissions, VariantOverrides, DirtyVariantOverrides) ->
|
||||
$scope.hubs = hubs
|
||||
$scope.hub = null
|
||||
$scope.products = []
|
||||
$scope.producers = Indexer.index producers
|
||||
$scope.hubPermissions = hubPermissions
|
||||
$scope.variantOverrides = VariantOverrides.variantOverrides
|
||||
$scope.StatusMessage = StatusMessage
|
||||
|
||||
$scope.initialise = ->
|
||||
SpreeApiAuth.authorise()
|
||||
.then ->
|
||||
$scope.spree_api_key_ok = true
|
||||
$scope.fetchProducts()
|
||||
.catch (message) ->
|
||||
$scope.api_error_msg = message
|
||||
|
||||
|
||||
$scope.fetchProducts = ->
|
||||
url = "/api/products/overridable?page=::page::;per_page=100"
|
||||
PagedFetcher.fetch url, (data) => $scope.addProducts data.products
|
||||
|
||||
|
||||
$scope.addProducts = (products) ->
|
||||
$scope.products = $scope.products.concat products
|
||||
VariantOverrides.ensureDataFor hubs, products
|
||||
|
||||
|
||||
$scope.selectHub = ->
|
||||
$scope.hub = (hub for hub in hubs when hub.id == $scope.hub_id)[0]
|
||||
|
||||
|
||||
$scope.displayDirty = ->
|
||||
if DirtyVariantOverrides.count() > 0
|
||||
num = if DirtyVariantOverrides.count() == 1 then "one override" else "#{DirtyVariantOverrides.count()} overrides"
|
||||
StatusMessage.display 'notice', "Changes to #{num} remain unsaved."
|
||||
else
|
||||
StatusMessage.clear()
|
||||
|
||||
|
||||
$scope.update = ->
|
||||
if DirtyVariantOverrides.count() == 0
|
||||
StatusMessage.display 'alert', 'No changes to save.'
|
||||
else
|
||||
StatusMessage.display 'progress', 'Saving...'
|
||||
DirtyVariantOverrides.save()
|
||||
.success (updatedVos) ->
|
||||
DirtyVariantOverrides.clear()
|
||||
VariantOverrides.updateIds updatedVos
|
||||
$timeout -> StatusMessage.display 'success', 'Changes saved.'
|
||||
.error (data, status) ->
|
||||
$timeout -> StatusMessage.display 'failure', $scope.updateError(data, status)
|
||||
|
||||
|
||||
$scope.updateError = (data, status) ->
|
||||
if status == 401
|
||||
"I couldn't get authorisation to save those changes, so they remain unsaved."
|
||||
|
||||
else if status == 400 && data.errors?
|
||||
errors = []
|
||||
for field, field_errors of data.errors
|
||||
errors = errors.concat field_errors
|
||||
errors = errors.join ', '
|
||||
"I had some trouble saving: #{errors}"
|
||||
|
||||
else
|
||||
"Oh no! I was unable to save your changes."
|
||||
@@ -1,17 +1,45 @@
|
||||
angular.module("admin.customers").controller "customersCtrl", ($scope, Customers, Columns, pendingChanges, shops) ->
|
||||
$scope.shop = null
|
||||
angular.module("admin.customers").controller "customersCtrl", ($scope, $q, $filter, Customers, TagRuleResource, CurrentShop, RequestMonitor, Columns, pendingChanges, shops) ->
|
||||
$scope.shops = shops
|
||||
$scope.RequestMonitor = RequestMonitor
|
||||
$scope.submitAll = pendingChanges.submitAll
|
||||
$scope.add = Customers.add
|
||||
$scope.deleteCustomer = Customers.remove
|
||||
$scope.customerLimit = 20
|
||||
$scope.columns = Columns.columns
|
||||
|
||||
$scope.columns = Columns.setColumns
|
||||
email: { name: "Email", visible: true }
|
||||
code: { name: "Code", visible: true }
|
||||
tags: { name: "Tags", visible: true }
|
||||
$scope.confirmRefresh = (event) ->
|
||||
event.preventDefault() unless pendingChanges.unsavedCount() == 0 || confirm(t("unsaved_changes_warning"))
|
||||
|
||||
$scope.$watch "shop", ->
|
||||
if $scope.shop?
|
||||
Customers.loaded = false
|
||||
$scope.customers = Customers.index(enterprise_id: $scope.shop.id)
|
||||
$scope.$watch "shop_id", ->
|
||||
if $scope.shop_id?
|
||||
CurrentShop.shop = $filter('filter')($scope.shops, {id: $scope.shop_id})[0]
|
||||
Customers.index({enterprise_id: $scope.shop_id}).then (data) ->
|
||||
pendingChanges.removeAll()
|
||||
$scope.customers_form.$setPristine()
|
||||
$scope.customers = data
|
||||
|
||||
$scope.loaded = ->
|
||||
Customers.loaded
|
||||
$scope.shop_id = shops[0].id if shops.length == 1
|
||||
|
||||
$scope.checkForDuplicateCodes = ->
|
||||
delete this.customer.code unless this.customer.code
|
||||
this.duplicate = $scope.isDuplicateCode(this.customer.code)
|
||||
|
||||
$scope.isDuplicateCode = (code) ->
|
||||
return false unless code
|
||||
customers = $scope.findByCode(code)
|
||||
customers.length > 1
|
||||
|
||||
$scope.findByCode = (code) ->
|
||||
if $scope.customers
|
||||
$scope.customers.filter (customer) ->
|
||||
customer.code == code
|
||||
|
||||
$scope.findTags = (query) ->
|
||||
defer = $q.defer()
|
||||
params =
|
||||
enterprise_id: $scope.shop_id
|
||||
TagRuleResource.mapByTag params, (data) =>
|
||||
filtered = data.filter (tag) ->
|
||||
tag.text.toLowerCase().indexOf(query.toLowerCase()) != -1
|
||||
defer.resolve filtered
|
||||
defer.promise
|
||||
|
||||
@@ -1 +1 @@
|
||||
angular.module("admin.customers", ['ngResource', 'ngTagsInput', 'admin.indexUtils', 'admin.dropdown'])
|
||||
angular.module("admin.customers", ['ngResource', 'admin.tagRules', 'admin.indexUtils', 'admin.utils', 'admin.dropdown'])
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
angular.module("admin.customers").directive 'newCustomerDialog', ($compile, $injector, $templateCache, DialogDefaults, CurrentShop, Customers) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
scope.CurrentShop = CurrentShop
|
||||
scope.submitted = false
|
||||
scope.email = ""
|
||||
scope.errors = []
|
||||
|
||||
scope.addCustomer = ->
|
||||
scope.new_customer_form.$setPristine()
|
||||
scope.submitted = true
|
||||
scope.errors = []
|
||||
if scope.new_customer_form.$valid
|
||||
Customers.add(scope.email).$promise.then (data) ->
|
||||
if data.id
|
||||
scope.email = ""
|
||||
scope.submitted = false
|
||||
template.dialog('close')
|
||||
, (response) ->
|
||||
if response.data.errors
|
||||
scope.errors.push(error) for error in response.data.errors
|
||||
else
|
||||
scope.errors.push("Sorry! Could not create '#{scope.email}'")
|
||||
return
|
||||
|
||||
# Compile modal template
|
||||
template = $compile($templateCache.get('admin/new_customer_dialog.html'))(scope)
|
||||
|
||||
# Set Dialog options
|
||||
template.dialog(DialogDefaults)
|
||||
|
||||
# Link opening of dialog to click event on element
|
||||
element.bind 'click', (e) ->
|
||||
if CurrentShop.shop.id
|
||||
template.dialog('open')
|
||||
else
|
||||
alert('Please select a shop first')
|
||||
@@ -1,8 +0,0 @@
|
||||
angular.module("admin.customers").directive "tagsWithTranslation", ->
|
||||
restrict: "E"
|
||||
template: "<tags-input ng-model='object.tags'>"
|
||||
scope:
|
||||
object: "="
|
||||
link: (scope, element, attrs) ->
|
||||
scope.$watchCollection "object.tags", ->
|
||||
scope.object.tag_list = (tag.text for tag in scope.object.tags).join(",")
|
||||
@@ -0,0 +1,3 @@
|
||||
angular.module("admin.customers").factory "CurrentShop", ->
|
||||
new class CurrentShop
|
||||
shop: {}
|
||||
@@ -1,8 +1,17 @@
|
||||
angular.module("admin.customers").factory 'CustomerResource', ($resource) ->
|
||||
$resource('/admin/customers.json', {}, {
|
||||
$resource('/admin/customers/:id.json', {}, {
|
||||
'index':
|
||||
method: 'GET'
|
||||
isArray: true
|
||||
params:
|
||||
enterprise_id: '@enterprise_id'
|
||||
'create':
|
||||
method: 'POST'
|
||||
params:
|
||||
enterprise_id: '@enterprise_id'
|
||||
email: '@email'
|
||||
'destroy':
|
||||
method: 'DELETE'
|
||||
params:
|
||||
id: '@id'
|
||||
})
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
angular.module("admin.customers").factory 'Customers', (CustomerResource) ->
|
||||
angular.module("admin.customers").factory "Customers", ($q, InfoDialog, RequestMonitor, CustomerResource, CurrentShop) ->
|
||||
new class Customers
|
||||
customers: []
|
||||
customers_by_id: {}
|
||||
loaded: false
|
||||
|
||||
index: (params={}, callback=null) ->
|
||||
CustomerResource.index params, (data) =>
|
||||
for customer in data
|
||||
@customers.push customer
|
||||
@customers_by_id[customer.id] = customer
|
||||
add: (email) ->
|
||||
params =
|
||||
enterprise_id: CurrentShop.shop.id
|
||||
email: email
|
||||
CustomerResource.create params, (customer) =>
|
||||
@customers.unshift customer if customer.id
|
||||
|
||||
@loaded = true
|
||||
(callback || angular.noop)(@customers)
|
||||
remove: (customer) ->
|
||||
params = id: customer.id
|
||||
CustomerResource.destroy params, =>
|
||||
i = @customers.indexOf customer
|
||||
@customers.splice i, 1 unless i < 0
|
||||
, (response) =>
|
||||
errors = response.data.errors
|
||||
if errors?
|
||||
InfoDialog.open 'error', errors[0]
|
||||
else
|
||||
InfoDialog.open 'error', "Could not delete customer: #{customer.email}"
|
||||
|
||||
@customers
|
||||
index: (params) ->
|
||||
request = CustomerResource.index(params, (data) => @customers = data)
|
||||
RequestMonitor.load(request.$promise)
|
||||
request.$promise
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
angular.module("ofn.admin").directive "ofnConfirmLinkPath", (ofnConfirmHandler) ->
|
||||
restrict: "A"
|
||||
scope:
|
||||
path: "@ofnConfirmLinkPath"
|
||||
link: (scope, element, attrs) ->
|
||||
element.click ofnConfirmHandler scope, ->
|
||||
window.location = scope.path
|
||||
@@ -1,6 +0,0 @@
|
||||
angular.module("ofn.admin").directive "ofnConfirmModelChange", (ofnConfirmHandler,$timeout) ->
|
||||
restrict: "A"
|
||||
link: (scope, element, attrs) ->
|
||||
handler = ofnConfirmHandler scope, -> scope.fetchOrders()
|
||||
scope.$watch attrs.ngModel, (oldValue,newValue) ->
|
||||
handler() unless oldValue == undefined || newValue == oldValue
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("ofn.admin").directive "ofnTrackMaster", ["DirtyProducts", (DirtyProducts) ->
|
||||
angular.module("ofn.admin").directive "ofnTrackMaster", (DirtyProducts) ->
|
||||
require: "ngModel"
|
||||
link: (scope, element, attrs, ngModel) ->
|
||||
ngModel.$parsers.push (viewValue) ->
|
||||
@@ -6,4 +6,3 @@ angular.module("ofn.admin").directive "ofnTrackMaster", ["DirtyProducts", (Dirty
|
||||
DirtyProducts.addMasterProperty scope.product.id, scope.product.master.id, attrs.ofnTrackMaster, viewValue
|
||||
scope.displayDirtyProducts()
|
||||
viewValue
|
||||
]
|
||||
@@ -1,9 +0,0 @@
|
||||
angular.module("ofn.admin").directive "ofnTrackVariantOverride", (DirtyVariantOverrides) ->
|
||||
require: "ngModel"
|
||||
link: (scope, element, attrs, ngModel) ->
|
||||
ngModel.$parsers.push (viewValue) ->
|
||||
if ngModel.$dirty
|
||||
variantOverride = scope.variantOverrides[scope.hub.id][scope.variant.id]
|
||||
DirtyVariantOverrides.add variantOverride
|
||||
scope.displayDirty()
|
||||
viewValue
|
||||
@@ -0,0 +1,10 @@
|
||||
angular.module("admin.dropdown").controller "ColumnsDropdownCtrl", ($scope, Columns) ->
|
||||
$scope.columns = Columns.columns
|
||||
$scope.toggle = Columns.toggleColumn
|
||||
$scope.saved = Columns.preferencesSaved
|
||||
$scope.saving = false
|
||||
|
||||
$scope.saveColumnPreferences = (action_name) ->
|
||||
$scope.saving = true
|
||||
Columns.savePreferences(action_name).then ->
|
||||
$scope.saving = false
|
||||
@@ -1,2 +0,0 @@
|
||||
angular.module("admin.dropdown").controller "DropDownCtrl", ($scope) ->
|
||||
$scope.expanded = false
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.dropdown").directive "ofnCloseOnClick", ($document) ->
|
||||
angular.module("admin.dropdown").directive "closeOnClick", () ->
|
||||
link: (scope, element, attrs) ->
|
||||
element.click (event) ->
|
||||
event.stopPropagation()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
angular.module("admin.dropdown").directive 'columnsDropdown', ->
|
||||
restrict: 'E'
|
||||
templateUrl: 'admin/columns_dropdown.html'
|
||||
controller: 'ColumnsDropdownCtrl'
|
||||
scope:
|
||||
action: '@'
|
||||
@@ -1,8 +1,12 @@
|
||||
angular.module("admin.dropdown").directive "ofnDropDown", ($document) ->
|
||||
restrict: 'C'
|
||||
scope: true
|
||||
link: (scope, element, attrs) ->
|
||||
scope.expanded = false
|
||||
|
||||
outsideClickListener = (event) ->
|
||||
unless $(event.target).is("div.ofn_drop_down##{attrs.id} div.menu") ||
|
||||
$(event.target).parents("div.ofn_drop_down##{attrs.id} div.menu").length > 0
|
||||
unless $(event.target).is("div.ofn-drop-down##{attrs.id} div.menu") ||
|
||||
$(event.target).parents("div.ofn-drop-down##{attrs.id} div.menu").length > 0
|
||||
scope.$emit "offClick"
|
||||
|
||||
element.click (event) ->
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
angular.module("admin.dropdown").directive "linksDropdown", ($window)->
|
||||
restrict: "C"
|
||||
scope:
|
||||
links: "="
|
||||
templateUrl: "admin/links_dropdown.html"
|
||||
@@ -1 +1 @@
|
||||
angular.module("admin.dropdown", [])
|
||||
angular.module("admin.dropdown", ['templates'])
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
angular.module('enterprise_fees', [])
|
||||
.controller('AdminEnterpriseFeesCtrl', ['$scope', '$http', '$window', function($scope, $http, $window) {
|
||||
$scope.enterpriseFeesUrl = function() {
|
||||
var url = '/admin/enterprise_fees.json?include_calculators=1';
|
||||
|
||||
var match = $window.location.search.match(/enterprise_id=(\d+)/);
|
||||
if(match) {
|
||||
url += "&"+match[0];
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
$http.get($scope.enterpriseFeesUrl()).success(function(data) {
|
||||
$scope.enterprise_fees = data;
|
||||
|
||||
// TODO: Angular 1.1.0 will have a means to reset a form to its pristine state, which
|
||||
// would avoid the need to save off original calculator types for comparison.
|
||||
for(i in $scope.enterprise_fees) {
|
||||
$scope.enterprise_fees[i].orig_calculator_type = $scope.enterprise_fees[i].calculator_type;
|
||||
}
|
||||
});
|
||||
}])
|
||||
|
||||
.directive('ngBindHtmlUnsafeCompiled', ['$compile', function($compile) {
|
||||
return function(scope, element, attrs) {
|
||||
scope.$watch(attrs.ngBindHtmlUnsafeCompiled, function(value) {
|
||||
element.html($compile(value)(scope));
|
||||
});
|
||||
}
|
||||
}])
|
||||
|
||||
.directive('spreeDeleteResource', function() {
|
||||
return function(scope, element, attrs) {
|
||||
if(scope.enterprise_fee.id) {
|
||||
var url = "/admin/enterprise_fees/" + scope.enterprise_fee.id
|
||||
var html = '<a href="'+url+'" class="delete-resource icon_link with-tip icon-trash no-text" data-action="remove" data-confirm="Are you sure?" url="'+url+'"></a>';
|
||||
//var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
|
||||
element.append(html);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
.directive('spreeEnsureCalculatorPreferencesMatchType', function() {
|
||||
// Hide calculator preference fields when calculator type changed
|
||||
// Fixes 'Enterprise fee is not found' error when changing calculator type
|
||||
// See spree/core/app/assets/javascripts/admin/calculator.js
|
||||
|
||||
// Note: For some reason, DOM --> model bindings aren't working here, so
|
||||
// we use element.val() instead of querying the model itself.
|
||||
|
||||
return function(scope, element, attrs) {
|
||||
scope.$watch(function(scope) {
|
||||
//return scope.enterprise_fee.calculator_type;
|
||||
return element.val();
|
||||
}, function(value) {
|
||||
var settings = element.parent().parent().find("div.calculator-settings");
|
||||
|
||||
// scope.enterprise_fee.calculator_type == scope.enterprise_fee.orig_calculator_type
|
||||
if(element.val() == scope.enterprise_fee.orig_calculator_type) {
|
||||
settings.show();
|
||||
settings.find("input").prop("disabled", false);
|
||||
} else {
|
||||
settings.hide();
|
||||
settings.find("input").prop("disabled", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
angular.module('admin.enterpriseFees').controller 'enterpriseFeesCtrl', ($scope, $http, $window, enterprises, tax_categories, calculators) ->
|
||||
$scope.enterprises = enterprises
|
||||
$scope.tax_categories = [{id: -1, name: "Inherit From Product"}].concat tax_categories
|
||||
$scope.calculators = calculators
|
||||
|
||||
$scope.enterpriseFeesUrl = ->
|
||||
url = '/admin/enterprise_fees.json?include_calculators=1'
|
||||
match = $window.location.search.match(/enterprise_id=(\d+)/)
|
||||
if match
|
||||
url += '&' + match[0]
|
||||
url
|
||||
|
||||
$http.get($scope.enterpriseFeesUrl()).success (data) ->
|
||||
$scope.enterprise_fees = data
|
||||
@@ -0,0 +1,6 @@
|
||||
angular.module("admin.enterpriseFees").directive 'ngBindHtmlUnsafeCompiled', ($compile) ->
|
||||
(scope, element, attrs) ->
|
||||
scope.$watch attrs.ngBindHtmlUnsafeCompiled, (value) ->
|
||||
element.html $compile(value)(scope)
|
||||
return
|
||||
return
|
||||
@@ -0,0 +1,8 @@
|
||||
angular.module('admin.enterpriseFees').directive 'spreeDeleteResource', ->
|
||||
(scope, element, attrs) ->
|
||||
if scope.enterprise_fee.id
|
||||
url = '/admin/enterprise_fees/' + scope.enterprise_fee.id
|
||||
html = '<a href="' + url + '" class="delete-resource icon_link icon-trash no-text" data-action="remove" data-confirm="Are you sure?" url="' + url + '"></a>'
|
||||
#var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
|
||||
element.append html
|
||||
return
|
||||