search.tpl 6.91 KB
Newer Older
1
2
{include file="header.tpl"}

Richard Mansfield's avatar
Richard Mansfield committed
3
    <p>{str tag="usersearchinstructions" section="admin"}</p>
4
    <div id="initials">
5
        <div id="firstnamelist">
6
          <strong>{str tag="firstname"}:</strong>
7
8
9
10
11
12
13
14
15
16
           <span class="first-initial{if !$search->f} selected{/if} all">
            <a href="{$WWWROOT}admin/users/search.php?query={$search->query}{if $search->l}&amp;l={$search->l}{/if}{if $search->sortby}&amp;sortby={$search->sortby}{/if}{if $search->sortdir}&amp;sortdir={$search->sortdir}{/if}{if $limit}&amp;limit={$limit}{/if}">{str tag="All"}</a>
           </span>
           {foreach from=$alphabet item=a}
           <span class="first-initial{if $a == $search->f} selected{/if}">
            <a href="{$WWWROOT}admin/users/search.php?query={$search->query}&amp;f={$a}{if $search->l}&amp;l={$search->l}{/if}{if $search->sortby}&amp;sortby={$search->sortby}{/if}{if $search->sortdir}&amp;sortdir={$search->sortdir}{/if}{if $limit}&amp;limit={$limit}{/if}">{$a}</a>
           </span>
           {/foreach}
        </div>
        <div id="lastnamelist">
17
          <strong>{str tag="lastname"}:</strong>
18
19
20
21
22
23
24
25
26
           <span class="last-initial{if !$search->l} selected{/if} all">
            <a href="{$WWWROOT}admin/users/search.php?query={$search->query}{if $search->f}&amp;f={$search->f}{/if}{if $search->sortby}&amp;sortby={$search->sortby}{/if}{if $search->sortdir}&amp;sortdir={$search->sortdir}{/if}{if $limit}&amp;limit={$limit}{/if}">{str tag="All"}</a>
           </span>
           {foreach from=$alphabet item=a}
           <span class="last-initial{if $a == $search->l} selected{/if}">
            <a href="{$WWWROOT}admin/users/search.php?query={$search->query}&amp;l={$a}{if $search->f}&amp;f={$search->f}{/if}{if $search->sortby}&amp;sortby={$search->sortby}{/if}{if $search->sortdir}&amp;sortdir={$search->sortdir}{/if}{if $limit}&amp;limit={$limit}{/if}">{$a}</a>
           </span>
           {/foreach}
        </div>
27
    </div>
Richard Mansfield's avatar
Richard Mansfield committed
28
    <form action="{$WWWROOT}admin/users/search.php" method="post">
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
        {if $search->f}
        <input type="hidden" name="f" id="f" value="{$search->f}">
        {/if}
        {if $search->l}
        <input type="hidden" name="l" id="l" value="{$search->l}">
        {/if}
        {if $search->sortby}
        <input type="hidden" name="sortby" id="sortby" value="{$search->sortby}">
        {/if}
        {if $search->sortdir}
        <input type="hidden" name="sortdir" id="sortdir" value="{$search->sortdir}">
        {/if}
        {if $limit}
        <input type="hidden" name="limit" id="limit" value="{$limit}">
        {/if}
44
45
46
        <div class="loggedin-filter">
            <label for="loggedin">{str tag="loggedinfilter" section="admin"}</label>
            <select name="loggedin" id="loggedin">
47
48
49
            {foreach from=$loggedintypes item=t}
                <option value="{$t['name']}"{if $search->loggedin === $t['name']} selected="selected"{/if}>{$t['string']}</option>
            {/foreach}
50
51
52
53
54
            </select>
            <span id="loggedindate_container"{if !($search->loggedin == 'since' || $search->loggedin == 'notsince')} class="js-hidden"{/if}>
                {$loggedindate|safe}
            </span>
        </div>
55
56
57
58
        <div class="duplicateemail-filter">
            <label for="duplicateemail">{str tag="duplicateemailfilter" section="admin"}</label>
            <input type="checkbox" name="duplicateemail" id="duplicateemail" value="1"{if $search->duplicateemail} checked{/if}>
        </div>
59
        <div class="usersearchform">
60
            <label for="query">{str tag='Search' section='admin'}:</label>
61
            <input type="text" name="query" id="query"{if $search->query} value="{$search->query}"{/if}>
62
            {if count($institutions) > 1}
Richard Mansfield's avatar
Richard Mansfield committed
63
            <span class="institutions">
64
                <label for="institution">{str tag='Institution' section='admin'}:</label>
65
66
67
68
69
70
                <select name="institution" id="institution">
                    <option value="all"{if !$.request.institution} selected="selected"{/if}>{str tag=All}</option>
                    {foreach from=$institutions item=i}
                    <option value="{$i->name}"{if $i->name == $.request.institution}" selected="selected"{/if}>{$i->displayname}</option>
                    {/foreach}
                </select>
Richard Mansfield's avatar
Richard Mansfield committed
71
72
            </span>
            {/if}
Evonne Cheung's avatar
Evonne Cheung committed
73
            <button id="query-button" class="btn-search" type="submit">{str tag="go"}</button>
74
75
        </div>
    </form>
76
77
    {if $USER->get('admin') || $USER->is_institutional_admin() || get_config('staffreports')}
    <div class="withselectedusers">
78
        <strong>{str tag=withselectedusers section=admin}: </strong>
79
80
        {if $USER->get('admin') || $USER->is_institutional_admin()}
        <form class="nojs-hidden-inline" id="bulkactions" action="{$WWWROOT}admin/users/bulk.php" method="post">
81
82
            <label class="accessible-hidden" for="editbtn">{str tag=withselectedusersedit section=admin}</label>
            <input type="button" class="button" name="edit" id="editbtn" value="{str tag=edit}">
83
84
85
        </form>
        {/if}
        <form class="nojs-hidden-inline" id="report" action="{$WWWROOT}admin/users/report.php" method="post">
86
87
            <label class="accessible-hidden" for="reportsbtn">{str tag=withselectedusersreports section=admin}</label>
            <input type="button" class="button" name="reports" id="reportsbtn" value="{str tag=getreports section=admin}">
88
89
90
91
92
        </form>
        <div id="nousersselected" class="hidden error">{str tag=nousersselected section=admin}</div>
    </div>
    {/if}
    <div id="results" class="section">
93
94
95
96
97
98
99
100
        <h2 id="resultsheading">{str tag="Results"}</h2>
        {if $results}
        <table id="searchresults" class="tablerenderer fullwidth listing">
            <thead>
                <tr>
                    {foreach from=$columns key=f item=c}
                    <th class="{if $c.sort}search-results-sort-column{if $f == $sortby} {$sortdir}{/if}{/if}{if $c.class} {$c.class}{/if}">
                        {if $c.sort}
101
102
103
104
                            <a href="{$searchurl}&sortby={$f}&sortdir={if $f == $sortby && $sortdir == 'asc'}desc{else}asc{/if}">
                                {$c.name}
                                <span class="accessible-hidden">({str tag=sortby} {if $f == $sortby && $sortdir == 'asc'}{str tag=descending}{else}{str tag=ascending}{/if})</span>
                            </a>
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
                        {else}
                            {$c.name}
                        {/if}
                        {if $c.help}
                            {$c.helplink|safe}
                        {/if}
                        {if $c.headhtml}<div style="font-weight: normal;">{$c.headhtml|safe}</div>{/if}
                    </th>
                    {/foreach}
                </tr>
            </thead>
            <tbody>
                {$results|safe}
            </tbody>
        </table>
        {$pagination|safe}
        {else}
            <div>{str tag="noresultsfound"}</div>
        {/if}
124
    </div>
125

126
{include file="footer.tpl"}