src/cm/templates/site/text_share.html
author rbernard
Fri, 12 Feb 2010 21:58:53 +0100
changeset 172 9a355903350d
parent 106 36165e7cd1f0
child 438 fcc5e2f0befd
permissions -rw-r--r--
renaming variables
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     1
{% extends "site/layout/base_text.html" %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     2
{% load com %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     3
{% load i18n %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     4
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     5
{% block head %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     6
{% endblock %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     7
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     8
{% block main %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     9
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    10
<script type="text/javascript">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    11
<!--
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    12
tb_conf['current_tab'] = 'share';
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    13
-->
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    14
</script>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    15
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    16
<script type="text/javascript">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    17
<!--
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    18
$(function() {
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    19
    $(".hidden-user-actions").css('visibility','hidden');   
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    20
}) ;
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    21
-->
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    22
</script>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    23
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    24
<div id="text_share" class="tab-meta">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    25
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    26
<ul class="sub_list">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    27
    <li class="active_sub">{% blocktrans %}Users' list{% endblocktrans %}</li>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    28
    <li> / </li>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    29
    <li><a href="{% url user-add-text text.key %}">{% blocktrans %}Add a new user{% endblocktrans %}</a></li>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    30
    <li> / </li>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    31
    <li><a href="{% url user-mass-add-text text.key %}">{% blocktrans %}Add users in bulk{% endblocktrans %}</a></li>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    32
</ul>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    33
42
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    34
<form id="filter_form" action="." method="get">
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    35
<table summary="{% blocktrans %}People' list{% endblocktrans %}" class="large_table">
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    36
	<tr>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    37
		<td>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    38
		{% if display_suspended_users %}<a href="?{% newparams 'display' '0' %}" title="{% blocktrans %}Hide suspended users{% endblocktrans %}">{% blocktrans %}Hide suspended users{% endblocktrans %}</a>{% else %}<a href="?{% newparams 'display' '1' %}" title="{% blocktrans %}Display suspended users{% endblocktrans %}">{% blocktrans %}Display suspended users{% endblocktrans %}</a>{% endif %}
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    39
		&#183;
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    40
		{% blocktrans %}Filter by tag:{% endblocktrans %} 
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    41
		<select id="tag_selected" name="tag_selected">
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    42
		<option {% if not tag_selected %}selected="selected"{% endif %} value="0">- {% blocktrans %}All{% endblocktrans %} -</option>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    43
		
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    44
		{% for tag in tag_list %}
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    45
		<option  {% ifequal tag_selected tag.name %}selected="selected"{% endifequal %} value="{{ tag.name }}">{{ tag.name }}</option>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    46
		{% endfor %}
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    47
		</select>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    48
		</td>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    49
		
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    50
	</tr>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    51
</table>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    52
</form>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    53
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    54
<form id="text_share_form" action="." method="post">
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    55
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    56
<script type="text/javascript">
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    57
<!--
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    58
$(function() {
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    59
    $("#tag_selected").change(function () {
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    60
    	$("#filter_form").submit();
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    61
      });
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    62
}) ;
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    63
-->
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    64
</script>
82f6e2879e0a add tag filter to text share page
raph
parents: 23
diff changeset
    65
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    66
{% include "site/macros/paginator.html" %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    67
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    68
<div style="clear:both;"></div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    69
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    70
<table summary="user list" class="large_table">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    71
    <thead>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    72
        <tr>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    73
            <th class="check-column"><input type="checkbox" id="all_check" name="checkall"/>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    74
            <script type="text/javascript">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    75
            <!--
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    76
            $(function() {
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    77
                $("#all_check").click(function () {
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    78
                	checked = $("#all_check").attr('checked'); 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    79
                	$(".user_check").attr('checked', checked);
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    80
                	check_activate_apply();
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    81
                  });                            
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    82
            }) ;
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    83
            -->
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    84
            </script>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    85
            </th>
43
c13c0e78b0ca missing i18n tag
raph
parents: 42
diff changeset
    86
            <th>{% up_down user__username %}{% blocktrans %}User{% endblocktrans %}{% endup_down %}</th>
106
rbernard
parents: 89
diff changeset
    87
            <th><a class="tip" href="#" title="{% blocktrans %}The 'Workspace role' is the global role that applies to every text, you can give a user a particular role on this text using the 'text role' column on the right{% endblocktrans %}">{% blocktrans %}Workspace role{% endblocktrans %}</a></th>
rbernard
parents: 89
diff changeset
    88
            <th>{% up_down role__name %}{% blocktrans %}Text role{% endblocktrans %}{% endup_down %}</th>
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    89
        </tr>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    90
    </thead>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    91
    <tbody>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    92
    {% for userrole in object_list %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    93
    {% with userrole.user as user %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    94
    
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    95
    <tr class="user-{{ user.get_profile.key }} {% cycle 'odd' 'even' %}">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    96
        <td><input type="checkbox" class="user_check" name="check-{{ user.get_profile.key }}"/></td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    97
        <td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    98
			{% include "site/macros/user_actions.html" %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    99
        </td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   100
        <td>
106
rbernard
parents: 89
diff changeset
   101
        {% if userrole.role and user.get_profile.global_userrole.role %}<a class="tip" href="#" title="{% blocktrans with userrole.role.name_i18n as rolename %}This role has been overriden on this text by a text role: {{rolename}}{% endblocktrans %}">{% endif %}
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   102
        
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   103
        <span {% if userrole.role %}class="non_active"{% endif %}>
23
dbbd99172620 fix global role display
raph
parents: 0
diff changeset
   104
        {% if user.get_profile.global_userrole.role %}{{ user.get_profile.global_userrole.role.name_i18n}}{% else %}-{% endif %}
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   105
        </span>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   106
        
23
dbbd99172620 fix global role display
raph
parents: 0
diff changeset
   107
        {% if userrole.role and user.get_profile.global_userrole.role %}</a>{% endif %}
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   108
        </td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   109
        <td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   110
                <select name="user-role-{{ user.get_profile.key }}" {% ifequal user request.user %}disabled="disabled"{% endifequal %}>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   111
                    <option {% if userrole.role %}{% else %}selected="selected"{% endif %} value="">---------</option>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   112
                    {% for role in all_roles %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   113
                    <option {% ifequal userrole.role role %}selected="selected"{% endifequal %} value="{{ role.id }}">{{ role.name_i18n }}</option>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   114
                    {% endfor %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   115
                </select>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   116
        </td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   117
        
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   118
    </tr>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   119
    
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   120
    {% endwith %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   121
    {% endfor %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   122
    <tr class="no-border">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   123
        <td></td><td></td><td></td><td></td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   124
    </tr>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   125
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   126
    <tr class="full-border even">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   127
        <td></td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   128
        <td><a class="main_object_title" title="{% blocktrans %}Edit anonymous users{% endblocktrans %}" href="{% url user-anon-edit %}">{% blocktrans %}Anonymous users{% endblocktrans %}</a></td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   129
        <td>{% if global_anon_role %}{{ global_anon_role.name_i18n }}{% else %}-{% endif %}</td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   130
        <td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   131
            <select name="user-role-_">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   132
                <option selected="selected" value="">---------</option>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   133
                {% for role in anon_roles %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   134
                <option {% ifequal anon_role role %}selected="selected"{% endifequal %} value="{{ role.id }}">{{ role.name_i18n }}</option>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   135
                {% endfor %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   136
            </select>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   137
        </td>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   138
    </tr>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   139
    
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   140
    </tbody>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   141
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   142
</table>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   143
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   144
 <script type="text/javascript">                
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   145
<!--
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   146
$(function() {
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   147
    $('select[name^=user-role-]').change(function(){
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   148
    	$('#save').removeAttr('disabled');
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   149
    });
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   150
}) ;
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   151
--> 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   152
</script>                
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   153
<input style="margin-left:20px;" name="save" id="save" type="submit" value="{% blocktrans %}Save{% endblocktrans %}" disabled="disabled"/>        
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   154
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   155
</form>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   156
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   157
</div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
   158
{% endblock %}