summaryrefslogtreecommitdiffstats
path: root/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AccessSectionEditor.ui.xml
blob: 501c3fce844fe40713a3ba9a5f38f0930afc22a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2011 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<ui:UiBinder
  xmlns:ui='urn:ui:com.google.gwt.uibinder'
  xmlns:g='urn:import:com.google.gwt.user.client.ui'
  xmlns:e='urn:import:com.google.gwt.editor.ui.client'
  xmlns:my='urn:import:com.google.gerrit.client.admin'
  ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
  ui:generateKeys='com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator'
  ui:generateLocales='default,en'
  >
<ui:with field='res' type='com.google.gerrit.client.admin.AdminResources'/>
<ui:style>
  @eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
  @eval trimColor com.google.gerrit.client.Gerrit.getTheme().trimColor;

  .panel {
    position: relative;
  }

  .content {
    margin-top: 4px;
    margin-bottom: 4px;
    padding-bottom: 2px;
  }

  .normal {
    background-color: trimColor;
  }

  .deleted {
    padding-left: 7px;
    padding-bottom: 2px;
  }

  .header {
    padding-left: 5px;
    padding-right: 5px;
  }
  .headerText {
    vertical-align: top;
    white-space: nowrap;
    font-weight: bold;
  }
  .headerTable {
    border: 0;
    width: 100%;
    padding-right: 40px;
  }

  .header:hover {
    background-color: selectionColor;
  }

  .name {
    width: 100%;
  }
  .nameEdit {
    width: 100%;
  }

  .permissionList {
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
  }

  .addContainer {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 80%;
  }
  .addContainer:hover {
    background-color: selectionColor;
  }
  .addSelector {
    font-size: 80%;
  }

  .deleteIcon {
    position: absolute;
    top: 5px;
    right: 17px;
  }

  .undoIcon {
    position: absolute;
    top: 2px;
    right: 17px;
  }
</ui:style>

<g:HTMLPanel styleName='{style.panel}'>
<div ui:field='normal' class='{style.normal} {style.content}'>
  <div class='{style.header}'>
    <table class='{style.headerTable}'><tr>
      <td class='{style.headerText}'>
        <span ui:field='sectionType'/>
      </td>
      <td width='100%'>
        <my:ValueEditor
            ui:field='name'
            addStyleNames='{style.name}'
            editTitle='Edit reference pattern'>
          <ui:attribute name='editTitle'/>
          <my:editor>
            <my:RefPatternBox styleName='{style.nameEdit}'/>
          </my:editor>
        </my:ValueEditor>
        <span ui:field='sectionName' class='{style.name}'/>
      </td>
    </tr></table>

    <g:Anchor
        ui:field='deleteSection'
        href='javascript:void'
        styleName='{style.deleteIcon} {res.css.deleteIcon}'
        title='Delete this section (and nested rules)'>
      <ui:attribute name='title'/>
    </g:Anchor>
  </div>

  <g:FlowPanel
      ui:field='permissionContainer'
      styleName='{style.permissionList}'/>
  <div ui:field='addContainer' class='{style.addContainer}'>
    <g:ValueListBox
        ui:field='permissionSelector'
        styleName='{style.addSelector}' />
  </div>
</div>

<div
    ui:field='deleted'
    class='{style.deleted} {res.css.deleted}'
    style='display: none'>
  <span ui:field='deletedName'/>
  <g:Anchor
      ui:field='undoDelete'
      href='javascript:void'
      styleName='{style.undoIcon} {res.css.undoIcon}'
      title='Undo deletion'>
    <ui:attribute name='title'/>
  </g:Anchor>
</div>
</g:HTMLPanel>
</ui:UiBinder>