Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UI to remove empty pages, and add guidance where needed. #234

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Packeton - Private PHP package repository for vendors.
| Patch Mirroring metadata | Support. UI metadata manager | - |
| Incoming webhooks | Support. Full compatibility with packagist.org and its integrations | Support. Used unique uuid address |
| Outgoing webhooks | Full Support. Custom UI request builder with expressions | Support. Request payload format is not configurable |
| Subrepositories | Support | Support |
| Sub-repositories | Support | Support |
| LDAP | Support. On config level | Support |
| Dependency License Review | - | Support |
| Security Monitoring | Support. Webhook notifications | Support. Webhook/email notifications |
Expand Down
2 changes: 1 addition & 1 deletion public/packeton/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ a.loading, a:has(> .btn.loading ) {
}

.packages .package-item {
padding: 5px 15px;
padding: 1em 1em 0;
margin-bottom: 10px;
background: #fff;
border-radius: 4px;
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/CustomerUserType.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void

$builder
->add('subReposView', ChoiceType::class, [
'label' => 'Allowed subrepositories',
'label' => 'Allowed sub-repositories',
'multiple' => true,
'required' => false,
'choices' => $subRepos,
Expand Down
7 changes: 3 additions & 4 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@

{% if subReposData is not empty and app.user %}
<div class="btn-group navbar-brand-dropdown">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" title="Change current subrepository">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" title="Change current sub-repository">
{{ subReposData['current']|capitalize }}
</a>
<ul class="dropdown-menu">
<li><a href="{{ path('subrepository_switch_root') }}">Switch subrepository</a></li>
<li><a href="{{ path('subrepository_switch_root') }}">Switch sub-repository</a></li>
<li role="separator" class="divider"></li>

{% for repo in subReposData['repos'] %}
Expand All @@ -71,8 +71,7 @@

{% if isAdmin %}
<li role="separator" class="divider"></li>
<li><a href="{{ path('subrepository_create') }}" style="font-weight: 900"><i class="fa fa-plus-square-o"></i>
Create subrepository</a></li>
<li><a href="{{ path('subrepository_create') }}" style="font-weight: 900"><i class="fa fa-plus-square-o"></i>Create sub-repository</a></li>
{% endif %}
</ul>
</div>
Expand Down
25 changes: 16 additions & 9 deletions templates/group/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
{% extends "layout.html.twig" %}

{% block title %}{{ 'menu.my_users'|trans }} - {{ parent() }}{% endblock %}

{% block content %}
<section class="row">
<form name="search" method="get" action="{{ path('groups_index') }}" id="search--group-form" autocomplete="off">
<div class="sortable row">
<div class="col-xs-12 js-search-field-wrapper col-md-9">
<input type="search" id="search_group_group" name="search_group" autocomplete="off" placeholder="Search group by name..." tabindex="1" class=" form-control" value="{{ searchGroup }}">
<h2 class="title">{{ 'menu.my_groups'|trans }}</h2>
</section>
<section class="row">
<div class="col-xs-12 col-md-9">
<form name="search" method="get" action="{{ path('groups_index') }}" id="search--group-form" autocomplete="off">
<div class="sortable row">
<div class="js-search-field-wrapper">
<input type="search" id="search_group_group" name="search_group" autocomplete="off" placeholder="Search group by name..." tabindex="1" class=" form-control" value="{{ searchGroup }}">
</div>
</div>
</div>
</form>
</form>
</div>
<div class="pull-right">
<a class="btn btn-default" href="{{ path('groups_create') }}">Create group</a>
</div>
</section>
<div style="float:right; margin: 20px">
<a class="btn btn-default" href="{{ path('groups_create') }}">Create group</a>
</div>
<section class="row">
<ul class="packages list-unstyled">
{% for group in groups %}
Expand Down
49 changes: 23 additions & 26 deletions templates/integration/connect.html.twig
Original file line number Diff line number Diff line change
@@ -1,45 +1,42 @@
{% extends "layout.html.twig" %}

{% block title %}Integration Connect - {{ parent() }}{% endblock %}
{% block title %}{{ 'integration.avaible_integrations'|trans }} - {{ parent() }}{% endblock %}

{% block content %}
<section class="row">
<div class="col-md-12">
<h2 style="text-align: center">Available integrations</h2>

<h2 class="title">{{ 'integration.avaible_integrations'|trans }}</h2>
<p>
To use OAuth2 API synchronization with on-premises versions of GitHub, Bitbucket, Gitea or GitLab you need
Authorizing Packeton APP with your account remote VCS account.
To use OAuth2 API synchronization with on-premises versions of GitHub, Bitbucket, Gitea or GitLab,
you need an authorizing Packeton APP with your account remote VCS account.
You can also use them to login to Packeton via OAuth2.
</p>

<p>
Packeton use Symfony Http client, if you need to change http preference you may configure it globally
<a href="https://symfony.com/doc/current/http_client.html">https://symfony.com/doc/current/http_client.html</a>
</p>
<br>

{% for integration in integrations %}
{% set config = integration.getConfig(null, true) %}

<div style="padding-bottom: 55px; max-width: 700px; display: flex; justify-content: space-between">
<div>
{% if config.logo %}
<img src="{{ config.logo }}" height="40" alt="connect">
{% endif %}
<b>{{ config.title ?? config.name }}</b>
<div class="form-group">
<label class="link-gray">Redirect Urls</label>
<textarea class="form-control" readonly rows="4" style="width: 450px;">{{ config.redirectUrls|join("\n") }}</textarea>
<ul class="packages user-grid list-unstyled">
{% for integration in integrations %}
{% set config = integration.getConfig(null, true) %}
<li class="row">
<div class="col-xs-12 package-item">
<a class="btn btn-primary pull-right" href="/oauth2/github/setup">Connect</a>
<div class="s-flex">
{% if config.logo %}
<img height="40" src="{{ config.logo }}" alt="ref">
{% endif %}
<h4 class="tab-cell">{{ config.title ?? config.name }}</h4>
</div>
<div class="form-group" style="padding-top: 1em">
<label class="link-gray col-sm-2">Redirect Urls</label>
<textarea class="form-control" readonly rows="4" style="width: 450px;">{{ config.redirectUrls|join("\n") }}</textarea>
</div>
</div>
</div>

<div>
<a class="btn btn-primary" style="margin-top: 5rem" href="{{ path('oauth_integration', {'alias': config.name}) }}">Connect</a>
</div>
</div>
{% endfor %}

</li>
{% endfor %}
</ul>
</div>
</section>
{% endblock %}
59 changes: 34 additions & 25 deletions templates/integration/list.html.twig
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
{% extends "layout.html.twig" %}

{% block title %}Integrations - {{ parent() }}{% endblock %}
{% block title %}{{ 'integration.title'|trans }} - {{ parent() }}{% endblock %}

{% block content %}
<section class="row">
<a href="{{ path('integration_connect') }}" class="btn btn-primary" style="float: right">Install Integration</a>
<br>
<br>
<h2 class="title">{{ 'integration.title'|trans }}</h2>
<div class="col">
<div style="float:right">
<a class="btn btn-default" href="{{ path('integration_connect') }}">{{ 'integration.install_integration'|trans }}</a>
</div>
<p style="max-width: 65%">{{ 'integration.guide'|trans|raw }}</p>
</div>

<div style="padding-top: 10px; clear: both"></div>

{% if integrations|length > 0 %}
<ul class="packages user-grid list-unstyled">
{% for integration in integrations %}
{% set apps = integration.findApps() %}
{% set config = integration.config() %}
{% for oauth in apps %}
{% set viewPath = path('integration_index', {'alias': config.name, 'id': oauth.id }) %}
<ul class="packages user-grid list-unstyled">
{% for integration in integrations %}
{% set apps = integration.findApps() %}
{% set config = integration.config() %}
{% for oauth in apps %}
{% set viewPath = path('integration_index', {'alias': config.name, 'id': oauth.id }) %}

<li data-url="{{ viewPath }}" class="row">
<div class="col-xs-12 package-item">
<div class="row" style="margin: 6px 12px;">
<div class="s-flex">
<a href="{{ viewPath }}" class="s-flex no-underline link-gray-dark">
{% if config.logo %}
<img height="40" src="{{ config.logo }}" alt="ref">
{% endif %}
<h4 class="tab-cell">{{ config.title ?? config.name }}</h4>
</a>
</div>
{% include 'integration/info_app.html.twig' %}
<li data-url="{{ viewPath }}" class="row">
<div class="col-xs-12 package-item">
<div class="row" style="margin: 6px 12px;">
<div class="s-flex">
<a href="{{ viewPath }}" class="s-flex no-underline link-gray-dark">
{% if config.logo %}
<img height="40" src="{{ config.logo }}" alt="ref">
{% endif %}
<h4 class="tab-cell">{{ config.title ?? config.name }}</h4>
</a>
</div>
{% include 'integration/info_app.html.twig' %}
</div>
</li>
{% endfor %}
</div>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% else %}
<p>{{ 'integration.nothing_yet'|trans }}</p>
{% endif %}
</section>
{% endblock %}
10 changes: 6 additions & 4 deletions templates/proxies/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{% extends "layout.html.twig" %}

{% block title %}Proxies - {{ parent() }}{% endblock %}
{% block title %}{{ 'proxies_and_mirroring.title'|trans }} - {{ parent() }}{% endblock %}

{% block content %}
<section class="row">
<h2>Proxies and Mirroring</h2><hr>
<h2 class="title">{{ 'proxies_and_mirroring.title'|trans }}</h2>

<div style="padding-top: 10px; clear: both"></div>

{% if proxies|length > 0 %}
<ul class="packages user-grid list-unstyled">
{% for proxy in proxies %}
Expand Down Expand Up @@ -41,9 +44,8 @@
</ul>
{% else %}
<section class="col-md-12">
<p>To enable mirroring and proxies, you need to update the application configuration, see docs</p>
<p>{{ 'proxies_and_mirroring.guide'|trans }}</p>
<pre>

# config/packages/example.yaml
packeton:
mirrors:
Expand Down
29 changes: 19 additions & 10 deletions templates/subrepository/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{% extends "layout.html.twig" %}

{% block title %}{{ 'subrepository.title'|trans }} - {{ parent() }}{% endblock %}

{% block content %}
<section class="row">
<h2 class="title">{{ 'subrepository.title'|trans }}</h2>
<div class="col">
<div style="float:right">
<a class="btn btn-default" href="{{ path('subrepository_create') }}">{{ 'subrepository.create_subrepository'|trans }}</a>
</div>
<p style="max-width: 65%">{{ 'subrepository.guide'|trans|raw }}</p>
</div>

<div style="float:right; margin: 20px">
<a class="btn btn-default" href="{{ path('subrepository_create') }}">Create subrepository</a>
</div>
<div style="padding-top: 10px; clear: both"></div>

<section class="row">
{% if repos|length > 0 %}
<ul class="packages list-unstyled">
{% for repo in repos %}
{% set url = path('subrepository_update', { 'id' : repo.id }) %}
Expand All @@ -27,18 +35,19 @@
Repository URLs
<pre style="border-left: none;padding: 0; margin: 0; overflow: hidden">
{
"repositories": [{
"type": "composer",
"url": "{{ app.request.getSchemeAndHttpHost() ~ '/' ~ repo.slug }}"
}]
"repositories": [{
"type": "composer",
"url": "{{ app.request.getSchemeAndHttpHost() ~ '/' ~ repo.slug }}"
}]
}</pre>
</p>
</div>
</div>
</li>
{% endfor %}
</ul>


{% else %}
<p>{{ 'subrepository.nothing_yet'|trans }}</p>
{% endif %}
</section>
{% endblock %}
20 changes: 10 additions & 10 deletions templates/subrepository/update.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

{% block content %}
<h2 class="title">
{%- if app.request.attributes.get('_route') == 'subrepository_update' %}
Update subrepository
{%- else %}
Create subrepository
{%- endif %}
{% if app.request.attributes.get('_route') == 'subrepository_update' %}
{{ 'common.update'|trans }}
{% else %}
{{ 'common.create'|trans }}
{% endif %}
{{ 'subrepository.title'|trans }}
</h2>

<section class="row">
Expand Down Expand Up @@ -50,12 +51,11 @@
{{ form_end(form) }}

<div class="col-md-6">
<h4>Composer Subrepository</h4>
<h4>Composer sub-repository</h4>
<p>
The subrepository feature is to create an additional Composer repository
with their own URL or subdomain with a separate list of packages.
The Subrepository works similar GitHub organization, you may later configure access for users in the user edit page.
Admins will have access to all subrepositories.
The sub-repository feature is to create an additional Composer repository with their own URL or subdomain with a separate list of packages.
It works similar to a GitHub organization, you may later configure access for users in the user edit page.
Admins will have access to all sub-repositories.
</p>

</div>
Expand Down
29 changes: 18 additions & 11 deletions templates/user/list.html.twig
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{% extends "layout.html.twig" %}

{% block title %}{{ 'menu.my_users'|trans }} - {{ parent() }}{% endblock %}

{% block content %}
<section class="row">
<form name="search_user" method="get" action="{{ path('users_list') }}" id="search--user-form" autocomplete="off">
<div class="sortable row">
<div class="col-xs-12 js-search-field-wrapper col-md-9">
<input type="search" id="search_user_user" name="user_query" autocomplete="off" placeholder="Search user by username..." tabindex="1" class=" form-control" value="{{ searchUser }}">
<h2 class="title">{{ 'menu.my_users'|trans }}</h2>
</section>
<section class="row">
<div class="col-xs-12 col-md-9">
<form name="search_user" method="get" action="{{ path('users_list') }}" id="search--user-form" autocomplete="off">
<div class="sortable row">
<div class="js-search-field-wrapper">
<input type="search" id="search_user_user" name="user_query" autocomplete="off" placeholder="Search user by username..." tabindex="1" class=" form-control" value="{{ searchUser }}">
</div>
</div>
</div>
</form>
</form>
</div>
<div class="pull-right">
<a class="btn btn-default" href="{{ path('users_login_attempts_all') }}">All user sessions</a>
<a class="btn btn-primary" href="{{ path('users_create') }}">Create user</a>
</div>
</section>
<div style="float:right; margin: 20px">
<a class="btn btn-default" href="{{ path('users_login_attempts_all') }}">All user sessions</a>
<a class="btn btn-primary" href="{{ path('users_create') }}">Create user</a>
</div>
<section class="row">
<ul class="packages user-grid list-unstyled">
{% for user in users %}
{% set userUrl = path('user_profile', { 'name' : user.userIdentifier }) %}
<li data-url="{{ userUrl }}" class="row">
<li data-url="{{ userUrl }}">
<div class="col-xs-12 package-item">
<div class="row" style="margin: 6px 12px;">

Expand Down
Loading