Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
e7364d5c
Commit
e7364d5c
authored
7 years ago
by
Giovannoni Laurent
Browse files
Options
Downloads
Patches
Plain Diff
FEAT choose version to update
parent
263fc251
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install/view/update_download_view.php
+57
-2
57 additions, 2 deletions
install/view/update_download_view.php
with
57 additions
and
2 deletions
install/view/update_download_view.php
+
57
−
2
View file @
e7364d5c
...
...
@@ -15,6 +15,25 @@
* @version $Revision$
* @ingroup install
*/
//retrives tags
$client
=
new
\Gitlab\Client
(
'https://labs.maarch.org/api/v4/'
);
//$client->authenticate('aSecretToken', \Gitlab\Client::AUTH_URL_TOKEN);
// $project = $client->api('projects')->show('12');
// var_dump($project);
$tags
=
$client
->
api
(
'tags'
)
->
all
(
'12'
);
//var_dump($tags);
//retrieve current version
$db
=
new
Database
();
$query
=
"select param_value_int, param_value_string from parameters where id = 'database_version'"
;
$stmt
=
$db
->
query
(
$query
,
[]);
$currentVersion
=
$stmt
->
fetchObject
();
// var_dump($currentVersion);
?>
<script>
function
launchProcess
(
...
...
@@ -60,13 +79,49 @@
<table>
<tr>
<td>
<?php
echo
_LAST_RELEASE_VERSION
;
?>
<?php
echo
_YOUR_VERSION
;
?>
</td>
<td>
:
</td>
<td>
<?php
echo
_BRANCH_VERSION
.
':'
.
$currentVersion
->
param_value_int
.
' '
.
_TAG_VERSION
.
':'
.
$currentVersion
->
param_value_string
;
?>
</td>
</tr>
<tr>
<td>
<?php
echo
_CHOOSE_VERSION_TO_UPDATE
;
?>
</td>
<td>
:
</td>
<td>
<input
type=
"text"
id=
"version"
name=
"version"
value=
"17.06-RC.05.29"
/>
<?php
if
(
count
(
$tags
)
>
0
)
{
?>
<select
id=
"version"
id=
"name"
>
<option
value=
"default"
>
Select a version
</option>
<?php
foreach
(
$tags
as
$key
=>
$value
)
{
echo
$tags
[
$key
][
'name'
]
.
'<br />'
;
echo
'<option '
;
echo
'value="'
.
$tags
[
$key
][
'name'
]
.
'"'
;
echo
'>'
;
echo
$tags
[
$key
][
'name'
];
echo
'</option>'
;
}
?>
</select>
<?php
}
else
{
?>
No version available for update
<?php
}
?>
</td>
</tr>
<tr>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment