nesta-plugin-admin 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/README.md +16 -3
- data/Rakefile +9 -0
- data/doc/Nesta.html +1 -1
- data/doc/Nesta/AdminScreens.html +1 -1
- data/doc/Nesta/App.html +1 -1
- data/doc/Nesta/Config.html +1 -1
- data/doc/Nesta/Page.html +10 -10
- data/doc/Nesta/Plugin.html +1 -1
- data/doc/Nesta/Plugin/Admin.html +26 -26
- data/doc/Nesta/Plugin/Admin/Helpers.html +7 -8
- data/doc/_index.html +1 -1
- data/doc/file.README.html +26 -5
- data/doc/index.html +26 -5
- data/doc/top-level-namespace.html +1 -1
- data/lib/nesta-plugin-admin/init.rb +3 -4
- data/lib/nesta-plugin-admin/version.rb +1 -1
- data/views/admin.haml +5 -7
- data/views/edit.haml +14 -15
- data/views/footer.haml +1 -1
- data/views/header.haml +2 -4
- data/views/layout.haml +10 -14
- metadata +2 -2
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
# Nesta::Plugin::Admin
|
|
2
2
|
|
|
3
|
-
### [Documentation](http://
|
|
3
|
+
### [Documentation](http://jmervine.github.com/nesta-plugin-admin/doc/)
|
|
4
4
|
|
|
5
5
|
An Admin interface for Nesta allowing currently allowing the following:
|
|
6
6
|
|
|
7
|
+
> Note: This is U-G-L-Y, as far as interfaces go. I am not an interface person.
|
|
8
|
+
> If you would like a cleaner, prettier interface, feel free to fork and update.
|
|
9
|
+
> If you do, please submit a pull request to me, I would like to make it better
|
|
10
|
+
> looking.
|
|
11
|
+
|
|
12
|
+
### Current Features:
|
|
7
13
|
1. Create new pages.
|
|
8
14
|
2. Edit existing pages.
|
|
9
15
|
3. Delete pages.
|
|
10
16
|
4. Edit menu.txt.
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
### Known Issues:
|
|
19
|
+
- Admin interface is a bit wonky when using some themes.
|
|
20
|
+
|
|
21
|
+
### TODOs:
|
|
13
22
|
- Add config editor.
|
|
23
|
+
- Add plugin viewer.
|
|
24
|
+
- Add theme viewer and installer.
|
|
25
|
+
- Add server restart? Maybe? Probably not, but maybe?
|
|
26
|
+
|
|
14
27
|
|
|
15
28
|
## Installation
|
|
16
29
|
|
|
@@ -38,7 +51,7 @@ Or install it yourself as:
|
|
|
38
51
|
|
|
39
52
|
2. Restart your application.
|
|
40
53
|
|
|
41
|
-
3. Visit: http
|
|
54
|
+
3. Visit: http://YOURSITE/admin
|
|
42
55
|
|
|
43
56
|
4. Login
|
|
44
57
|
|
data/Rakefile
CHANGED
data/doc/Nesta.html
CHANGED
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
</div>
|
|
111
111
|
|
|
112
112
|
<div id="footer">
|
|
113
|
-
Generated on
|
|
113
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
114
114
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
115
115
|
0.8.2.1 (ruby-1.9.3).
|
|
116
116
|
</div>
|
data/doc/Nesta/AdminScreens.html
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div id="footer">
|
|
117
|
-
Generated on
|
|
117
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
119
119
|
0.8.2.1 (ruby-1.9.3).
|
|
120
120
|
</div>
|
data/doc/Nesta/App.html
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on
|
|
125
|
+
Generated on Fri Aug 24 02:46:17 2012 by
|
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
127
|
0.8.2.1 (ruby-1.9.3).
|
|
128
128
|
</div>
|
data/doc/Nesta/Config.html
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
124
|
<div id="footer">
|
|
125
|
-
Generated on
|
|
125
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
127
127
|
0.8.2.1 (ruby-1.9.3).
|
|
128
128
|
</div>
|
data/doc/Nesta/Page.html
CHANGED
|
@@ -239,12 +239,12 @@ seemed to fix here within the context of the Page module.</p>
|
|
|
239
239
|
<pre class="lines">
|
|
240
240
|
|
|
241
241
|
|
|
242
|
+
236
|
|
242
243
|
237
|
|
243
|
-
238
|
|
244
|
-
239</pre>
|
|
244
|
+
238</pre>
|
|
245
245
|
</td>
|
|
246
246
|
<td>
|
|
247
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
247
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 236</span>
|
|
248
248
|
|
|
249
249
|
<span class='kw'>def</span> <span class='id identifier rubyid_format'>format</span>
|
|
250
250
|
<span class='ivar'>@format</span>
|
|
@@ -276,12 +276,12 @@ seemed to fix here within the context of the Page module.</p>
|
|
|
276
276
|
<pre class="lines">
|
|
277
277
|
|
|
278
278
|
|
|
279
|
+
241
|
|
279
280
|
242
|
|
280
|
-
243
|
|
281
|
-
244</pre>
|
|
281
|
+
243</pre>
|
|
282
282
|
</td>
|
|
283
283
|
<td>
|
|
284
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
284
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 241</span>
|
|
285
285
|
|
|
286
286
|
<span class='kw'>def</span> <span class='id identifier rubyid_path_for_admin'>path_for_admin</span>
|
|
287
287
|
<span class='kw'>return</span> <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>index</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
|
@@ -306,13 +306,13 @@ seemed to fix here within the context of the Page module.</p>
|
|
|
306
306
|
<pre class="lines">
|
|
307
307
|
|
|
308
308
|
|
|
309
|
+
237
|
|
309
310
|
238
|
|
310
311
|
239
|
|
311
|
-
240
|
|
312
|
-
241</pre>
|
|
312
|
+
240</pre>
|
|
313
313
|
</td>
|
|
314
314
|
<td>
|
|
315
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
315
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 237</span>
|
|
316
316
|
|
|
317
317
|
<span class='kw'>def</span> <span class='id identifier rubyid_title_for_admin'>title_for_admin</span>
|
|
318
318
|
<span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_title'>title</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='const'>Nesta</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_title'>title</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
@@ -328,7 +328,7 @@ seemed to fix here within the context of the Page module.</p>
|
|
|
328
328
|
</div>
|
|
329
329
|
|
|
330
330
|
<div id="footer">
|
|
331
|
-
Generated on
|
|
331
|
+
Generated on Fri Aug 24 02:46:17 2012 by
|
|
332
332
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
333
333
|
0.8.2.1 (ruby-1.9.3).
|
|
334
334
|
</div>
|
data/doc/Nesta/Plugin.html
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
</div>
|
|
109
109
|
|
|
110
110
|
<div id="footer">
|
|
111
|
-
Generated on
|
|
111
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
112
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
113
113
|
0.8.2.1 (ruby-1.9.3).
|
|
114
114
|
</div>
|
data/doc/Nesta/Plugin/Admin.html
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<dt id="VERSION-constant" class="">VERSION =
|
|
105
105
|
|
|
106
106
|
</dt>
|
|
107
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.
|
|
107
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.2</span><span class='tstring_end'>"</span></span></pre></dd>
|
|
108
108
|
|
|
109
109
|
</dl>
|
|
110
110
|
|
|
@@ -378,12 +378,12 @@ plugin -- of which I may write.</p>
|
|
|
378
378
|
<pre class="lines">
|
|
379
379
|
|
|
380
380
|
|
|
381
|
+
97
|
|
381
382
|
98
|
|
382
|
-
99
|
|
383
|
-
100</pre>
|
|
383
|
+
99</pre>
|
|
384
384
|
</td>
|
|
385
385
|
<td>
|
|
386
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
386
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 97</span>
|
|
387
387
|
|
|
388
388
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_path'>path</span>
|
|
389
389
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_full_path'>full_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
|
@@ -419,17 +419,17 @@ plugin -- of which I may write.</p>
|
|
|
419
419
|
<pre class="lines">
|
|
420
420
|
|
|
421
421
|
|
|
422
|
+
146
|
|
422
423
|
147
|
|
423
424
|
148
|
|
424
425
|
149
|
|
425
426
|
150
|
|
426
427
|
151
|
|
427
428
|
152
|
|
428
|
-
153
|
|
429
|
-
154</pre>
|
|
429
|
+
153</pre>
|
|
430
430
|
</td>
|
|
431
431
|
<td>
|
|
432
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
432
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 146</span>
|
|
433
433
|
|
|
434
434
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_expire_caches'>expire_caches</span>
|
|
435
435
|
<span class='const'>Nesta</span><span class='op'>::</span><span class='const'>Page</span><span class='period'>.</span><span class='id identifier rubyid_purge_cache'>purge_cache</span>
|
|
@@ -504,6 +504,7 @@ plugin -- of which I may write.</p>
|
|
|
504
504
|
<pre class="lines">
|
|
505
505
|
|
|
506
506
|
|
|
507
|
+
132
|
|
507
508
|
133
|
|
508
509
|
134
|
|
509
510
|
135
|
|
@@ -514,11 +515,10 @@ plugin -- of which I may write.</p>
|
|
|
514
515
|
140
|
|
515
516
|
141
|
|
516
517
|
142
|
|
517
|
-
143
|
|
518
|
-
144</pre>
|
|
518
|
+
143</pre>
|
|
519
519
|
</td>
|
|
520
520
|
<td>
|
|
521
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
521
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 132</span>
|
|
522
522
|
|
|
523
523
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_full_path'>full_path</span> <span class='id identifier rubyid_path'>path</span>
|
|
524
524
|
<span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
@@ -563,12 +563,12 @@ plugin -- of which I may write.</p>
|
|
|
563
563
|
<pre class="lines">
|
|
564
564
|
|
|
565
565
|
|
|
566
|
+
110
|
|
566
567
|
111
|
|
567
|
-
112
|
|
568
|
-
113</pre>
|
|
568
|
+
112</pre>
|
|
569
569
|
</td>
|
|
570
570
|
<td>
|
|
571
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
571
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 110</span>
|
|
572
572
|
|
|
573
573
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_menu'>load_menu</span>
|
|
574
574
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_menu_path'>menu_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
|
|
@@ -624,13 +624,13 @@ plugin -- of which I may write.</p>
|
|
|
624
624
|
<pre class="lines">
|
|
625
625
|
|
|
626
626
|
|
|
627
|
+
104
|
|
627
628
|
105
|
|
628
629
|
106
|
|
629
|
-
107
|
|
630
|
-
108</pre>
|
|
630
|
+
107</pre>
|
|
631
631
|
</td>
|
|
632
632
|
<td>
|
|
633
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
633
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 104</span>
|
|
634
634
|
|
|
635
635
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_raw'>load_raw</span> <span class='id identifier rubyid_path'>path</span>
|
|
636
636
|
<span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_full_path'>full_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
|
@@ -687,12 +687,12 @@ plugin -- of which I may write.</p>
|
|
|
687
687
|
<pre class="lines">
|
|
688
688
|
|
|
689
689
|
|
|
690
|
+
124
|
|
690
691
|
125
|
|
691
|
-
126
|
|
692
|
-
127</pre>
|
|
692
|
+
126</pre>
|
|
693
693
|
</td>
|
|
694
694
|
<td>
|
|
695
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
695
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 124</span>
|
|
696
696
|
|
|
697
697
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_menu_path'>menu_path</span>
|
|
698
698
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>menu.txt</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='const'>Nesta</span><span class='op'>::</span><span class='const'>Env</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='comma'>,</span> <span class='const'>Nesta</span><span class='op'>::</span><span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_content_path'>content_path</span> <span class='rparen'>)</span><span class='rparen'>)</span>
|
|
@@ -771,16 +771,16 @@ plugin -- of which I may write.</p>
|
|
|
771
771
|
<pre class="lines">
|
|
772
772
|
|
|
773
773
|
|
|
774
|
+
86
|
|
774
775
|
87
|
|
775
776
|
88
|
|
776
777
|
89
|
|
777
778
|
90
|
|
778
779
|
91
|
|
779
|
-
92
|
|
780
|
-
93</pre>
|
|
780
|
+
92</pre>
|
|
781
781
|
</td>
|
|
782
782
|
<td>
|
|
783
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
783
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 86</span>
|
|
784
784
|
|
|
785
785
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span>
|
|
786
786
|
<span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
@@ -840,12 +840,12 @@ plugin -- of which I may write.</p>
|
|
|
840
840
|
<pre class="lines">
|
|
841
841
|
|
|
842
842
|
|
|
843
|
+
117
|
|
843
844
|
118
|
|
844
|
-
119
|
|
845
|
-
120</pre>
|
|
845
|
+
119</pre>
|
|
846
846
|
</td>
|
|
847
847
|
<td>
|
|
848
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
848
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 117</span>
|
|
849
849
|
|
|
850
850
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write_menu'>write_menu</span> <span class='id identifier rubyid_params'>params</span>
|
|
851
851
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_menu_path'>menu_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>contents</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
|
@@ -860,7 +860,7 @@ plugin -- of which I may write.</p>
|
|
|
860
860
|
</div>
|
|
861
861
|
|
|
862
862
|
<div id="footer">
|
|
863
|
-
Generated on
|
|
863
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
864
864
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
865
865
|
0.8.2.1 (ruby-1.9.3).
|
|
866
866
|
</div>
|
|
@@ -249,10 +249,9 @@ it's a middleware.</p>
|
|
|
249
249
|
<div class="discussion">
|
|
250
250
|
|
|
251
251
|
<p>Override standard haml call to include special view location for admin
|
|
252
|
-
templates
|
|
253
|
-
it's a small price to pay.</p>
|
|
252
|
+
templates.</p>
|
|
254
253
|
|
|
255
|
-
<p>
|
|
254
|
+
<p>This can be overriden by themes which contain admin.haml and/or edit.haml</p>
|
|
256
255
|
|
|
257
256
|
|
|
258
257
|
</div>
|
|
@@ -284,15 +283,15 @@ it's a small price to pay.</p>
|
|
|
284
283
|
<pre class="lines">
|
|
285
284
|
|
|
286
285
|
|
|
286
|
+
70
|
|
287
287
|
71
|
|
288
|
-
72
|
|
289
|
-
73</pre>
|
|
288
|
+
72</pre>
|
|
290
289
|
</td>
|
|
291
290
|
<td>
|
|
292
|
-
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line
|
|
291
|
+
<pre class="code"><span class="info file"># File 'lib/nesta-plugin-admin/init.rb', line 70</span>
|
|
293
292
|
|
|
294
293
|
<span class='kw'>def</span> <span class='id identifier rubyid_admin_haml'>admin_haml</span> <span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
295
|
-
<span class='id identifier rubyid_haml'>haml</span> <span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>views:</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>../../views</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span
|
|
294
|
+
<span class='id identifier rubyid_haml'>haml</span> <span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>views:</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>../../views</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
296
295
|
<span class='kw'>end</span></pre>
|
|
297
296
|
</td>
|
|
298
297
|
</tr>
|
|
@@ -564,7 +563,7 @@ it's a middleware.</p>
|
|
|
564
563
|
</div>
|
|
565
564
|
|
|
566
565
|
<div id="footer">
|
|
567
|
-
Generated on
|
|
566
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
568
567
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
569
568
|
0.8.2.1 (ruby-1.9.3).
|
|
570
569
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
</div>
|
|
183
183
|
|
|
184
184
|
<div id="footer">
|
|
185
|
-
Generated on
|
|
185
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
186
186
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
187
187
|
0.8.2.1 (ruby-1.9.3).
|
|
188
188
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -63,10 +63,17 @@
|
|
|
63
63
|
|
|
64
64
|
<div id="content"><div id='filecontents'><h1>Nesta::Plugin::Admin</h1>
|
|
65
65
|
|
|
66
|
-
<h3><a href="http://
|
|
66
|
+
<h3><a href="http://jmervine.github.com/nesta-plugin-admin/doc/">Documentation</a></h3>
|
|
67
67
|
|
|
68
68
|
<p>An Admin interface for Nesta allowing currently allowing the following:</p>
|
|
69
69
|
|
|
70
|
+
<blockquote><p>Note: This is U-G-L-Y, as far as interfaces go. I am not an interface person.
|
|
71
|
+
If you would like a cleaner, prettier interface, feel free to fork and update.
|
|
72
|
+
If you do, please submit a pull request to me, I would like to make it better
|
|
73
|
+
looking.</p></blockquote>
|
|
74
|
+
|
|
75
|
+
<h3>Current Features:</h3>
|
|
76
|
+
|
|
70
77
|
<ol>
|
|
71
78
|
<li>Create new pages.</li>
|
|
72
79
|
<li>Edit existing pages.</li>
|
|
@@ -75,8 +82,22 @@
|
|
|
75
82
|
</ol>
|
|
76
83
|
|
|
77
84
|
|
|
78
|
-
<
|
|
79
|
-
|
|
85
|
+
<h3>Known Issues:</h3>
|
|
86
|
+
|
|
87
|
+
<ul>
|
|
88
|
+
<li>Admin interface is a bit wonky when using some themes.</li>
|
|
89
|
+
</ul>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<h3>TODOs:</h3>
|
|
93
|
+
|
|
94
|
+
<ul>
|
|
95
|
+
<li>Add config editor.</li>
|
|
96
|
+
<li>Add plugin viewer.</li>
|
|
97
|
+
<li>Add theme viewer and installer.</li>
|
|
98
|
+
<li>Add server restart? Maybe? Probably not, but maybe?</li>
|
|
99
|
+
</ul>
|
|
100
|
+
|
|
80
101
|
|
|
81
102
|
<h2>Installation</h2>
|
|
82
103
|
|
|
@@ -111,7 +132,7 @@
|
|
|
111
132
|
|
|
112
133
|
<ol>
|
|
113
134
|
<li><p>Restart your application.</p></li>
|
|
114
|
-
<li><p>Visit: <a href="http://">http
|
|
135
|
+
<li><p>Visit: <a href="http://YOURSITE/admin">http://YOURSITE/admin</a></p></li>
|
|
115
136
|
<li><p>Login</p></li>
|
|
116
137
|
<li><p>Happy Admining.</p></li>
|
|
117
138
|
</ol>
|
|
@@ -130,7 +151,7 @@
|
|
|
130
151
|
</div></div>
|
|
131
152
|
|
|
132
153
|
<div id="footer">
|
|
133
|
-
Generated on
|
|
154
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
134
155
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
135
156
|
0.8.2.1 (ruby-1.9.3).
|
|
136
157
|
</div>
|
data/doc/index.html
CHANGED
|
@@ -63,10 +63,17 @@
|
|
|
63
63
|
|
|
64
64
|
<div id="content"><div id='filecontents'><h1>Nesta::Plugin::Admin</h1>
|
|
65
65
|
|
|
66
|
-
<h3><a href="http://
|
|
66
|
+
<h3><a href="http://jmervine.github.com/nesta-plugin-admin/doc/">Documentation</a></h3>
|
|
67
67
|
|
|
68
68
|
<p>An Admin interface for Nesta allowing currently allowing the following:</p>
|
|
69
69
|
|
|
70
|
+
<blockquote><p>Note: This is U-G-L-Y, as far as interfaces go. I am not an interface person.
|
|
71
|
+
If you would like a cleaner, prettier interface, feel free to fork and update.
|
|
72
|
+
If you do, please submit a pull request to me, I would like to make it better
|
|
73
|
+
looking.</p></blockquote>
|
|
74
|
+
|
|
75
|
+
<h3>Current Features:</h3>
|
|
76
|
+
|
|
70
77
|
<ol>
|
|
71
78
|
<li>Create new pages.</li>
|
|
72
79
|
<li>Edit existing pages.</li>
|
|
@@ -75,8 +82,22 @@
|
|
|
75
82
|
</ol>
|
|
76
83
|
|
|
77
84
|
|
|
78
|
-
<
|
|
79
|
-
|
|
85
|
+
<h3>Known Issues:</h3>
|
|
86
|
+
|
|
87
|
+
<ul>
|
|
88
|
+
<li>Admin interface is a bit wonky when using some themes.</li>
|
|
89
|
+
</ul>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<h3>TODOs:</h3>
|
|
93
|
+
|
|
94
|
+
<ul>
|
|
95
|
+
<li>Add config editor.</li>
|
|
96
|
+
<li>Add plugin viewer.</li>
|
|
97
|
+
<li>Add theme viewer and installer.</li>
|
|
98
|
+
<li>Add server restart? Maybe? Probably not, but maybe?</li>
|
|
99
|
+
</ul>
|
|
100
|
+
|
|
80
101
|
|
|
81
102
|
<h2>Installation</h2>
|
|
82
103
|
|
|
@@ -111,7 +132,7 @@
|
|
|
111
132
|
|
|
112
133
|
<ol>
|
|
113
134
|
<li><p>Restart your application.</p></li>
|
|
114
|
-
<li><p>Visit: <a href="http://">http
|
|
135
|
+
<li><p>Visit: <a href="http://YOURSITE/admin">http://YOURSITE/admin</a></p></li>
|
|
115
136
|
<li><p>Login</p></li>
|
|
116
137
|
<li><p>Happy Admining.</p></li>
|
|
117
138
|
</ol>
|
|
@@ -130,7 +151,7 @@
|
|
|
130
151
|
</div></div>
|
|
131
152
|
|
|
132
153
|
<div id="footer">
|
|
133
|
-
Generated on
|
|
154
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
134
155
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
135
156
|
0.8.2.1 (ruby-1.9.3).
|
|
136
157
|
</div>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<div id="footer">
|
|
106
|
-
Generated on
|
|
106
|
+
Generated on Fri Aug 24 02:46:16 2012 by
|
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
108
108
|
0.8.2.1 (ruby-1.9.3).
|
|
109
109
|
</div>
|
|
@@ -62,14 +62,13 @@ module Nesta
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# Override standard haml call to include special view location for
|
|
65
|
-
# admin templates.
|
|
66
|
-
# views, but it's a small price to pay.
|
|
65
|
+
# admin templates.
|
|
67
66
|
#
|
|
68
|
-
#
|
|
67
|
+
# This can be overriden by themes which contain admin.haml and/or edit.haml
|
|
69
68
|
#
|
|
70
69
|
# @return [String] rendered html from haml
|
|
71
70
|
def admin_haml template, options={}
|
|
72
|
-
haml template, { views: File.expand_path('../../views', File.dirname(__FILE__))
|
|
71
|
+
haml template, { views: File.expand_path('../../views', File.dirname(__FILE__)) }.merge(options)
|
|
73
72
|
end
|
|
74
73
|
end
|
|
75
74
|
|
data/views/admin.haml
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
#admin_links
|
|
2
|
-
%a{:href=>"/admin/new"}new page
|
|
3
|
-
%br
|
|
4
|
-
%a{:href=>"/admin/menu"}edit menu
|
|
5
1
|
#admin_content
|
|
2
|
+
%h4.admin_links
|
|
3
|
+
%a{:href=>"/admin/new"}new page
|
|
4
|
+
|
|
|
5
|
+
%a{:href=>"/admin/menu"}edit menu
|
|
6
6
|
- @pages.each do |page|
|
|
7
|
-
%
|
|
7
|
+
%p.admin_page<
|
|
8
8
|
%a{:href=>"/admin/#{page.path_for_admin}"}>edit
|
|
9
9
|
|
|
|
10
10
|
%a{:href=>"/admin/#{page.path_for_admin}/delete"}<delete
|
|
11
11
|
|
|
12
12
|
="#{page.title_for_admin} (#{page.path_for_admin}.#{page.format})"
|
|
13
|
-
%br
|
|
14
|
-
|
data/views/edit.haml
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
%form{:action=>"/admin/#{@path||'new'}", :method=>"post"}
|
|
2
2
|
#admin_content
|
|
3
|
-
- unless @path == "menu"
|
|
4
|
-
%label Page Path:
|
|
5
|
-
%br
|
|
6
|
-
%input.path{:type=>'text',:name=>'path',:value=>@path||''}>
|
|
7
|
-
%select{:name=>"format"}
|
|
8
|
-
- Nesta::FileModel::FORMATS.each do |format|
|
|
9
|
-
%option{:value=>format, :selected=>(@format==format)}= format
|
|
10
|
-
%br
|
|
11
|
-
%small (ex: article-name)
|
|
12
|
-
#contents
|
|
13
3
|
- unless @path == "menu"
|
|
14
|
-
%
|
|
4
|
+
%h3 Page Path:
|
|
5
|
+
%input.path{:type=>'text',:name=>'path',:value=>@path||''}>
|
|
6
|
+
%select{:name=>"format"}
|
|
7
|
+
- Nesta::FileModel::FORMATS.each do |format|
|
|
8
|
+
%option{:value=>format, :selected=>(@format==format)}= format
|
|
15
9
|
%br
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
%small (ex: article-name)
|
|
11
|
+
%br
|
|
12
|
+
#contents
|
|
13
|
+
- unless @path == "menu"
|
|
14
|
+
%h3 Page Body:
|
|
15
|
+
%textarea{:name=>'contents'}= @content||''
|
|
16
|
+
#buttons
|
|
17
|
+
%input.button{ :type => "button", "value" => "Cancel!", :onclick => "top.location.href='/admin';" }
|
|
18
|
+
%input.button{ :type => "submit", "value" => "Save!" }
|
data/views/footer.haml
CHANGED
data/views/header.haml
CHANGED
data/views/layout.haml
CHANGED
|
@@ -2,27 +2,23 @@
|
|
|
2
2
|
%html(lang="en")
|
|
3
3
|
%head
|
|
4
4
|
%title Admin
|
|
5
|
-
<!--[if ! lte IE 6]><!-->
|
|
6
|
-
%link(href="#{path_to('/css/master.css')}" media="screen" rel="stylesheet")
|
|
7
|
-
<!--<![endif]-->
|
|
8
|
-
/[if lte IE 6]
|
|
9
|
-
%link(rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection")
|
|
10
|
-
/[if lt IE 9]
|
|
11
|
-
%script(src="//html5shim.googlecode.com/svn/trunk/html5.js")
|
|
12
|
-
- local_stylesheet_link_tag('local')
|
|
13
5
|
:css
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
body, h1, h2, h3, h4, h5, h6 {
|
|
7
|
+
font-family: Verdana, sans-serif;
|
|
16
8
|
}
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
.admin_links {
|
|
10
|
+
text-align: left;
|
|
11
|
+
}
|
|
12
|
+
#admin_content {
|
|
13
|
+
width: 800px;
|
|
14
|
+
margin: 0 auto;
|
|
19
15
|
}
|
|
20
16
|
textarea {
|
|
21
17
|
font-face: monospace;
|
|
22
18
|
font-size: 10pt;
|
|
23
19
|
height: 500px;
|
|
24
20
|
padding: 3px;
|
|
25
|
-
width:
|
|
21
|
+
width: 790px;
|
|
26
22
|
border: 1px solid #999;
|
|
27
23
|
border: inset 1px solid #333;
|
|
28
24
|
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
|
@@ -72,5 +68,5 @@
|
|
|
72
68
|
%br
|
|
73
69
|
= yield
|
|
74
70
|
%br
|
|
75
|
-
%br
|
|
76
71
|
= admin_haml :footer, :layout => false
|
|
72
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nesta-plugin-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-08-
|
|
12
|
+
date: 2012-08-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nesta
|