PUNKT-38 Wygląd tabel

This commit is contained in:
Marcin Szczepański 2019-12-14 00:50:58 +01:00
parent 4900fc9c6e
commit e532373dbd
10 changed files with 171 additions and 67 deletions

View File

@ -40,8 +40,6 @@ export class FlashcardsSetsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'name', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,
@ -59,9 +57,9 @@ export class FlashcardsSetsListComponent implements OnInit, OnDestroy {
return '';
} else if (params.data['owner'] === currentUser.username) {
return `
<button type="button" data-action-type="remove" class="btn btn-study-cave btn-sm" title="Usuń">
<button type="button" data-action-type="remove" class="btn btn-study-cave " title="Usuń">
<i class="fas fa-trash-alt" data-action-type="remove"></i></button>
<button type="button" data-action-type="changePermission" class="btn btn-study-cave btn-sm" title="Uprawnienia">
<button type="button" data-action-type="changePermission" class="btn btn-study-cave " title="Uprawnienia">
<i class="fas fa-unlock" data-action-type="changePermission"></i></button>
`;
} else {
@ -208,8 +206,6 @@ export class FlashcardsSetsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'name', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: true },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: true },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: true },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,
@ -223,8 +219,6 @@ export class FlashcardsSetsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'name', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,
@ -257,8 +251,6 @@ export class FlashcardsSetsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'name', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,

View File

@ -1,35 +1,36 @@
<div class="wrapper">
<div class="content">
<div>
<button class="btn btn-study-cave float-right mr-1" (click)="goToAddingResource()"><i class="fas fa-plus"></i>
<button class="btn btn-study-cave float-right mr-1 mb-4" (click)="goToAddingResource()"><i class="fas fa-plus"></i>
Dodaj zasoby do grupy</button>
<button class="btn btn-study-cave float-right mr-1" (click)="goToRankings()"><i class="fas fa-trophy"></i>
<button class="btn btn-study-cave float-right mr-1 mb-4" (click)="goToRankings()"><i class="fas fa-trophy"></i>
Rankingi</button>
<button *ngIf="group?.owner===currentUser.username" class="btn btn-study-cave float-right mr-1" (click)="goToTestsResults()"><i class="fas fa-trophy"></i>
<button *ngIf="group?.owner===currentUser.username" class="btn btn-study-cave float-right mr-1 mb-4" (click)="goToTestsResults()"><i class="fas fa-trophy"></i>
Wyniki za testy</button>
<div style="clear: both;"></div>
</div>
<br />
<div>
<button class="btn btn-study-cave float-right mr-1" (click)="goToHistory()"><i class="fas fa-user-clock"></i> Twoja historia aktywności</button>
<button class="btn btn-study-cave float-right mr-1 mb-4" (click)="goToHistory()"><i class="fas fa-user-clock"></i> Twoja historia aktywności</button>
<div style="clear: both;"></div>
</div>
<br />
<h1>{{group?.name}}</h1>
<br />
<h3>Opis grupy:</h3>
<p>{{group?.description}}</p>
<div class="buttons-container">
<div>
<button class="btn btn-study-cave" (click)="goToGroupsList()"><i class="fas fa-arrow-left"></i> Do listy grup</button>
<button *ngIf="group?.owner===currentUser.username" class="btn btn-study-cave" (click)="goToEditing()"><i class="fas fa-edit"></i> Edytuj grupę</button>
<button class="btn btn-study-cave mb-4" (click)="goToGroupsList()"><i class="fas fa-arrow-left"></i> Do listy grup</button>
<button *ngIf="group?.owner===currentUser.username" class="btn btn-study-cave mb-4" (click)="goToEditing()"><i class="fas fa-edit"></i> Edytuj grupę</button>
</div>
<div>
<button class="btn btn-study-cave" (click)="isDisplayed('materiałów')"><i class="fas fa-book-open"></i>
<button class="btn btn-study-cave mb-4" (click)="isDisplayed('materiałów')"><i class="fas fa-book-open"></i>
Materiały</button>
<button class="btn btn-study-cave" (click)="isDisplayed('fiszek')"><i class="fas fa-scroll"></i> Fiszki</button>
<button class="btn btn-study-cave" (click)="isDisplayed('testów')"><i class="fas fa-pencil-ruler"></i>Testy</button>
<button class="btn btn-study-cave mb-4" (click)="isDisplayed('fiszek')"><i class="fas fa-scroll"></i> Fiszki</button>
<button class="btn btn-study-cave mb-4" (click)="isDisplayed('testów')"><i class="fas fa-pencil-ruler"></i>Testy</button>
</div>
</div>

View File

@ -30,10 +30,9 @@ export class GroupDetailsComponent implements OnInit, OnDestroy {
columnDefs = [
{ headerName: 'ID', field: 'id', headerTooltip: 'ID' },
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena' },
{ headerName: 'Max.', field: 'maxScore', headerTooltip: 'Max.', hide: false },
{
headerName: '',
suppressMenu: true,
@ -49,7 +48,7 @@ export class GroupDetailsComponent implements OnInit, OnDestroy {
const currentUsername = JSON.parse(localStorage.getItem('currentUser')).username;
const groupOwnerUsername = localStorage.getItem('groupOwnerUsername');
return groupOwnerUsername === currentUsername ?
`<button type="button" data-action-type="remove" class="btn btn-danger btn-sm"title="Usuń">
`<button type="button" data-action-type="remove" class="btn btn-danger "title="Usuń">
<i class="fas fa-trash-alt" data-action-type="remove"></i>
</button>` : '';
}
@ -159,10 +158,9 @@ export class GroupDetailsComponent implements OnInit, OnDestroy {
onGridSizeChanged(params) {
if (params.clientWidth < 800) {
this.columnDefs = [
{ headerName: 'ID', field: 'id', headerTooltip: 'ID' },
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena' },
{ headerName: 'Max.', field: 'maxScore', headerTooltip: 'Max.', hide: true },
{
headerName: '',
suppressMenu: true,
@ -172,10 +170,9 @@ export class GroupDetailsComponent implements OnInit, OnDestroy {
];
} else {
this.columnDefs = [
{ headerName: 'ID', field: 'id', headerTooltip: 'ID' },
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena' },
{ headerName: 'Max.', field: 'maxScore', headerTooltip: 'Max.' },
{
headerName: '',
suppressMenu: true,

View File

@ -1,4 +1,4 @@
a.wrapper{
.wrapper{
width: 100%;
padding: 30px;
min-height: 100%;

View File

@ -49,7 +49,7 @@ export class ManageGroupComponent implements OnInit, OnDestroy {
}
customCellRendererFunc(params) {
return `<button type="button" data-action-type="remove" class="btn btn-study-cave btn-sm" title="Usuń">
return `<button type="button" data-action-type="remove" class="btn btn-study-cave " title="Usuń">
<i class="fas fa-trash-alt" data-action-type="remove"></i></button>`;
}

View File

@ -95,7 +95,7 @@ export class MyGroupsComponent implements OnInit, OnDestroy {
customCellRendererFunc(params) {
if (params.data['role'] === 'Lider') {
return `
<button type="button" data-action-type="edit" class="btn btn-study-cave btn-sm" title="Zarządzaj grupą">
<button type="button" data-action-type="edit" class="btn btn-study-cave " title="Zarządzaj grupą">
<i class="fas fa-tools" data-action-type="edit"></i></button>
`;
} else {

View File

@ -323,11 +323,11 @@ export class WaitingResourcesComponent implements OnInit, OnDestroy {
customCellRendererFunc(params) {
return `
<button type="button" data-action-type="preview" class="btn btn-study-cave btn-sm" title="Podgląd">
<button type="button" data-action-type="preview" class="btn btn-study-cave " title="Podgląd">
<i class="far fa-eye" data-action-type="preview"></i></button>
<button type="button" data-action-type="accept" class="btn btn-study-cave btn-sm" title="Akceptuj">
<button type="button" data-action-type="accept" class="btn btn-study-cave " title="Akceptuj">
<i class="fas fa-check-circle" data-action-type="accept"></i></button>
<button type="button" data-action-type="reject" class="btn btn-study-cave btn-sm" title="Odrzuć">
<button type="button" data-action-type="reject" class="btn btn-study-cave " title="Odrzuć">
<i class="fas fa-times" data-action-type="reject"></i></button>
`;
}

View File

@ -38,8 +38,6 @@ export class MaterialsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,
@ -57,9 +55,9 @@ export class MaterialsListComponent implements OnInit, OnDestroy {
return '';
} else if (params.data['owner'] === currentUser.username) {
return `
<button type="button" data-action-type="remove" class="btn btn-study-cave btn-sm" title="Usuń">
<button type="button" data-action-type="remove" class="btn btn-study-cave " title="Usuń">
<i class="fas fa-trash-alt" data-action-type="remove"></i></button>
<button type="button" data-action-type="changePermission" class="btn btn-study-cave btn-sm" title="Uprawnienia">
<button type="button" data-action-type="changePermission" class="btn btn-study-cave " title="Uprawnienia">
<i class="fas fa-unlock" data-action-type="changePermission"></i></button>
`;
} else {
@ -211,8 +209,6 @@ export class MaterialsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: true },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: true },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: true },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,
@ -226,9 +222,6 @@ export class MaterialsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,
@ -263,8 +256,6 @@ export class MaterialsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'add_date', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'edit_date', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{
headerName: '',
suppressMenu: true,

View File

@ -31,8 +31,6 @@ export class TestsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'editDate', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena', hide: false },
{
headerName: '',
@ -52,11 +50,11 @@ export class TestsListComponent implements OnInit, OnDestroy {
return '<button type="button" data-action-type="get" class="btn btn-study-cave">PDF</button>';
} else if (params.data['owner'] === currentUser.username) {
return `
<button type="button" data-action-type="remove" class="btn btn-study-cave btn-sm" title="Usuń">
<button type="button" data-action-type="remove" class="btn btn-study-cave " title="Usuń">
<i class="fas fa-trash-alt" data-action-type="remove"></i></button>
<button type="button" data-action-type="edit" class="btn btn-study-cave btn-sm" title="Edytuj">
<button type="button" data-action-type="edit" class="btn btn-study-cave " title="Edytuj">
<i class="fas fa-edit" data-action-type="edit"></i></button>
<button type="button" data-action-type="get" class="btn btn-study-cave btn-sm" title="PDF">
<button type="button" data-action-type="get" class="btn btn-study-cave " title="PDF">
<i class="fas fa-file-pdf" data-action-type="get"></i></button>
`;
} else {
@ -202,8 +200,6 @@ export class TestsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: true },
{ headerName: 'Data modyfikacji', field: 'editDate', headerTooltip: 'Data modyfikacji', hide: true },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: true },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena', hide: true },
{
headerName: '',
@ -218,8 +214,6 @@ export class TestsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'editDate', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena', hide: false },
{
headerName: '',
@ -255,8 +249,6 @@ export class TestsListComponent implements OnInit, OnDestroy {
{ headerName: 'Nazwa', field: 'title', headerTooltip: 'Nazwa' },
{ headerName: 'Data dodania', field: 'addDate', headerTooltip: 'Data dodania', hide: false },
{ headerName: 'Data modyfikacji', field: 'editDate', headerTooltip: 'Data modyfikacji', hide: false },
{ headerName: 'Właściciel', field: 'owner', headerTooltip: 'Właściciel', hide: false },
{ headerName: 'Grupa', field: 'group', headerTooltip: 'Grupa', hide: !this.isGroup },
{ headerName: 'Ocena', field: 'grade', headerTooltip: 'Ocena', hide: false },
{
headerName: '',

View File

@ -1,13 +1,13 @@
@import "~ag-grid-community/dist/styles/ag-grid.css";
@import "~ag-grid-community/dist/styles/ag-theme-dark.css";
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab');
body{
margin: 0 auto;
background-color: #272324;
width: 100%;
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-family: 'Roboto Slab', 'Cambria', serif !important;
color: white;
background-size: auto 100%;
background-image: url("./assets/tlo.png");
@ -17,7 +17,7 @@ body{
background-color: #000080;
}
.btn{
.btn {
cursor: pointer;
}
@ -64,10 +64,6 @@ body{
margin: 2rem auto !important;
}
.btn-study-cave:not([disabled]):not(.disabled).active {
box-shadow: 0 0 0 .2rem rgba(112, 81, 14, 0.5);
}
.alert-grey {
background-color: #22272a;
}
@ -111,14 +107,17 @@ a:hover{
height: 50px !important;
}
label.btn-study-cave {
margin-left: 5px !important;
}
.btn-study-cave {
color: #fff;
background-color: #272324;
border-color: #cea856;
background-color: #000080;
}
.btn-study-cave:hover {
border-color: rgb(202, 144, 17);
background-color: orange;
color: #FFF !important;
}
@ -144,6 +143,7 @@ a:hover{
.mat-simple-snackbar {
justify-content: center !important;
font-family: 'Roboto Slab', 'Cambria', serif !important;
}
.button
@ -166,7 +166,138 @@ a:hover{
border-color: orange;
}
button:hover, a:hover {
transition: 400ms !important;
}
.content .wrapper .content {
background-color: #28102f !important;
border: 1px solid #625283 !important;
}
.ui-dialog * {
font-family: 'Roboto Slab', 'Cambria', serif !important;
}
.ui-dialog .fa, .ui-dialog .fas, .ui-dialog .far, .ui-dialog .pi {
font-family: "primeicons" !important;
}
.ag-theme-dark * {
font-family: 'Roboto Slab', 'Cambria', serif !important;
}
.ag-theme-dark .fa, .ag-theme-dark .fas, .ag-theme-dark .far {
font-family: "Font Awesome 5 Free" !important;
}
.ag-theme-dark .ag-body, .ag-theme-dark .ag-row-odd, .ag-theme-dark .ag-menu {
background-color: #19032f !important;
}
.ag-theme-dark input, .ag-theme-dark select {
background-color: #1e0935 !important;
padding: 1rem !important;
}
.ag-filter-body-wrapper > div {
padding: 0.5rem !important;
background-color: #0c0118 !important;
}
.ag-theme-dark .ag-row-even {
background-color: #29054d !important;
}
.ag-theme-dark .ag-paging-panel {
border-bottom: 1px solid darkgrey !important;
border-left: 1px solid darkgrey !important;
border-right: 1px solid darkgrey !important;
border-top-width: 0 !important;
}
.ag-theme-dark, .ag-theme-dark .ag-header {
background-color: #0c0118 !important;
}
.ag-theme-dark .ag-row-focus {
background-color: #6c08d7 !important;
}
.ag-theme-dark .ag-row-hover {
background-color: #4f069d !important;
}
.ui-listbox {
display: block !important;
width: 700px !important;
}
.ag-theme-dark {
font-size: 24px !important;
}
.ag-header {
font-size: 24px !important;
height: 60px !important;
min-height: 60px !important;
text-align: center;
}
.ag-header-row, .ag-header-cell, .ag-body-container, .ag-row {
height: 60px !important;
min-height: 60px !important;
}
.ag-theme-dark .ag-header-cell {
line-height: 50px !important;
}
@media screen and (max-width: 700px) {
.ag-theme-dark {
font-size: 16px !important;
}
.ag-header {
font-size: 16px !important;
height: 80px !important;
min-height: 80px !important;
}
.ag-header-row, .ag-header-cell, .ag-body-container, .ag-row {
height: 80px !important;
min-height: 80px !important;
}
.ag-theme-dark .ag-header-cell {
line-height: 70px !important;
}
}
@media screen and (max-width: 470px) {
.ag-theme-dark {
font-size: 14px !important;
}
.ag-header {
font-size: 14px !important;
height: 100px !important;
min-height: 100px !important;
}
.ag-paging-panel {
font-size: 12px !important;
}
.ag-header-row, .ag-header-cell, .ag-body-container, .ag-row {
height: 100px !important;
min-height: 100px !important;
}
.ag-theme-dark .ag-header-cell {
line-height: 90px !important;
}
}