Skip to content

Commit d7ee12f

Browse files
authored
Merge branch 'main' into pe7er-patch-1
2 parents 647588e + ed7a75a commit d7ee12f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1517
-393
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# User-defined Hide Table Columns
2+
All the core components have a button that lets the user decide which columns of a table to display.
3+
4+
## Adding Hide Table Columns to your component
5+
Adding this functionality to your own component is very simple and is usually a simple case of adding the code below to the `tmpl` file for the table.
6+
7+
### Check if you are you using WebAssetManager
8+
Look for this line of code in the php block at the top of your `tmpl` file.
9+
```
10+
$wa = $this->document->getWebAssetManager();
11+
```
12+
13+
### Already using WebAssetManager
14+
Add the following line to your existing code.
15+
16+
```
17+
useScript('table.columns')
18+
```
19+
20+
Note the line ending. Your final code will look similar to this example
21+
22+
```
23+
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
24+
$wa = $this->document->getWebAssetManager();
25+
$wa->useScript('table.columns')
26+
->useScript('multiselect');
27+
```
28+
29+
### Not using WebAssetManager (yet)
30+
Add the following code anywhere in the php block at the top of your `tmpl` file.
31+
32+
```
33+
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
34+
$wa = $this->document->getWebAssetManager();
35+
$wa->useScript('table.columns');
36+
```
37+
38+
### Note
39+
Your table will need to be a valid html table with a `<thead>` and each column a `<th>`.

docs/changelog/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
sidebar_position: 1000
3+
---
4+
5+
Changes to the CMS and the API
6+
==============================
7+
8+
The deprecations and code changes are version independent and can be found in the
9+
[migration](/migrations) sections in this documentation.

docs/code-migration/310-40/index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/code-migration/42-43/index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/code-migration/43-44/new-deprecations.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/code-migration/44-50/new-deprecations.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/code-migration/44-50/removed-backward-incompatibility.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/code-migration/index.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/get-started/git.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/get-started/git/git-basics.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
sidebar_position: 1
3+
title: "Git Basics"
4+
---
5+
6+
## Selected Git Features
7+
8+
This brief introduction to Git uses the command line to illustrate some of its features. If you want to try it out, download and install Git on your laptop or workstation: [git-scm.com](https://git-scm.com/).
9+
10+
### Repositories
11+
12+
A repository is a place where all of the changes in a project are stored. In the simplest case this is a folder named .git in the same folder as the project source files. To get started, create an empty folder, make it the current directory with `cd` and then try this command:
13+
14+
```
15+
git init .
16+
```
17+
18+
which should result in confirmation that an empty Git repository has been created in a hidden folder named .git (folders starting with a period(.) are usually left out of listings so you don't see them, hence hidden).
19+
20+
You may also use a remote repository on another computer, which is where GitHub comes in. That will be covered in separate articles.
21+
22+
Create some content with a text editor and save it in the source folder, the one containing the .git repo (the word repo is often used as a short form of repository). In this article this markdown document, aptly named git.md, is used as an example document. Confirm what you have with a list command:
23+
24+
```
25+
ls -al
26+
total 8
27+
drwxr-xr-x 4 ceford staff 128 26 Aug 07:02 .
28+
drwxr-xr-x+ 99 ceford staff 3168 26 Aug 06:31 ..
29+
drwxr-xr-x 9 ceford staff 288 26 Aug 07:02 .git
30+
-rw-r--r-- 1 ceford staff 1689 26 Aug 07:10 git.md
31+
```
32+
33+
You can look at the contents of the .git folder if you wish but as a rule you should not make any changes there yourself. Let the git commands do the work. You can delete the .git folder if you wish without affecting the source text but you will lose any history of changes.
34+
35+
### Staging
36+
37+
The next step is to issue a command to add a source file to the index of files that git keeps track of:
38+
39+
```
40+
git add git.md
41+
```
42+
43+
There is no response to that command - git just does it.
44+
45+
### Commit
46+
47+
The commit command tells git to record all changes made to the source files so far:
48+
49+
```
50+
git commit -m "Text entered as far as Commit"
51+
```
52+
53+
To which the response is:
54+
55+
```
56+
[master (root-commit) 913815c] Text entered as far as Commit
57+
1 file changed, 45 insertions(+)
58+
create mode 100644 git.md
59+
```
60+
61+
That strange number, 913815c, is the commit **id** that allows git to keep track of that particular point in history. The text in quotes is the commit message - it should be a short informative description of the changes made in that commit.
62+
63+
### Branch
64+
65+
Suppose you want to try a new feature but you are not sure whether you will use it. Or, you are working on a collaborative project and you want to change something contributed by others. This is where branching comes in. You make a branch of your repo, checkout the branch, make your changes and then decide what to do. Try this:
66+
67+
```
68+
git branch --list
69+
* master
70+
```
71+
72+
The list command indicates that this repo has only one branch, named master. Try these commands:
73+
74+
```
75+
git branch myfix
76+
git checkout myfix
77+
git branch --list
78+
master
79+
* myfix
80+
```
81+
The list shows that there are now two branches and the * indicates that the myfix branch is checked out as the current branch. I can now go ahead and make changes to the myfix branch without affecting the existing content of the master branch. If I decide to use the changes I need to commit them and then either merge the myfix branch into my master branch or ask my collaborator to merge my myfix branch into his master branch.
82+
83+
When the branch is finished with, by being merged or abandoned, it can be deleted.
84+
85+
## Full Documentation
86+
87+
Git has many more commands and options. Mostly you don't need to know them because your IDE handles them for you with Menu items. If you want to look up what a menu item does try this source:
88+
89+
[Git Documentation](https://git-scm.com/doc)
90+
91+
If you have been experimenting, remember you can delete the repo (.git) and you will be left with your source files as you see them in your editor.
92+
93+
## Using an IDE
94+
95+
One final point: your chosen IDE will not put any IDE specific content in your git repo. It follows that you can change your IDE and expect it to work equally well with your existing repo.

0 commit comments

Comments
 (0)