Skip to content

Commit

Permalink
Convert docs to markdown (#2080)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Jul 16, 2023
1 parent b79cb97 commit b6ad7bc
Show file tree
Hide file tree
Showing 62 changed files with 2,222 additions and 1,981 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Agile UI is the quickest way for building back-end UI, admin interfaces, data ma
[![GitHub release](https://img.shields.io/github/release/atk4/ui.svg)](CHANGELOG.md)
[![Code Climate](https://codeclimate.com/github/atk4/ui/badges/gpa.svg)](https://codeclimate.com/github/atk4/ui)

Quick-Links: [Documentation](https://agile-ui.readthedocs.io). [Demo-site](https://ui.agiletoolkit.org). [ATK Data](https://github.com/atk4/data). [Forum](https://forum.agiletoolkit.org/). [Chat](https://gitter.im/atk4/atk4). [Commercial support](https://www.agiletoolkit.org/contact).
Quick-Links: [Documentation](https://atk4-ui.readthedocs.io/). [Demo-site](https://ui.atk4.org/). [ATK Data](https://github.com/atk4/data). [Forum](https://forum.agiletoolkit.org/). [Chat](https://gitter.im/atk4/atk4). [Commercial support](https://www.agiletoolkit.org/contact).

## How does Agile Toolkit work?

Expand All @@ -41,7 +41,7 @@ Many companies use Agile Toolkit to implement admin interface and in some cases

### How does it work?

Download from www.agiletoolkit.org or Install ATK UI with `composer require atk4/ui`
Download from https://ui.atk4.org/ or install ATK UI with `composer require atk4/ui`

Create "index.php" file with:

Expand Down Expand Up @@ -78,7 +78,7 @@ ATK UI relies on https://fomantic-ui.com CSS framework to render the form beauti

To get most of ATK UI, use [ATK Data](https://github.com/atk4/data) to describe your business models such as "User" or "Purchase". When you define models, you can start using some more advanced components:

[Crud](https://ui.agiletoolkit.org/demos/crud.php) is a fully-interactive component that supports pagination, reloading, conditions, data formatting, sorting, quick-search, ordering, custom actions and modals, but at the same time is very easy to use:
[Crud](https://ui.atk4.org/demos/crud.php) is a fully-interactive component that supports pagination, reloading, conditions, data formatting, sorting, quick-search, ordering, custom actions and modals, but at the same time is very easy to use:

```php
$app = new \Atk4\Ui\App(['title' => 'hello world']);
Expand Down Expand Up @@ -173,7 +173,7 @@ Another component implementation using a very friendly PHP syntax:

![wizard](docs/images/wizard.png)

You get most benefit when you use various ATK UI Components together. Try the following demo: https://ui.agiletoolkit.org/demos/interactive/wizard.php. The demo implements:
You get most benefit when you use various ATK UI Components together. Try the following demo: https://ui.atk4.org/demos/interactive/wizard.php. The demo implements:

- Multi-step wizard with ability to navigate forward and backward
- Form with validation
Expand Down Expand Up @@ -220,7 +220,7 @@ The result is here:

Agile UI comes with many built-in components:

_All components can be view using the [demos](https://ui.agiletoolkit.org/demos/) application._
_All components can be view using the [demos](https://ui.atk4.org/demos/) application._

| Component | Description | Introduced |
| --------- | ----------- | ---------- |
Expand Down Expand Up @@ -272,9 +272,9 @@ External and 3rd party components may be subject to different licensing terms.

ATK UI makes active use of ATK Core and ATK Data frameworks.

- [Agile UI Documentation](https://agile-ui.readthedocs.io)
- [Agile Data Documentation](https://agile-data.readthedocs.io)
- [Agile Core Documentation](https://agile-core.readthedocs.io)
- [Agile UI Documentation](https://atk4-ui.readthedocs.io/)
- [Agile Data Documentation](https://atk4-data.readthedocs.io/)
- [Agile Core Documentation](https://atk4-core.readthedocs.io/)

## ATK UI Schematic

Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
"authors": [
{
"name": "Romans Malinovskis",
"email": "[email protected]",
"homepage": "https://nearly.guru/"
},
{
"name": "Alain Belair",
"homepage": "https://agiletoolkit.org/"
"name": "Alain Belair"
},
{
"name": "Imants Horsts",
Expand Down
2 changes: 1 addition & 1 deletion demos/form-control/input2.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

$control = $form->addControl('surname', new Form\Control\Line([
'hint' => [View::class, 'template' => new HtmlTemplate(
'Click <a href="http://example.com/" target="_blank">here</a>'
'Click <a href="https://example.com/" target="_blank">here</a>'
)],
]));

Expand Down
4 changes: 2 additions & 2 deletions demos/others/sticky.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ protected function renderView(): void
Button::addTo($app, [$app->url('other.php')]);
Button::addTo($app, [$app->url('other')]);
Button::addTo($app, [$app->url(['other', 'b' => 2])]);
Button::addTo($app, [$app->url('http://yahoo.com/')]);
Button::addTo($app, [$app->url('http://yahoo.com/?q=abc')]);
Button::addTo($app, [$app->url('http://google.com/')]);
Button::addTo($app, [$app->url('http://google.com/?q=abc')]);

// unset app/global sticky
$app->stickyForget('xx');
Expand Down
28 changes: 17 additions & 11 deletions docs/accordion.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.. php:namespace:: Atk4\Ui
:::{php:namespace} Atk4\Ui
:::

.. php:class:: Accordion
:::{php:class} Accordion
:::

# Accordion

Accordion implement another way to organize your data. The implementation is based on: https://fomantic-ui.com/modules/accordion.html.


Demo: https://ui.agiletoolkit.org/demos/accordion.php
Demo: https://ui.atk4.org/demos/accordion.php

## Basic Usage

Expand All @@ -17,7 +18,6 @@ Once you create an Accordion container you can then mix and match static and dyn
$acc = Accordion::addTo($app);
```


Adding a static content section is pretty simple:

```
Expand All @@ -26,11 +26,12 @@ LoremIpsum::addTo($acc->addSection('Static Tab'));

You can add multiple elements into a single accordion section, like any other view.

.. php:method:: addSection($name, $action = null, $icon = 'dropdown')
:::{php:method} addSection($name, $action = null, $icon = 'dropdown')
:::

Use addSection() method to add more section in an Accordion view. First parameter is a title of the section.

Section can be static or dynamic. Dynamic sections use :php:class:`VirtualPage` implementation mentioned above.
Section can be static or dynamic. Dynamic sections use {php:class}`VirtualPage` implementation mentioned above.
You should pass Closure action as a second parameter.

Example:
Expand All @@ -49,7 +50,7 @@ $t->addSection('Dynamically Loading', function (VirtualPage $vp) {

## Dynamic Accordion Section

Dynamic sections are based around implementation of :php:class:`VirtualPage` and allow you
Dynamic sections are based around implementation of {php:class}`VirtualPage` and allow you
to pass a callback which will be triggered when user clicks on the section title.:

```
Expand All @@ -65,9 +66,14 @@ $acc->addSection('Dynamic Lorem Ipsum', function (VirtualPage $vp) {

Accordion class has some wrapper method in order to control the accordion module behavior.

.. php:method:: jsOpen($section, $action = null)
.. php:method:: jsToggle($section, $action = null)
.. php:method:: jsClose($section, $action = null)
:::{php:method} jsOpen($section, $action = null)
:::

:::{php:method} jsToggle($section, $action = null)
:::

:::{php:method} jsClose($section, $action = null)
:::

For example, you can set a button that, when clicked, will toggle an accordion section:

Expand Down
15 changes: 9 additions & 6 deletions docs/advanced.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.. _advanced:
:::{php:namespace} Atk4\Ui
:::

(advanced)=

# Advanced Topics

Expand All @@ -23,11 +26,11 @@ it appears as requirement.
Most of the ORMs lack several important features that are necessary
for UI framework design:

- ability to load/store data safely with conditions.
- built-in support for column meta-information
- field, type and table mapping
- "onlyFields" support for efficient querying
- domain-level model references.
- ability to load/store data safely with conditions.
- built-in support for column meta-information
- field, type and table mapping
- "onlyFields" support for efficient querying
- domain-level model references.

Agile Data is distributed under same open-source license as Agile UI
and the rest of this documentation will assume you are using Agile
Expand Down
Loading

0 comments on commit b6ad7bc

Please sign in to comment.