view release on metacpan or search on metacpan
lib/Ado/Command/adduser.pm view on Meta::CPAN
package Ado::Command::adduser;
use Mojo::Base 'Ado::Command';
use Getopt::Long qw(GetOptionsFromArray);
use Time::Piece qw();
use Time::Seconds;
has description => 'Add and edit users';
has usage => sub { shift->extract_usage };
#define some defaults
has args => sub {
my $t = time;
{ changed_by => 1,
created_by => 1,
disabled => 1,
#TODO: add funcionality for notifying users on account expiration
lib/Ado/Manual/FiveMinutes.pod view on Meta::CPAN
Start Ado in development mode.
cd ~/ado
morbo -w ./lib -w ./site_templates -w templates bin/ado
You should see:
Server available at http://127.0.0.1:3000
Open a new terminal window and create a markdown file that will contain your first
article. Or edit one of the already existing sample files there.
touch ~/ado/public/articles/my_article.md
vim ~/ado/public/articles/my_article.md
Eventually add a link to the newly created file (but with .html extension) to
the menu containing links to the articles which are "published". Copy the menu
template so it is not overwritten when you upgrade Ado.
mkdir -p ~/ado/site_templates/articles
cp ~/ado/templates/articles/menu.html.ep ~/ado/site_templates/articles/
#edit ~/ado/site_templates/articles/menu.html.ep
<a href="/articles/hello.html" class="item">ÐÑÑоÑиÑ</a>
<a href="/articles/ala/bala.html" class="item">FooBar</a>
<!-- Add the next line to the templte. -->
<a href="/articles/my_article.html" class="item">My Article</a>
Go to L<http://127.0.0.1:3000/articles/my_article.html>. Nice!
Enable caching of articles. The generated HTML will be stored as plain static
files which will be served automatically on every next request.
lib/Ado/Manual/Plugins.pod view on Meta::CPAN
CREATE INDEX blog_published ON blog(published);
CREATE INDEX blog_deleted ON blog(deleted);
=item * Add some dummy records.
INSERT INTO blog(title,body,user_id,group_id)
VALUES('Hey','Hello world',3,3);
INSERT INTO blog(title,body,user_id,group_id)
VALUES('Hey You','Hello Universe',3,3);
=item * Generate the files for the plugin. These are the files which you will edit :).
$ cd ~/opt/public_dev
$ ado generate adoplugin -n Blog --crud -t blog
The above command will generate the needed files for an ado plugin which can
even be uploaded to and subsequently downloaded from
L<CPAN|http://www.cpan.org/>. L<CPAN> is the best open source dependency
management system. You can also use L<Stratopan|https://stratopan.com/> if you
wish.
lib/Ado/Plugin/Auth.pm view on Meta::CPAN
over => [authenticated => 1, ingroup => 'admin']
);
#in etc/ado.$mode.conf or etc/plugins/foo.$mode.conf
routes => [
#...
{
route => '/ado-users/:action:id',
via => [qw(PUT DELETE)],
# only authenticated users can edit and delete users,
# and only if they are authorized to do so
over => [authenticated => 1, ingroup => 'admin'],
to =>'ado-users#edit'
}
],
=head2 ingroup
Checks if a user is in the given group. Returns true or false.
# in etc/plugins/routes.conf or etc/plugins/foo.conf
{
route => '/vest',
lib/Ado/Plugin/I18n.pm view on Meta::CPAN
This method is passed as reference to be used as L<Mojolicious/around_action>.
# Add hook around_action
$app->hook(around_action => \&around_action);
=head1 TODO
Create a table with message entries which will be loaded by this plugin.
Create user interface to add/edit entries.
=head1 SEE ALSO
L<Locale::Maketext>, L<Ado::Plugin>, L<Ado::Manual::Plugins>,
L<Mojolicious::Plugins>,
L<Mojolicious::Plugin>, L<Mojolicious::Guides::Routing/Conditions>
=head1 SPONSORS
The original author
public/doc/bg/groups.md view on Meta::CPAN
#ÐÑÑпи
<div class="ui hidden">
Ðко ÑеÑеÑе Ñази ÑÑÑаниÑа извÑн /help/bg/*, вÑÑзкиÑе в Ð½ÐµÑ Ð½Ñма да ÑабоÑÑÑ!
If you read this page out of /help/bg/* the links in it will not work!
</div>
ÐоÑÑÑпÑÑ Ð´Ð¾ инÑоÑмаÑÐ¸Ñ Ð¸ ÑÑнкÑионалноÑÑ Ð² Ado е оÑганизиÑан на ниво гÑÑпи и [поÑÑебиÑели](/help/bg/users.md).
Редна Ado ÑиÑÑема може да има пÑакÑиÑеÑки неогÑаниÑено колиÑеÑÑво гÑÑпи.
ЧÑез ÑÑÑ
можеÑе Ñ Ð³Ð¾Ð»Ñма ÑоÑноÑÑ Ð´Ð° опÑеделÑÑе вÑзможниÑе дейÑÑÐ²Ð¸Ñ Ð½Ð° вÑеки поÑÑебиÑел на ÑиÑÑемаÑа.
РазлиÑна ÑÑепен на доÑÑÑп може да бÑде даден на оÑделни гÑÑпи. ÐапÑÐ¸Ð¼ÐµÑ Ð¿Ð¾ÑÑебиÑелиÑе, пÑинадлежаÑи кÑм гÑÑпаÑа _editors_ Ð¼Ð¾Ð³Ð°Ñ Ð´Ð° ÑедакÑиÑа...
public/doc/en/intro.md view on Meta::CPAN
1. Configuration file with most of the sensible settings in place, such as controller_class, name-spaces for routes (urls), name-spaces for plugins and commands, session settings, default routes...
2. Ado plugins work the same way as Mojolicious::Plugins and share the same common base trough Ado::Plugin. But they have one small additional feature. They can load their own configuration from `$ENV{MOJO_HOME}/etc/plugins/plugin_name.conf`. Busines...
By default the following plugins are enabled:
1. All Mojolicious plugins which are otherwise enabled by default.
2. Mojolicious::Plugin::Charset â UTF-8.
3. Mojolicious::Plugin::DSC â a plugin which integrates DBIx::Simple::Class in the application. DBIx::Simple::Class is a very lightweight object-relational mapper based on DBIx::Simple. It abstracts the SQL from the programmer still allowing to...
4. Ado::Plugin::Auth is a plugin that authenticates users to an Ado system. Users can be authenticated locally or using (TODO!) Facebook, Google, Twitter and other authentication service-providers. A pre-made login form can be used directly or as a...
5. Ado::Plugin::MarkdownRenderer - Render static files in markdown format. One can create a personal blog or enterprise wiki using static files in markdown format.
3. The following libraries for user-interface development are used:
1. Semantic UI â a CSS and JS framework for development of mobile-ready layouts. Its usage also results in more clean HTML than other popular frameworks.
2. PageDown is the version of Attacklab's Showdown and WMD as used on Stack Overflow and the other Stack Exchange sites. It includes a converter that turns Markdown into HTML, a Markdown editor with realtime preview of the generated HTML, and a few...
4. The following Ado specific commands are available:
1. Ado::Command::adduser allows adding users to an Ado application via a terminal. It also allows adding users to existing or not existing groups. The new group is automatically created.
2. Ado::Command::version shows version information for installed core and optional modules.
1. Last but not least, Ado code is well covered with tests. Special care is taken to avoid accumulating technical debt by having Test::Perl::Critic tests set to level âharshâ. This way the coding style is forced to be consistent across the framew...
Here is how an Ado system looks like from architectural point of view:

##Installation/Deployment
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
// If `options.helpButton` isn't given, not help button is created.
// `options.strings` can have any or all of the same properties as
// `defaultStrings` above, so you can just override some string displayed
// to the user on a case-by-case basis, or translate all strings to
// a different language.
//
// For backwards compatibility reasons, the `options` argument can also
// be just the `helpButton` object, and `strings.help` can also be set via
// `helpButton.title`. This should be considered legacy.
//
// The constructed editor object has the methods:
// - getConverter() returns the markdown converter object that was passed to the constructor
// - run() actually starts the editor; should be called after all necessary plugins are registered. Calling this more than once is a no-op.
// - refreshPreview() forces the preview to be updated. This method is only available after run() was called.
Markdown.Editor = function (markdownConverter, idPostfix, options) {
options = options || {};
if (typeof options.handler === "function") { //backwards compatible behavior
options = { helpButton: options };
}
options.strings = options.strings || {};
if (options.helpButton) {
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
if (nLinesAfter === undefined) {
nLinesAfter = 1;
}
nLinesBefore++;
nLinesAfter++;
var regexText;
var replacementText;
// chrome bug ... documented at: http://meta.stackoverflow.com/questions/63307/blockquote-glitch-in-editor-in-chrome-6-and-7/65985#65985
if (navigator.userAgent.match(/Chrome/)) {
"X".match(/()./);
}
this.selection = this.selection.replace(/(^\n*)/, "");
this.startTag = this.startTag + re.$1;
this.selection = this.selection.replace(/(\n*$)/, "");
this.endTag = this.endTag + re.$1;
public/vendor/pagedown/Markdown.Editor.js view on Meta::CPAN
}
};
this.processingTime = function () {
return elapsedTime;
};
var isFirstTimeFilled = true;
// IE doesn't let you use innerHTML if the element is contained somewhere in a table
// (which is the case for inline editing) -- in that case, detach the element, set the
// value, and reattach. Yes, that *is* ridiculous.
var ieSafePreviewSet = function (text) {
var preview = panels.preview;
var parent = preview.parentNode;
var sibling = preview.nextSibling;
parent.removeChild(preview);
preview.innerHTML = text;
if (!sibling)
parent.appendChild(preview);
else