Permalink
Browse files

Merge branch 'master' into footer-reorg

Conflicts:
	root/static/js/wiki.js
  • Loading branch information...
2 parents 49f36c9 + fd2dea3 commit a096b9e982eb422d041d630321ed1f9bf3175def @autarch autarch committed Aug 1, 2009
Showing with 2,778 additions and 1,872 deletions.
  1. +19 −0 Changes
  2. +8 −0 lib/MojoMojo.pm
  3. +1 −1 lib/MojoMojo/Controller/Admin.pm
  4. +11 −5 lib/MojoMojo/Controller/Attachment.pm
  5. +2 −0 lib/MojoMojo/Controller/Page.pm
  6. +21 −26 lib/MojoMojo/Controller/PageAdmin.pm
  7. +24 −20 lib/MojoMojo/I18N/ca.js.po
  8. +241 −177 lib/MojoMojo/I18N/ca.po
  9. +25 −17 lib/MojoMojo/I18N/de.js.po
  10. +252 −160 lib/MojoMojo/I18N/de.po
  11. +24 −20 lib/MojoMojo/I18N/en.js.po
  12. +233 −197 lib/MojoMojo/I18N/en.po
  13. +25 −17 lib/MojoMojo/I18N/es.js.po
  14. +252 −160 lib/MojoMojo/I18N/es.po
  15. +24 −20 lib/MojoMojo/I18N/fr.js.po
  16. +249 −161 lib/MojoMojo/I18N/fr.po
  17. +24 −20 lib/MojoMojo/I18N/ja.js.po
  18. +230 −194 lib/MojoMojo/I18N/ja.po
  19. +25 −17 lib/MojoMojo/I18N/no.js.po
  20. +250 −158 lib/MojoMojo/I18N/no.po
  21. +25 −17 lib/MojoMojo/I18N/pl.js.po
  22. +256 −148 lib/MojoMojo/I18N/pl.po
  23. +25 −17 lib/MojoMojo/I18N/ru.js.po
  24. +250 −158 lib/MojoMojo/I18N/ru.po
  25. +1 −1 lib/MojoMojo/Schema/Result/Page.pm
  26. +17 −0 lib/MojoMojo/View/TT.pm
  27. +2 −10 mojomojo.conf
  28. +3 −1 root/base/admin/toplinks.tt
  29. +15 −0 root/base/admin/user.tt
  30. +6 −1 root/base/attachments/list.tt
  31. +112 −96 root/base/edithelp/markdown.tt
  32. +3 −5 root/base/mimetypes/image.tt
  33. +12 −23 root/base/navbar.tt
  34. +12 −2 root/base/page/attachments.tt
  35. +1 −1 root/base/page/edit.tt
  36. +30 −8 root/base/page/info.tt
  37. +9 −0 root/base/page/inline_image.tt
  38. +10 −0 root/base/page/list.tt
  39. +6 −2 root/base/page/recent.tt
  40. +8 −8 root/static/js/wiki.js
  41. +19 −4 root/static/mojomojo.css
  42. +9 −0 root/static/themes/default/theme.css
  43. +7 −0 script/mojomojo_spawn_db.pl
View
@@ -17,6 +17,25 @@
- The "insert link" option for an attachment went to a slightly broken version of the edit form (Dave Rolsky)
- Attachments are now viewable without going to the edit form first (Dave Rolsky)
- The gallery link was broken (Dave Rolsky)
+ - The users list in the admin section only showed the first 20
+ users. Added paging links so you can browse all of them
+ (Dave Rolsky)
+ - The users list now shows active users first (Dave Rolsky)
+ - Reorganized the navigation menus to try to group site-wide
+ and page-specific options together. Top-level menu links
+ (like Recent and Tags) are now always site-wide. For
+ path-specific versions, go to the "Sub pages" view of a
+ path. (Dave Rolsky)
+ - Recent changes now shows user's names, not their logins (Dave Rolsky)
+ - Revised MultiMarkdown syntax help tips (Dave Rolsky)
+ - The edit page incorrectly labeled a button "Create and View"
+ for a page that only had one revision, when it should have
+ been labeled "Save and View" (Dave Rolsky)
+ - Removed the delete action, which was broken with Pg, and not
+ checking permissions (Dave Rolsky)
+ - mojomojo_spawn_db won't attempt deploy if db already exists (mateu)
+ - Exit MojoMojo on startup attempt if mojomojo_spawn_db.pl was not run (mateu)
+ - The revisions list is now a nicely formatted table (Dave Rolsky)
0.999031 2009-07-26 15:00:00
- Sane default for fastmmap sharefile.
View
@@ -73,6 +73,14 @@ MojoMojo->config(
MojoMojo->setup();
+# Check that we've spawned a DB.
+eval { MojoMojo->model('DBIC')->schema->resultset('MojoMojo::Schema::Result::Person')->count };
+if ($@ ) {
+ print "
+ ERROR. Looks like you need to DEPLOY A DATABASE.
+ Run: script/mojomojo_spawn_db.pl\n\n";
+ exit();
+}
MojoMojo->model('DBIC')->schema->attachment_dir( MojoMojo->config->{attachment_dir}
|| MojoMojo->path_to('uploads') . '' );
@@ -121,7 +121,7 @@ sub user : Local {
{
page => $c->req->param('page') || 1,
rows => 20,
- order_by => 'active, login'
+ order_by => 'active desc, login'
}
);
$c->stash->{users} = $iterator;
@@ -26,7 +26,6 @@ Permission control for mojomojo pages.
sub auth : Private {
my ( $self, $c ) = @_;
- $c->detach('/user/login') unless $c->stash->{user};
my $perms =
$c->check_permissions( $c->stash->{'path'},
@@ -82,13 +81,20 @@ sub check_file : Private {
sub flash_upload : Local {
my ( $self, $c ) = @_;
- my $user=$c->model('DBIC::Person')->find($c->req->params->{id});
- $c->detach('/default') unless( $user->hashed($c->pref('entropy')) eq $c->req->params->{verify} );
+
+ my $user = $c->model('DBIC::Person')->find( $c->req->params->{id} );
+
+ $c->detach('/default')
+ unless (
+ $user->hashed( $c->pref('entropy') ) eq $c->req->params->{verify} );
+
$c->forward('check_file');
- if ($c->res->redirect) {
- $c->res->redirect(undef,200);
+
+ if ( $c->res->redirect ) {
+ $c->res->redirect( undef, 200 );
return $c->res->body('1');
}
+
$c->res->body('0');
}
@@ -444,6 +444,8 @@ children and descendants, links to/from, attachments.
sub info :Global {
my ( $self, $c ) = @_;
+ warn $c->stash->{page}->versions;
+ warn $c->stash->{page}->versions_rs;
$c->stash->{body_length} = length( $c->stash->{page}->content->body );
$c->stash->{template} = 'page/info.tt';
}
@@ -175,20 +175,27 @@ sub edit : Global FormConfig {
# this will always happen on the initial request
$stash->{page} = $page;
- if ( $c->req->params->{insert_attachment} ) {
- my $saved_stash = $stash;
-
- my $attachment = $c->model("DBIC::Attachment")
- ->find( $c->req->params->{insert_attachment} );
-
- $c->stash( { att => $attachment } );
-
- my $insert_text = $c->view('TT')->render( $c, 'page/insert.tt' );
- $insert_text =~ s/^\s+|\s+$//;
-
- $c->stash($saved_stash);
-
- $page->content->body( $page->content->body . "\n\n" . $insert_text . "\n" );
+ # Insert an attachment, or inline an image.
+ my %attachment_template = (
+ insert_attachment => 'page/insert.tt',
+ inline_image_attachment => 'page/inline_image.tt',
+ );
+ foreach my $attachment_action ( keys %attachment_template ) {
+ if (my $attachment_id = $c->req->query_params->{$attachment_action} ) {
+ my $saved_stash = $stash;
+
+ my $attachment = $c->model("DBIC::Attachment")
+ ->find( { id => $attachment_id } );
+
+ $c->stash( { att => $attachment } );
+
+ my $insert_text = $c->view('TT')->render( $c, $attachment_template{$attachment_action} );
+ $insert_text =~ s/^\s+|\s+$//;
+
+ $c->stash($saved_stash);
+
+ $page->content->body( $page->content->body . "\n\n" . $insert_text . "\n\n" );
+ }
}
}
} # end sub edit
@@ -282,18 +289,6 @@ sub rollback : Global {
}
}
-=head2 delete
-
-This action will delete a page.
-
-=cut
-
-sub delete : Global {
- my ( $self, $c, $page ) = @_;
- $c->stash->{page}->delete;
- $c->forward('/page/view');
-}
-
=head1 AUTHOR
Marcus Ramberg <mramberg@cpan.org>
@@ -27,11 +27,11 @@ msgstr "També intenti h2, h3, i més"
msgid "Bigger"
msgstr ""
-#: root/static/js/edit.js:133
+#: root/static/js/edit.js:133 root/static/js/edit.js:159
msgid "Block quote"
msgstr ""
-#: root/static/js/edit.js:138 root/static/js/edit.js:159
+#: root/static/js/edit.js:138 root/static/js/edit.js:161
msgid "Bold"
msgstr "Negreta"
@@ -43,19 +43,19 @@ msgstr ""
msgid "Centered paragraph"
msgstr "Paràgraf centrat"
-#: root/static/js/edit.js:132
+#: root/static/js/edit.js:132 root/static/js/edit.js:160
msgid "Code"
msgstr "Codi"
-#: root/static/js/edit.js:140 root/static/js/edit.js:161
+#: root/static/js/edit.js:140 root/static/js/edit.js:163
msgid "Deleted Text"
msgstr "Text Suprimit"
#: root/static/js/edit.js:131 root/static/js/edit.js:158
msgid "Enum list"
msgstr ""
-#: root/static/js/edit.js:146 root/static/js/edit.js:163
+#: root/static/js/edit.js:146 root/static/js/edit.js:165
msgid "External Link"
msgstr ""
@@ -71,11 +71,15 @@ msgstr ""
msgid "Insert"
msgstr ""
-#: root/static/js/edit.js:145 root/static/js/edit.js:162
+#: root/static/js/edit.js:145 root/static/js/edit.js:164
msgid "Internal Link"
msgstr "Enllaç Intern"
-#: root/static/js/edit.js:139 root/static/js/edit.js:160
+#: root/static/js/edit.js:145 root/static/js/edit.js:164
+msgid "Intrawiki Link"
+msgstr ""
+
+#: root/static/js/edit.js:139 root/static/js/edit.js:162
msgid "Italic"
msgstr "Cursiva"
@@ -95,7 +99,7 @@ msgstr ""
msgid "Main heading"
msgstr ""
-#: root/static/js/edit.js:188
+#: root/static/js/edit.js:190
msgid "Mark some text to apply the toolbar actions to that text"
msgstr ""
@@ -107,15 +111,15 @@ msgstr ""
msgid "POD formatter"
msgstr ""
-#: root/static/js/edit.js:148 root/static/js/edit.js:165
+#: root/static/js/edit.js:148 root/static/js/edit.js:167
msgid "Picture"
msgstr "Fotos"
-#: root/static/js/edit.js:149 root/static/js/edit.js:166
+#: root/static/js/edit.js:149 root/static/js/edit.js:168
msgid "Picture Right"
msgstr ""
-#: root/static/js/edit.js:147 root/static/js/edit.js:164
+#: root/static/js/edit.js:147 root/static/js/edit.js:166
msgid "Picture left"
msgstr ""
@@ -151,15 +155,15 @@ msgstr ""
msgid "bigger"
msgstr ""
-#: root/static/js/edit.js:138 root/static/js/edit.js:159
+#: root/static/js/edit.js:138 root/static/js/edit.js:161
msgid "bold"
msgstr "negreta"
#: root/static/js/edit.js:136
msgid "centered paragraph"
msgstr ""
-#: root/static/js/edit.js:132
+#: root/static/js/edit.js:132 root/static/js/edit.js:160
msgid "code"
msgstr "codi"
@@ -171,7 +175,7 @@ msgstr ""
msgid "cpan"
msgstr ""
-#: root/static/js/edit.js:140 root/static/js/edit.js:161
+#: root/static/js/edit.js:140 root/static/js/edit.js:163
msgid "deleted"
msgstr "suprimit"
@@ -187,7 +191,7 @@ msgstr ""
msgid "increase # for smaller headline"
msgstr ""
-#: root/static/js/edit.js:139 root/static/js/edit.js:160
+#: root/static/js/edit.js:139 root/static/js/edit.js:162
msgid "italic"
msgstr "cursiva"
@@ -199,6 +203,10 @@ msgstr ""
msgid "left justified paragraph"
msgstr ""
+#: root/static/js/edit.js:146 root/static/js/edit.js:165
+msgid "linked text"
+msgstr ""
+
#: root/static/js/wiki.js:479
msgid "maximize"
msgstr ""
@@ -207,7 +215,7 @@ msgstr ""
msgid "maximize width"
msgstr ""
-#: root/static/js/edit.js:133
+#: root/static/js/edit.js:133 root/static/js/edit.js:159
msgid "quote"
msgstr ""
@@ -239,10 +247,6 @@ msgstr ""
msgid "toc"
msgstr ""
-#: root/static/js/edit.js:163
-msgid "url inside paranthesis"
-msgstr ""
-
#: root/static/js/edit.js:108
msgid "youtube"
msgstr ""
Oops, something went wrong. Retry.

0 comments on commit a096b9e

Please sign in to comment.