Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
d0250606
Commit
d0250606
authored
6 years ago
by
esikkala
Browse files
Options
Downloads
Patches
Plain Diff
Add buttons to facet headers
parent
274ad034
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/client/components/FacetBar.js
+36
-5
36 additions, 5 deletions
src/client/components/FacetBar.js
src/client/components/ViewTabs.js
+0
-5
0 additions, 5 deletions
src/client/components/ViewTabs.js
with
36 additions
and
10 deletions
src/client/components/FacetBar.js
+
36
−
5
View file @
d0250606
...
...
@@ -4,6 +4,8 @@ import { withStyles } from '@material-ui/core/styles';
import
HierarchicalFacet
from
'
./HierarchicalFacet
'
;
import
Typography
from
'
@material-ui/core/Typography
'
;
import
Paper
from
'
@material-ui/core/Paper
'
;
import
IconButton
from
'
@material-ui/core/IconButton
'
;
import
{
PieChart
,
ExpandLess
,
/*ExpandMore*/
}
from
'
@material-ui/icons
'
;
const
styles
=
theme
=>
({
root
:
{
...
...
@@ -11,8 +13,10 @@ const styles = theme => ({
height
:
'
100%
'
},
headingContainer
:
{
paddingTop
:
theme
.
spacing
.
unit
,
paddingBottom
:
theme
.
spacing
.
unit
,
display
:
'
flex
'
,
alignItems
:
'
center
'
,
//paddingTop: theme.spacing.unit,
//paddingBottom: theme.spacing.unit,
paddingLeft
:
theme
.
spacing
.
unit
,
borderBottomLeftRadius
:
0
,
borderBottomRightRadius
:
0
,
...
...
@@ -31,6 +35,9 @@ const styles = theme => ({
height
:
108
,
padding
:
theme
.
spacing
.
unit
,
},
facetHeaderButtons
:
{
marginLeft
:
'
auto
'
}
});
class
FacetBar
extends
React
.
Component
{
...
...
@@ -43,7 +50,15 @@ class FacetBar extends React.Component {
<
React
.
Fragment
>
<
Paper
className
=
{
classes
.
facetContainer
}
>
<
Paper
className
=
{
classes
.
headingContainer
}
>
<
Typography
variant
=
"
h6
"
>
Source
({
this
.
props
.
source
.
distinctValueCount
})
<
/Typography
>
<
Typography
variant
=
"
h6
"
>
Source
{
this
.
props
.
source
.
distinctValueCount
>
0
?
`(
${
this
.
props
.
source
.
distinctValueCount
}
)`
:
''
}
<
/Typography
>
<
div
className
=
{
classes
.
facetHeaderButtons
}
>
<
IconButton
aria
-
label
=
"
Statistics
"
>
<
PieChart
/>
<
/IconButton
>
<
IconButton
aria
-
label
=
"
Expand
"
>
<
ExpandLess
/>
<
/IconButton
>
<
/div
>
<
/Paper
>
<
div
className
=
{
classes
.
facetValuesContainerThree
}
>
<
HierarchicalFacet
...
...
@@ -60,7 +75,15 @@ class FacetBar extends React.Component {
<
/Paper
>
<
Paper
className
=
{
classes
.
facetContainer
}
>
<
Paper
className
=
{
classes
.
headingContainer
}
>
<
Typography
variant
=
"
h6
"
>
Author
({
this
.
props
.
author
.
distinctValueCount
})
<
/Typography
>
<
Typography
variant
=
"
h6
"
>
Author
{
this
.
props
.
author
.
distinctValueCount
>
0
?
`(
${
this
.
props
.
author
.
distinctValueCount
}
)`
:
''
}
<
/Typography
>
<
div
className
=
{
classes
.
facetHeaderButtons
}
>
<
IconButton
aria
-
label
=
"
Statistics
"
>
<
PieChart
/>
<
/IconButton
>
<
IconButton
aria
-
label
=
"
Expand
"
>
<
ExpandLess
/>
<
/IconButton
>
<
/div
>
<
/Paper
>
<
div
className
=
{
classes
.
facetValuesContainerTen
}
>
<
HierarchicalFacet
...
...
@@ -77,7 +100,15 @@ class FacetBar extends React.Component {
<
/Paper
>
<
Paper
className
=
{
classes
.
facetContainer
}
>
<
Paper
className
=
{
classes
.
headingContainer
}
>
<
Typography
variant
=
"
h6
"
>
Production
place
({
this
.
props
.
productionPlace
.
distinctValueCount
})
<
/Typography
>
<
Typography
variant
=
"
h6
"
>
Production
place
{
this
.
props
.
productionPlace
.
distinctValueCount
>
0
?
`(
${
this
.
props
.
productionPlace
.
distinctValueCount
}
)`
:
''
}
<
/Typography
>
<
div
className
=
{
classes
.
facetHeaderButtons
}
>
<
IconButton
aria
-
label
=
"
Statistics
"
>
<
PieChart
/>
<
/IconButton
>
<
IconButton
aria
-
label
=
"
Expand
"
>
<
ExpandLess
/>
<
/IconButton
>
<
/div
>
<
/Paper
>
<
div
className
=
{
classes
.
facetValuesContainerTen
}
>
<
HierarchicalFacet
...
...
This diff is collapsed.
Click to expand it.
src/client/components/ViewTabs.js
+
0
−
5
View file @
d0250606
...
...
@@ -6,7 +6,6 @@ import Tab from '@material-ui/core/Tab';
import
CalendarViewDayIcon
from
'
@material-ui/icons/CalendarViewDay
'
;
import
AddLocationIcon
from
'
@material-ui/icons/AddLocation
'
;
import
RedoIcon
from
'
@material-ui/icons/Redo
'
;
import
PieChartIcon
from
'
@material-ui/icons/PieChart
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
Paper
from
'
@material-ui/core/Paper
'
;
...
...
@@ -43,9 +42,6 @@ class ViewTabs extends React.Component {
case
'
/manuscripts/migrations
'
:
value
=
2
;
break
;
case
'
/manuscripts/statistics
'
:
value
=
3
;
break
;
default
:
value
=
0
;
}
...
...
@@ -72,7 +68,6 @@ class ViewTabs extends React.Component {
<
Tab
icon
=
{
<
CalendarViewDayIcon
/>
}
label
=
"
table
"
component
=
{
Link
}
to
=
"
/manuscripts
"
/>
<
Tab
icon
=
{
<
AddLocationIcon
/>
}
label
=
"
production places
"
component
=
{
Link
}
to
=
"
/manuscripts/production_places
"
/>
<
Tab
icon
=
{
<
RedoIcon
/>
}
label
=
"
migrations
"
component
=
{
Link
}
to
=
"
/manuscripts/migrations
"
/>
<
Tab
icon
=
{
<
PieChartIcon
/>
}
label
=
"
statistics
"
component
=
{
Link
}
to
=
"
/manuscripts/statistics
"
/>
<
/Tabs
>
<
/Paper
>
);
...
...
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