|
@@ -113,16 +113,20 @@
|
113
|
113
|
</div>
|
114
|
114
|
% endif
|
115
|
115
|
|
116
|
|
- <p>
|
117
|
|
- ${_('This workspace is {a_open}accessible with webdav{a_close}').format(a_open='<a data-toggle="collapse" href="#webdavConfig" aria-expanded="false" aria-controls="webdavConfig">', a_close='</a>')|n}
|
118
|
|
- </p>
|
119
|
|
- <div class="collapse" id="webdavConfig">
|
120
|
|
- <p>${_('Adress to connect to webdav with:')}</p>
|
121
|
|
- <p>Linux : </p>
|
122
|
|
- <p class="form-control">dav://${webdav_url}</p>
|
123
|
|
- <p>Windows : </p>
|
|
116
|
+ <p>
|
|
117
|
+ ${_('This workspace is {a_open}accessible with webdav{a_close}').format(a_open='<a data-toggle="collapse" href="#webdavConfig" aria-expanded="false" aria-controls="webdavConfig">', a_close='</a>')|n}
|
|
118
|
+ </p>
|
|
119
|
+ <div class="collapse" id="webdavConfig">
|
|
120
|
+ <div class="input-group">
|
|
121
|
+ <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-windows"></i> Windows</span>
|
124
|
122
|
<p class="form-control">http://${webdav_url}</p>
|
125
|
123
|
</div>
|
|
124
|
+ <p></p>
|
|
125
|
+ <div class="input-group">
|
|
126
|
+ <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-linux"></i> Linux</span>
|
|
127
|
+ <p class="form-control">dav://${webdav_url}</p>
|
|
128
|
+ </div>
|
|
129
|
+ </div>
|
126
|
130
|
|
127
|
131
|
<div class="t-half-spacer-above t-less-visible"></div>
|
128
|
132
|
|
|
@@ -131,59 +135,63 @@
|
131
|
135
|
<% user_role = h.user_role(fake_api.current_user, result.workspace) %>
|
132
|
136
|
|
133
|
137
|
${TITLE.H3(_('Content'), 'fa-copy', 'workspace-content')}
|
134
|
|
-
|
135
|
|
- % if user_role > 1:
|
136
|
|
- <div class="btn-group" role="group">
|
137
|
|
- <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
138
|
|
- <i class="fa fa-plus"></i> ${_('New ...')}
|
139
|
|
- <span class="caret"></span>
|
140
|
|
- </button>
|
141
|
|
- <ul class="dropdown-menu" role="menu">
|
142
|
|
- % for content_type in result.workspace.allowed_content_types:
|
143
|
|
- % if content_type.id == 'folder' and user_role > 2:
|
144
|
|
- ## Only show 'new folder' to content managers
|
145
|
|
- <%
|
146
|
|
- new_form_content_url = tg.url('/workspaces/{}/folders/new'.format(result.workspace.id), params={'workspace_id': result.workspace.id, 'parent_id': None})
|
147
|
|
- modal_dialog_id = '{content_type}-new-modal-dialog'.format(content_type=content_type.id)
|
148
|
|
- icon_classes = content_type.icon+' '+content_type.color
|
149
|
|
- %>
|
150
|
|
- <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
|
151
|
|
- % else:
|
152
|
|
- <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT('', _('You are not allowed to create content'), '', 't-less-visible fa fa-ban')}</li>
|
153
|
|
- ## Show new content entries in the menu is currently not available at root of a workspace
|
154
|
|
- ## TODO - D.A. - 2015-08-20 - Allow to put content at root (and show related entry in the menu
|
155
|
|
- ## % if user_role == 2:
|
156
|
|
- ## ## Only show 'new folder' to content managers
|
157
|
|
- ## <%
|
158
|
|
- ## new_form_content_url = tg.url('/workspaces/{}/folders/{}/{}s/new'.format(result.folder.workspace.id, result.folder.id, content_type.id), params={'workspace_id': result.folder.workspace.id, 'parent_id': result.folder.id})
|
159
|
|
- ## modal_dialog_id = '{content_type}-new-modal-dialog'.format(content_type=content_type.id)
|
160
|
|
- ## icon_classes = content_type.icon+' '+content_type.color
|
161
|
|
- ## %>
|
162
|
|
- ## <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
|
163
|
|
- ## % endif
|
164
|
|
- % endif
|
165
|
|
- % endfor
|
166
|
|
- </ul>
|
|
138
|
+ <div class="col-md-4 col-sx-12">
|
|
139
|
+ % if user_role > 1:
|
|
140
|
+ <div class="btn-group" role="group">
|
|
141
|
+ <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
142
|
+ <i class="fa fa-plus"></i> ${_('New ...')}
|
|
143
|
+ <span class="caret"></span>
|
|
144
|
+ </button>
|
|
145
|
+ <ul class="dropdown-menu" role="menu">
|
|
146
|
+ % for content_type in result.workspace.allowed_content_types:
|
|
147
|
+ % if content_type.id == 'folder' and user_role > 2:
|
|
148
|
+ ## Only show 'new folder' to content managers
|
|
149
|
+ <%
|
|
150
|
+ new_form_content_url = tg.url('/workspaces/{}/folders/new'.format(result.workspace.id), params={'workspace_id': result.workspace.id, 'parent_id': None})
|
|
151
|
+ modal_dialog_id = '{content_type}-new-modal-dialog'.format(content_type=content_type.id)
|
|
152
|
+ icon_classes = content_type.icon+' '+content_type.color
|
|
153
|
+ %>
|
|
154
|
+ <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
|
|
155
|
+ % else:
|
|
156
|
+ <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT('', _('You are not allowed to create content'), '', 't-less-visible fa fa-ban')}</li>
|
|
157
|
+ ## Show new content entries in the menu is currently not available at root of a workspace
|
|
158
|
+ ## TODO - D.A. - 2015-08-20 - Allow to put content at root (and show related entry in the menu
|
|
159
|
+ ## % if user_role == 2:
|
|
160
|
+ ## ## Only show 'new folder' to content managers
|
|
161
|
+ ## <%
|
|
162
|
+ ## new_form_content_url = tg.url('/workspaces/{}/folders/{}/{}s/new'.format(result.folder.workspace.id, result.folder.id, content_type.id), params={'workspace_id': result.folder.workspace.id, 'parent_id': result.folder.id})
|
|
163
|
+ ## modal_dialog_id = '{content_type}-new-modal-dialog'.format(content_type=content_type.id)
|
|
164
|
+ ## icon_classes = content_type.icon+' '+content_type.color
|
|
165
|
+ ## %>
|
|
166
|
+ ## <li>${BUTTON.DATA_TARGET_AS_TEXT_AND_ICON_MODAL_WITH_REMOTE_CONTENT(modal_dialog_id, content_type.label, new_form_content_url, icon_classes)}</li>
|
|
167
|
+ ## % endif
|
|
168
|
+ % endif
|
|
169
|
+ % endfor
|
|
170
|
+ </ul>
|
|
171
|
+ </div>
|
|
172
|
+ % endif
|
167
|
173
|
</div>
|
168
|
|
- % endif
|
169
|
|
-
|
170
|
|
- % if len(fake_api.sub_items) > 0:
|
171
|
|
- ## INFO - D.A. - 2015-05-25
|
172
|
|
- ## We hide filtering/search buttons if no content yet.
|
173
|
|
- ## This make the interface more easy to use
|
174
|
|
- <div class="btn-group" role="group" aria-label="...">
|
175
|
|
- ${BUTTON.TEXT('', 'btn btn-default disabled', _('hide...'))}
|
176
|
|
- % for content_type in result.workspace.allowed_content_types:
|
177
|
|
- ${BUTTON.TEXT('toggle-{type}-visibility'.format(type=content_type.id), 'btn btn-default t-active-color disabled-has-priority', content_type.label)}
|
178
|
|
- % endfor
|
|
174
|
+ <div class="col-md-8 text-right">
|
|
175
|
+ % if len(fake_api.sub_items) > 0:
|
|
176
|
+ ## INFO - D.A. - 2015-05-25
|
|
177
|
+ ## We hide filtering/search buttons if no content yet.
|
|
178
|
+ ## This make the interface more easy to use
|
|
179
|
+ <div class="btn-group" role="group" aria-label="...">
|
|
180
|
+ ${BUTTON.TEXT('', 'btn btn-default disabled', _('hide...'))}
|
|
181
|
+ % for content_type in result.workspace.allowed_content_types:
|
|
182
|
+ ${BUTTON.TEXT('toggle-{type}-visibility'.format(type=content_type.id), 'btn btn-default t-active-color disabled-has-priority', content_type.label)}
|
|
183
|
+ % endfor
|
|
184
|
+ </div>
|
|
185
|
+ <p></p>
|
|
186
|
+ ${UI.GENERIC_DISPLAY_VIEW_BUTTONS_CONTAINER(tg.url('/workspaces/{}'.format(result.workspace.id)))}
|
|
187
|
+ <p></p>
|
|
188
|
+ <div class="btn-group pull-right" role="group" aria-label="...">
|
|
189
|
+ <input id="filtering" type="text" class="form-control t-bg-grey" placeholder="${_('filter...')}" aria-describedby="basic-addon1">
|
|
190
|
+ </div>
|
|
191
|
+ % endif
|
179
|
192
|
</div>
|
180
|
193
|
|
181
|
|
- <div class="btn-group pull-right" role="group" aria-label="...">
|
182
|
|
- <input id="filtering" type="text" class="form-control t-bg-grey" placeholder="${_('search...')}" aria-describedby="basic-addon1">
|
183
|
|
- </div>
|
184
|
|
- % endif
|
185
|
194
|
|
186
|
|
- ${UI.GENERIC_DISPLAY_VIEW_BUTTONS_CONTAINER(tg.url('/workspaces/{}'.format(result.workspace.id)))}
|
187
|
195
|
|
188
|
196
|
</div>
|
189
|
197
|
<div class="t-spacer-above">
|