Permalink
Browse files

mod_admin: Tweaks in media upload

  • Loading branch information...
1 parent 72d56af commit 3e39b95fe5be658c3337da75a5174adbcf452301 @arjan arjan committed Nov 13, 2012
@@ -13,15 +13,15 @@
<a data-toggle="tab" href="#{{ #tab }}-depiction">{_ Attached media _}</a>
</li>
{% endif %}
- <li {% if not is_zmedia %}class="active"{% endif %}>
+ <li {% if not is_zmedia and predicate.name /= "depiction" %}class="active"{% endif %}>
<a data-toggle="tab" href="#{{ #tab }}-find">{_ Find Page _}</a>
</li>
{% if predicate.name /= "depiction" %}
<li>
<a data-toggle="tab" href="#{{ #tab }}-new">{_ New Page _}</a>
</li>
{% endif %}
- <li>
+ <li {% if predicate.name == "depiction" %}class="active"{% endif %}>
<a data-toggle="tab" href="#{{ #tab }}-upload">{_ Upload _}</a>
</li>
<li>
@@ -40,12 +40,12 @@
{% include "_action_dialog_connect_tab_depictions.tpl" tab=#tab predicate=predicate subject_id=subject_id is_active title="" %}
{% endif %}
- {% include "_action_dialog_connect_tab_find.tpl" tab=#tab predicate=predicate subject_id=subject_id is_active=(not is_zmedia) title="" %}
+ {% include "_action_dialog_connect_tab_find.tpl" tab=#tab predicate=predicate subject_id=subject_id is_active=(not is_zmedia and predicate.name /= "depiction") title="" %}
{% include "_action_dialog_connect_tab_new.tpl" tab=#tab predicate=predicate subject_id=subject_id title="" %}
{% with "action_admin_dialog_media_upload" as delegate %}
- {% include "_action_dialog_media_upload_tab_upload.tpl" tab=#tab predicate=predicate subject_id=subject_id title="" %}
+ {% include "_action_dialog_media_upload_tab_upload.tpl" tab=#tab predicate=predicate subject_id=subject_id title="" is_active=(predicate.name=="depiction") %}
{% include "_action_dialog_media_upload_tab_url.tpl" tab=#tab predicate=predicate subject_id=subject_id title="" %}
{% all include "_media_upload_panel.tpl" tab=#tab
@@ -18,7 +18,7 @@
title=[_"Add a connection: ", m.rsc.depiction.title]
subject_id=id
edge_template="_rsc_edge_media.tpl"
- predicate="depiction"
+ predicate=`depiction`
actions=[
{postback postback={reload_media rsc_id=id div_id=["links-",id|make_list,"-depiction"]}
delegate="controller_admin_edit"}
@@ -3,7 +3,8 @@
<div id="{{ #unlink_message }}"></div>
{% sorter id=#list
- tag={object_sorter predicate="depiction" id=id}
+ tag={object_sorter predicate=`depiction` id=id}
+ delegate=`mod_admin`
placeholder="ui-sortable-placeholder"
%}
<ul id="{{ #list }}" class="media thumbnails">

0 comments on commit 3e39b95

Please sign in to comment.