-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Base][Edit] Fixes for release 0.37.0 (#612)
* [Base][Edit] Fixes for release 0.37.0 - Refactor ginger edit template to not overrule so much - Remove template in base that needed zotonic 0.50 * [Edit] Refactor edit js include so no duplicate editor.tpl are included * [Edit] Add fileupload for multi upload support
- Loading branch information
Showing
6 changed files
with
64 additions
and
112 deletions.
There are no files selected for viewing
32 changes: 0 additions & 32 deletions
32
modules/mod_ginger_base/templates/_action_dialog_new_rsc_tab.tpl
This file was deleted.
Oops, something went wrong.
75 changes: 2 additions & 73 deletions
75
modules/mod_ginger_edit/templates/_action_dialog_edit_basics.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,3 @@ | ||
{% with m.config.i18n.language_list.list as languages %} | ||
{% with m.rsc[id].language as r_lang %} | ||
{% wire id=#form type="submit" | ||
postback={ | ||
rsc_edit_basics | ||
id=id | ||
edge_id=edge_id | ||
update_element=update_element | ||
template=template | ||
actions=actions | ||
callback=callback | ||
is_update=is_update | ||
} | ||
delegate=delegate | ||
%} | ||
<form id="{{ #form }}" method="POST" action="postback" class="form"> | ||
<div class="tabbable"> | ||
{% block tabbar %} | ||
<ul class="nav nav-pills"> | ||
<li class="active"><a data-toggle="tab" href="#{{ #main }}">{_ Main _}</a></li> | ||
<li><a data-toggle="tab" href="#{{ #acl }}">{_ Access control _}</a></li> | ||
</ul> | ||
{% endblock %} | ||
<div class="tab-content"> | ||
{% block tab_content %} | ||
<div class="tab-pane form-horizontal active" id="{{ #main }}"> | ||
{% overrules %} | ||
|
||
{% catinclude "_admin_edit_basics.tpl" id in_dialog is_editable=id.is_editable languages=languages %} | ||
|
||
{% if id.is_a.category or id.is_a.predicate %} | ||
<div class="form-group row"> | ||
<label class="control-label col-md-3" for="{{ #unique }}">{_ Unique name _}</label> | ||
<div class="col-md-9"> | ||
<input class="form-control" type="text" id="{{ #unique }}" name="name" value="{{ id.name }}" /> | ||
{% validate id=#unique name="name" type={presence} %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="form-group row"> | ||
<label class="control-label col-md-3" for="{{ #published }}">{_ Published _}</label> | ||
<div class="col-md-9"> | ||
<div class="checkbox"> | ||
<label> | ||
<input type="checkbox" id="{{ #published }}" name="is_published" value="1" {% if id.is_published %}checked="checked"{% endif %} /> | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block tab_visible_for %} | ||
<div class="tab-pane form-horizontal" id="{{ #acl }}"> | ||
{% include "_admin_edit_visible_for.tpl" id=id %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block tab_extra %} | ||
{% endblock %} | ||
</div> | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
{% button class="btn btn-default" action={dialog_close} text=_"Cancel" tag="a" %} | ||
{% if m.acl.use.mod_admin %} | ||
<a href="{% url admin_edit_rsc id=id %}" class="btn btn-default">{_ Visit full edit page _}</a> | ||
{% endif %} | ||
{% button class="btn btn-primary" type="submit" text=_"Save" %} | ||
</div> | ||
</form> | ||
|
||
{% endwith %} | ||
{% endwith %} | ||
{% block tabbar %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
modules/mod_ginger_edit/templates/_ginger_edit_js_include.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{# Original template: admin_js_include.tpl #} | ||
{# | ||
Overwrite needed because in original template there is an all include | ||
that includes _editor.tpl again. Where we only want to include | ||
_ginger-editor.tpl. | ||
#} | ||
|
||
{% lib | ||
"bootstrap/js/bootstrap.min.js" | ||
%} | ||
|
||
{% lib | ||
"js/apps/zotonic-1.0.js" | ||
"js/apps/z.widgetmanager.js" | ||
"js/modules/ubf.js" | ||
"js/qlobber.js" | ||
"js/pubzub.js" | ||
"js/modules/jquery.hotkeys.js" | ||
"js/apps/admin-common.js" | ||
"js/jquery.ui.nestedSortable.js" | ||
"js/modules/z.adminwidget.js" | ||
"js/modules/z.live.js" | ||
"js/modules/z.notice.js" | ||
"js/modules/z.tooltip.js" | ||
"js/modules/z.dialog.js" | ||
"js/modules/z.feedback.js" | ||
"js/modules/z.formreplace.js" | ||
"js/modules/z.datepicker.js" | ||
"js/modules/z.menuedit.js" | ||
"js/modules/z.cropcenter.js" | ||
"js/modules/z.popupwindow.js" | ||
"js/modules/livevalidation-1.3.js" | ||
"js/modules/jquery.loadmask.js" | ||
"js/modules/jquery.timepicker.min.js" | ||
"js/modules/jstz.min.js" | ||
"js/ginger_edit.js" | ||
%} | ||
|
||
{% if m.modules.active.mod_geo %} | ||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{ m.config.mod_geo.api_key.value|escape }}"></script> | ||
{% lib "js/admin-geo.js" %} | ||
{% endif %} | ||
|
||
{% if m.modules.active.mod_admin_multiupload and m.acl.is_allowed.use.mod_admin_multiupload %} | ||
{% lib "js/jquery.fileupload.js" %} | ||
{% endif %} | ||
<script type="text/javascript"> | ||
$(function() | ||
{ | ||
$.widgetManager(); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters