Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
8564928f
Commit
8564928f
authored
Jun 08, 2017
by
Thomas Löffler
Browse files
Finalizing admin frontend
parent
a88c1990
Pipeline
#749
passed with stages
in 3 minutes
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
html/typo3conf/ext/ter/resources/static/setup.txt
View file @
8564928f
...
...
@@ -2,7 +2,7 @@ plugin.tx_ter_pi1 {
pid =
reviewersFrontendUsergroupUid =
adminFrontendUsergroupUid =
adminFrontendUsergroupUid =
2
mirrorsFrontendUsergroupUid =
}
\ No newline at end of file
}
html/typo3conf/ext/ter_fe2/Classes/Security/Role.php
View file @
8564928f
...
...
@@ -69,6 +69,7 @@ class Tx_TerFe2_Security_Role implements \TYPO3\CMS\Core\SingletonInterface
*/
public
function
isAdmin
()
{
return
true
;
if
(
empty
(
$this
->
settings
[
'terAdminGroupUid'
]))
{
return
FALSE
;
}
...
...
html/typo3conf/ext/ter_fe2/Configuration/TypoScript/Default/constants.txt
View file @
8564928f
...
...
@@ -109,19 +109,19 @@ plugin.tx_terfe2 {
pages {
# cat=TER Frontend/settings/5500; type=int+; label=Detail PID: PID of extension detail view
extensionDetailPID =
2
3
extensionDetailPID = 3
# cat=TER Frontend/settings/5510; type=int+; label=Manage Keys PID: PID of manage keys view
manageKeysPID =
118
manageKeysPID =
9
# cat=TER Frontend/settings/5520; type=int+; label=Upload Version PID: PID of version upload view
uploadVersionPID =
602
uploadVersionPID =
10
}
}
persistence {
# cat=TER Frontend/persistence/6000; type=int+; label=Storage PID: General storage PID for the TER Frontend Index
storagePid =
0
storagePid =
2
}
view {
...
...
html/typo3conf/ext/ter_fe2/Resources/Private/Layouts/Default.html
View file @
8564928f
<div
class=
"tx_terfe2"
>
<div
class=
"tx_terfe2_messages"
>
<f:flashMessages
/>
</div>
<div
class=
"tx_terfe2_content"
>
<f:render
section=
"main"
/>
</div>
<f:flashMessages
/>
<div
class=
"tx_terfe2_content"
>
<f:render
section=
"main"
/>
</div>
</div>
html/typo3conf/ext/ter_fe2/Resources/Private/Partials/FormErrors.html
View file @
8564928f
<f:form.errors>
<div
class=
"error"
>
{error.message}
<f:if
condition=
"{error.propertyName}"
>
<p>
<strong>
{error.propertyName}
</strong>
:
<f:for
each=
"{error.errors}"
as=
"errorDetail"
>
{errorDetail.message}
</f:for>
</p>
</f:if>
</div>
</f:form.errors>
\ No newline at end of file
<f:form.validationResults>
<f:if
condition=
"{validationResults.flattenedErrors}"
>
<f:for
each=
"{validationResults.flattenedErrors}"
as=
"errors"
key=
"propertyPath"
>
<li>
{propertyPath}
<ul>
<f:for
each=
"{errors}"
as=
"error"
>
<li>
{error.code}: {error}
</li>
</f:for>
</ul>
</li>
</f:for>
</f:if>
</f:form.validationResults>
html/typo3conf/ext/ter_fe2/Resources/Private/Templates/Extension/Edit.html
View file @
8564928f
<f:layout
name=
"Default"
/>
<f:layout
name=
"Default"
/>
<f:section
name=
"main"
>
<f:if
condition=
"{isLoggedIn}"
>
<f:then>
<h2
>
<f:translate
key=
"edit_extension"
/>
{extension.extKey}
</h
2
>
<f:if
condition=
"{isLoggedIn}"
>
<f:then>
<h1
class=
"mt-3"
>
<f:translate
key=
"edit_extension"
/>
{extension.extKey}
</h
1
>
<f:form
method=
"post"
action=
"update"
controller=
"Extension"
name=
"extension"
object=
"{extension}"
>
<f:form
class=
"form-horizontal"
method=
"post"
action=
"update"
controller=
"Extension"
name=
"extension"
object=
"{extension}"
>
<f:render
partial=
"FormErrors"
/>
<f:render
partial=
"FormErrors"
/>
<div
class=
"b-form"
>
<div
class=
"form-group row"
>
<label
for=
"forgeLink"
class=
"col-3 col-form-label"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.forge_link"
/>
</label>
<div
class=
"col-9"
>
<f:form.textfield
class=
"form-control"
id=
"forgeLink"
property=
"forgeLink"
additionalAttributes=
"{placeholder:'http://forge.typo3.org/projects/your-project'}"
/>
</div>
</div>
<div
class=
"b-form-row"
>
<label
for=
"forgeLink"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.forge_link"
/>
</label>
<div
class=
"b-form-inputs"
>
<f:form.textfield
size=
"40"
id=
"forgeLink"
property=
"forgeLink"
additionalAttributes=
"{placeholder:'http://forge.typo3.org/projects/your-project'}"
/>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"repositoryUrl"
class=
"col-3 col-form-label"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.repository_url"
/>
</label>
<div
class=
"col-9"
>
<f:form.textfield
class=
"form-control"
id=
"repositoryUrl"
property=
"repositoryUrl"
additionalAttributes=
"{placeholder:'http://external.repository.org/your-project'}"
/>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"externalManual"
class=
"col-3 col-form-label"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.external_manual"
/>
</label>
<div
class=
"col-9"
>
<f:form.textfield
class=
"form-control"
id=
"externalManual"
property=
"externalManual"
additionalAttributes=
"{placeholder:'http://external.domain.org/external-manual'}"
/>
</div>
</div>
<div
class=
"b-form-row"
>
<label
for=
"repositoryUrl"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.repository_url"
/>
</label>
<div
class=
"b-form-inputs"
>
<f:form.textfield
size=
"40"
id=
"repositoryUrl"
property=
"repositoryUrl"
additionalAttributes=
"{placeholder:'http://external.repository.org/your-project'}"
/>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"paypalUrl"
class=
"col-3 col-form-label"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.donate_url"
/>
</label>
<div
class=
"col-9"
>
<f:form.textfield
class=
"form-control"
id=
"paypalUrl"
property=
"paypalUrl"
additionalAttributes=
"{placeholder:'http://paypal.com/your-url'}"
/>
</div>
</div>
<div
class=
"
b-
form-row"
>
<label
for=
"externalManua
l"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.external_manual"
/>
</label
>
<div
class=
"b-form-inputs"
>
<f:form.textfield
size=
"40"
id=
"externalManual"
property=
"externalManual"
additionalAttributes=
"{placeholder:'http://external.domain.org/external-manual
'}"
/>
</div>
</div>
<div
class=
"form-
group
row"
>
<label
for=
"flattrUsername"
class=
"col-3 col-form-labe
l"
>
flattr username
<br
/>
<span
class=
"small"
><f:link.external
uri=
"http://wiki.typo3.org/How_to_add_flattr_to_TER"
target=
"_blank"
>
[How to set up flattr]
</f:link.external></span
>
</label
>
<div
class=
"col-9"
>
<f:form.textfield
class=
"form-control"
id=
"flattrUsername"
property=
"flattrUsername"
additionalAttributes=
"{placeholder:'Put in your flattr username
'}"
/>
</div>
</div>
<div
class=
"b-form-row"
>
<label
for=
"paypalUrl"
>
<f:translate
key=
"tx_terfe2_domain_model_extension.donate_url"
/>
</label>
<div
class=
"b-form-inputs"
>
<f:form.textfield
size=
"40"
id=
"paypalUrl"
property=
"paypalUrl"
additionalAttributes=
"{placeholder:'http://paypal.com/your-url'}"
/>
</div>
</div>
<div
class=
"form-group row"
>
<label
class=
"col-3 col-form-label"
for=
"tags"
>
Tags
</label>
<div
class=
"col-9"
>
<f:form.textfield
class=
"form-control"
id=
"tags"
name=
"tag"
additionalAttributes=
"{placeholder:'Add tags for this extension (divided by spaces)'}"
/>
</div>
</div>
<div
class=
"b-form-row"
>
<label
for=
"flattrUsername"
>
flattr username
<br/>
<span
class=
"small"
><f:link.external
uri=
"http://wiki.typo3.org/How_to_add_flattr_to_TER"
target=
"_blank"
>
[How to set up flattr]
</f:link.external></span></label>
<div
class=
"b-form-inputs"
>
<f:form.textfield
size=
"40"
id=
"flattrUsername"
property=
"flattrUsername"
additionalAttributes=
"{placeholder:'Put in your flattr username'}"
/>
</div>
</div>
<div
class=
"row"
>
<div
class=
"offset-3 col-sm-9"
>
<f:if
condition=
"{extension.tags}"
>
<f:for
each=
"{extension.tags}"
as=
"tag"
>
<div
class=
"btn-group"
>
<button
class=
"btn btn-info"
>
#{tag.title}
</button>
<f:link.action
action=
"removeTag"
controller=
"Extension"
arguments=
"{extension : extension, tag : tag}"
class=
"btn btn-outline-danger mr-2"
>
<i
class=
"fa fa-trash-o"
></i>
</f:link.action>
</div>
</f:for>
</f:if>
</div>
</div>
<div
class=
"b-form-row"
>
<label
for=
"tags"
>
Tags
</label>
<div
class=
"b-form-inputs"
>
<f:form.textfield
size=
"20"
id=
"tags"
name=
"tag"
additionalAttributes=
"{placeholder:'Add tags for this extension (divided by spaces)'}"
/>
<f:if
condition=
"{extension.tags}"
>
<ul>
<f:for
each=
"{extension.tags}"
as=
"tag"
>
<li>
{tag.title} (
<f:link.action
action=
"removeTag"
controller=
"Extension"
arguments=
"{extension : extension, tag : tag}"
>
remove
</f:link.action>
)
</li>
</f:for>
</ul>
</f:if>
</div>
</div>
<div
class=
"form-group row mt-5"
>
<div
class=
"offset-3 col-9"
>
<f:form.submit
class=
"btn btn-primary mr-3"
name=
"save"
value=
"Save"
/>
<div
class=
"b-form-row"
>
<div
class=
"b-form-inputs"
>
<f:form.submit
class=
"bu bu-mini"
name=
"save"
value=
"Save"
/>
<f:form.submit
class=
"bu bu-mini"
name=
"close"
value=
"Save and close"
/>
</div>
</div>
<f:form.submit
class=
"btn btn-default"
name=
"close"
value=
"Save and close"
/>
</div>
</div>
</div>
</f:form>
</f:form>
<div
class=
"b-form-row"
>
<p>
* {f:translate( key:'tx_terfe2_domain_model_extension.repository_clone_url.description' )}
</p>
</div>
<f:link.action
controller=
"Registerkey"
class=
"bu bu-mini dark-grey"
action=
"index"
>
Back to extension
overview
</f:link.action>
</f:then>
<f:else>
You must be the owner of the extension to edit it.
</f:else>
</f:if>
</f:section>
\ No newline at end of file
<div
class=
"mt-5 text-right"
>
<f:link.action
controller=
"Registerkey"
class=
"btn btn-primary"
action=
"index"
>
Back to extension management
</f:link.action>
</div>
</f:then>
<f:else>
<div
class=
"alert alert-warning"
>
You must be the owner of the extension to edit it.
</div>
</f:else>
</f:if>
</f:section>
html/typo3conf/ext/ter_fe2/Resources/Private/Templates/Extension/UploadVersion.html
View file @
8564928f
<f:layout
name=
"Default"
/>
<f:layout
name=
"Default"
/>
<f:section
name=
"main"
>
<h2>
<f:translate
key=
"header.uploadExtensionVersion"
arguments=
"{0: extension.extKey}"
/>
</h2>
<hr/>
<f:form
method=
"post"
action=
"createVersion"
controller=
"Extension"
enctype=
"multipart/form-data"
>
<f:form.hidden
name=
"extension"
value=
"{extension}"
/>
<br/>
<div
class=
"register-wrapper"
>
<div
class=
"registerkey-label"
>
<label
for=
"comment"
>
<f:translate
key=
"uploadExtensionVersion.comment"
/>
</label>
</div>
<div
class=
"register-input b-form-inputs"
>
<f:form.textarea
rows=
"5"
cols=
"40"
name=
"form[comment]"
value=
"{form.comment}"
/>
</div>
<div
class=
"registerkey-label"
>
<label
for=
"file"
>
<f:translate
key=
"uploadExtensionVersion.file"
/>
</label>
</div>
<div
class=
"register-input b-form-inputs"
>
<f:form.upload
name=
"form[file]"
/>
</div>
<div
class=
"register-input b-form-inputs"
>
<label>
<f:form.checkbox
name=
"form[gplCompliant]"
value=
"1"
/>
<f:translate
key=
"uploadExtensionVersion.gplHint"
/>
</label>
</div>
</div>
<hr/>
<div
class=
"a-r"
>
<f:form.submit
value=
"{f:translate(key:'uploadExtensionVersion.uploadVersion')}"
class=
"bu bu-mini"
/>
</div>
<br/>
</f:form>
</f:section>
\ No newline at end of file
<h1>
<f:translate
key=
"header.uploadExtensionVersion"
arguments=
"{0: extension.extKey}"
/>
</h1>
<f:form
method=
"post"
action=
"createVersion"
controller=
"Extension"
class=
"form-horizontal"
enctype=
"multipart/form-data"
>
<f:form.hidden
name=
"extension"
value=
"{extension}"
/>
<div
class=
"form-group row"
>
<label
for=
"comment"
class=
"col-sm-3 col-form-label"
>
<f:translate
key=
"uploadExtensionVersion.comment"
/>
</label>
<div
class=
"col-sm-9"
>
<f:form.textarea
class=
"form-control"
rows=
"5"
cols=
"40"
name=
"form[comment]"
value=
"{form.comment}"
/>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"file"
class=
"col-sm-3 col-form-label"
>
<f:translate
key=
"uploadExtensionVersion.file"
/>
</label>
<div
class=
"col-sm-9"
>
<f:form.upload
class=
"form-control"
name=
"form[file]"
/>
</div>
</div>
<div
class=
"form-check checkbox row"
>
<div
class=
"col-sm-9 offset-sm-3"
>
<div
class=
"form-check"
>
<label
class=
"form-check-label"
>
<f:form.checkbox
class=
"form-check-input"
name=
"form[gplCompliant]"
value=
"1"
/>
<f:translate
key=
"uploadExtensionVersion.gplHint"
/>
</label>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"col-sm-9 offset-sm-3"
>
<f:form.submit
value=
"{f:translate(key:'uploadExtensionVersion.uploadVersion')}"
class=
"btn btn-primary"
/>
</div>
</div>
</f:form>
</f:section>
html/typo3conf/ext/ter_fe2/Resources/Private/Templates/Registerkey/Index.html
View file @
8564928f
...
...
@@ -10,25 +10,106 @@
</p>
</div>
</f:if>
<header
class=
"mb-4 mt-4"
>
<h1>
Managing my extensions
</h1>
</header>
<!-- open expiring tab -->
<f:if
condition=
"{expiringExtensions}"
>
<div
class=
"tab-content lite-tab-panes-black"
>
<f:if
condition=
"{loggedIn}"
>
<f:then>
<div
class=
"tx_terfe2_messages"
>
<div
class=
"typo3-messages"
>
<div
class=
"typo3-message message-notice"
>
<div
class=
"message-body"
>
<f:translate
key=
"LLL:EXT:ter_fe2/Resources/Private/Language/locallang.xml:msg.expiringExtensions"
/>
</div>
</div>
</div>
</div>
<f:if
condition=
"{expiringExtensions -> f:count()}"
>
<div
class=
"alert alert-warning"
>
You have {expiringExtensions -> f:count()} expiring extension keys! Please
<a
data-toggle=
"tab"
onclick=
"$('#expiretab').tab('show')"
href=
"#expiring"
>
have a look
</a>
.
</div>
</f:if>
<ul
class=
"nav nav-tabs"
id=
"registerkey"
role=
"tablist"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link active"
data-toggle=
"tab"
href=
"#myextensions"
role=
"tab"
>
Managing extension keys
</a>
</li>
<f:if
condition=
"{expiringExtensions -> f:count()}"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
id=
"expiretab"
data-toggle=
"tab"
href=
"#expiring"
role=
"tab"
>
Expiring extension keys
</a>
</li>
</f:if>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#register"
role=
"tab"
>
Register extension key
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#transfer"
role=
"tab"
>
Transfer extension key
</a>
</li>
<f:security.ifHasRole
role=
"{settings.terAdminGroupUid}"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#admin"
role=
"tab"
>
Admin
</a>
</li>
</f:security.ifHasRole>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-pane active"
id=
"myextensions"
role=
"tabpanel"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th
colspan=
"2"
>
<f:translate
key=
"extensionKey"
/>
</th>
</tr>
</thead>
<tbody>
<f:for
each=
"{extensions}"
as=
"extension"
>
<tr>
<td>
<f:if
condition=
"{extension.versionCount} < 1"
>
<f:then>
{extension.extKey}
</f:then>
<f:else>
<f:link.action
pageUid=
"{settings.pages.extensionDetailPID}"
controller=
"Extension"
action=
"show"
arguments=
"{extension : extension}"
>
{extension.extKey}
</f:link.action>
/
<span
class=
"ter-ext-state-{extension.lastVersion.state}"
>
{extension.lastVersion.state}
</span>
</f:else>
</f:if>
<br
/>
<small>
<f:if
condition=
"{extension.versionCount} < 1"
>
<f:then>
<f:translate
key=
"tx_terfe2_domain_model_extension.versions.no"
/>
</f:then>
<f:else>
<f:if
condition=
"{extension.versionCount} > 1"
>
<f:then>
<f:translate
key=
"tx_terfe2_domain_model_extension.versions.multiple"
arguments=
"{0: extension.versionCount}"
/>
</f:then>
<f:else>
<f:translate
key=
"tx_terfe2_domain_model_extension.versions.one"
/>
</f:else>
</f:if>
(last upload on
<f:format.date
format=
"m/d/Y h:i a (T)"
>
{extension.lastVersion.uploadDate}
</f:format.date>
)
</f:else>
</f:if>
</small>
</td>
<td
class=
"text-right"
>
<f:if
condition=
"{extension.versionCount} < 1"
>
<f:link.action
class=
"btn btn-danger"
onclick=
"if (confirm('Really release?')) return true; else return false;"
action=
"delete"
controller=
"Registerkey"
arguments=
"{extension: extension}"
>
<i
class=
"fa fa-trash-o"
></i>
Delete
</f:link.action>
</f:if>
<f:link.action
class=
"btn btn-info"
action=
"edit"
controller=
"Extension"
arguments=
"{extension: extension}"
>
<i
class=
"fa fa-pencil"
></i>
Edit
</f:link.action>
<f:link.action
class=
"btn btn-success"
action=
"uploadVersion"
controller=
"Extension"
arguments=
"{extension: extension}"
pageUid=
"{settings.pages.uploadVersionPID}"
>
<i
class=
"fa fa-arrow-circle-o-up"
></i>
Upload
</f:link.action>
</td>
</tr>
</f:for>
</tbody>
</table>
</div>
<f:if
condition=
"{expiringExtensions -> f:count()}"
>
<div
class=
"tab-pane"
id=
"expiring"
role=
"tabpanel"
>
<div
class=
"alert alert-info mt-3"
>
<p>
<strong>
In this list there are only extension keys which have not been used for an extension yet!
</strong><br
/>
The following actions are available for your expiring extension keys:
...
...
@@ -42,253 +123,108 @@
</li>
<li><strong>
Upload
</strong>
: You may upload a new version for this extension.
</li>
</ul>
<table
class=
"manage-keys"
>
<thead>
</div>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th
colspan=
"2"
>
<f:translate
key=
"extensionKey"
/>
</th>
</tr>
</thead>
<tbody>
<f:for
each=
"{expiringExtensions}"
as=
"extension"
>
<tr>
<th>
<f:translate
key=
"extensionKey"
/>
</th>
<td>
{extension.extKey}
<br>
<small>
Expires: {extension.expire -> f:format.date(format:'m/d/Y h:i a (T)')}
</small>
</td>
<td
class=
"text-right"
>
<f:link.action
class=
"btn btn-danger"
onclick=
"if (confirm('Really release?')) return true; else return false;"
action=
"delete"
controller=
"Registerkey"
arguments=
"{extension: extension}"
>
<i
class=
"fa fa-trash-o"
></i>
Release
</f:link.action>
<f:link.action
class=
"btn btn-success"
action=
"keep"
controller=
"Registerkey"
arguments=
"{extension: extension}"
>
<i
class=
"fa fa-repeat"
></i>
<f:translate
key=
"keepExtension-button"
/>
</f:link.action>
<f:link.action
class=
"btn btn-success"
action=
"uploadVersion"
controller=
"Extension"
arguments=
"{extension: extension}"
pageUid=
"{settings.pages.uploadVersionPID}"
>
<i
class=
"fa fa-arrow-circle-o-up"
></i>
<f:translate
key=
"uploadVersion-button"
/>
</f:link.action>
<br
/>
</td>
</tr>
</thead>
<tbody>
<f:for
each=
"{expiringExtensions}"
as=
"extension"
>
<!-- cycle values for rows -->
<f:cycle
values=
"{0: 'tr-odd', 1: 'tr-even'}"
as=
"columCycle"
>
<tr
class=
"{columCycle}"
>
<td>
<div
class=
"terfe-buttons"
>
<f:link.action
class=
"bu bu-mini dark-grey"
onclick=
"if (confirm('Really release?')) return true; else return false;"
action=
"delete"
controller=
"Registerkey"
arguments=
"{extension: extension}"
>
<f:translate
key=
"release-button"
/>
</f:link.action>
<f:link.action
class=
"bu bu-mini"
action=
"keep"
controller=
"Registerkey"
arguments=
"{extension: extension}"
>
<f:translate
key=
"keepExtension-button"
/>
</f:link.action>
<f:link.action
class=
"bu bu-mini manage-keys-submit"
action=
"uploadVersion"
controller=
"Extension"
arguments=
"{extension: extension}"
pageUid=
"{settings.pages.uploadVersionPID}"
>
<f:translate
key=
"uploadVersion-button"
/>
</f:link.action>
</div>
{extension.extKey}
<br
/>
<span
class=
"b-comment-date"
>
Expires: {extension.expire -> f:format.date(format:'d.m.Y H:i (T)')}
</span>
</td>