sawa 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sawa/tpl/toolbar.js.mustache +10 -5
- data/lib/sawa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ce584694d5b0086c16cdfbb019d0fb73aa92536
|
|
4
|
+
data.tar.gz: 3c9bd94348dc092cf1867c3e7631136fa570c707
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07daf224cab2b3367ff3896f5c799145c725b7f59c08648f45ab0d293313b401127ee11e0b65ba4a468f77b29f9e66b8d5f3722141d32329f7acd33d475acb9f
|
|
7
|
+
data.tar.gz: 6cfe1dc21b650f7605aacfb0224cdd9afe63376b569e1ed500f88f0cdd2a01950c865127b95ff040c84a73d454d4726a7a0bae87d711d20ca6728440759d39cd
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import CustomMenu from './components/CustomMenu';
|
|
3
3
|
import { Link } from 'react-router-dom'
|
|
4
|
-
import { Menu, Button } from 'semantic-ui-react'
|
|
4
|
+
import { Menu, Button, Dropdown } from 'semantic-ui-react'
|
|
5
5
|
|
|
6
6
|
class Toolbar extends Component {
|
|
7
7
|
|
|
8
8
|
constructor (props) {
|
|
9
9
|
super(props)
|
|
10
10
|
this.handleItemClick = (e, { name }) => this.setState({ activeItem: name })
|
|
11
|
-
this.
|
|
11
|
+
this.handleMastMenuClick = (e, { name }) => this.setState({ activeItem: name, activeTitle : e.target.text })
|
|
12
|
+
this.state = {activeItem: "", activeTitle: "テーブル管理"}
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
render() {
|
|
15
|
-
const { activeItem } = this.state
|
|
16
|
+
const { activeItem, activeTitle } = this.state
|
|
16
17
|
if(this.props.user === undefined || this.props.user === null){
|
|
17
18
|
return (<Menu inverted pointing secondary>
|
|
18
19
|
<Menu.Menu position='right'>
|
|
@@ -28,10 +29,14 @@ class Toolbar extends Component {
|
|
|
28
29
|
const admin = this.props.user.role === "ADMIN"
|
|
29
30
|
return(
|
|
30
31
|
<Menu inverted pointing secondary>
|
|
32
|
+
<CustomMenu activeItem={activeItem} onClick={this.handleItemClick} user={this.props.user} />
|
|
33
|
+
<Dropdown item text={activeTitle} >
|
|
34
|
+
<Dropdown.Menu>
|
|
31
35
|
{{# sheet_arr}}
|
|
32
|
-
|
|
36
|
+
<Menu.Item style={ {display: admin ? 'block' : 'none'} } name='{{resource_path}}' active={activeItem === '{{resource_path}}'} as={Link} to='/{{resource_path}}' onClick={this.handleMastMenuClick} >{{model_title}}</Menu.Item>
|
|
33
37
|
{{/ sheet_arr}}
|
|
34
|
-
|
|
38
|
+
</Dropdown.Menu>
|
|
39
|
+
</Dropdown>
|
|
35
40
|
<Menu.Menu position='right'>
|
|
36
41
|
<Menu.Item as={Link} to='/logout'>
|
|
37
42
|
<Button primary >Sign out</Button>
|
data/lib/sawa/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sawa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.24
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- shouaya
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|