aboutsummaryrefslogtreecommitdiff
path: root/app/views/user/details.phtml
blob: e23e645aee375a4995725021b8e157dae56b265d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php $this->partial('aside_configure'); ?>

<?php $isAdmin = $this->details['is_admin']; ?>

<div class="post">
    <a href="<?= _url('user', 'manage'); ?>"><?= _t('admin.user.back_to_manage'); ?></a>

    <legend><?= $this->username ?><?php if ($isAdmin) echo ' ― ', _t('admin.user.admin'); ?></legend>
    <form method="post" action="<?= _url('user', 'manage', 'username', $this->username); ?>">
        <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken(); ?>" />

        <div class="form-group">
            <label class="group-name"><?= _t('admin.user.email') ?></label>
            <div class="group-controls">
                <?= $this->details['mail_login'] ?>
            </div>
        </div>

        <div class="form-group">
            <label class="group-name"><?= _t('admin.user.language') ?></label>
            <div class="group-controls">
                <?= _t("gen.lang.{$this->details['language']}") ?>
            </div>
        </div>

        <div class="form-group">
            <label class="group-name"><?= _t('admin.user.feed_count') ?></label>
            <div class="group-controls">
                <?= format_number($this->details['feed_count']) ?>
            </div>
        </div>

        <div class="form-group">
            <label class="group-name"><?= _t('admin.user.article_count') ?></label>
            <div class="group-controls">
                <?= format_number($this->details['article_count']) ?>
            </div>
        </div>

        <div class="form-group">
            <label class="group-name"><?= _t('admin.user.database_size') ?></label>
            <div class="group-controls">
                <?= format_bytes($this->details['database_size']) ?>
            </div>
        </div>

        <div class="form-group">
            <label class="group-name" for="newPasswordPlain"><?= _t('admin.user.password_form') ?></label>
            <div class="group-controls">
                <div class="stick">
                    <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="new-password" pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
                    <a class="btn toggle-password" data-toggle="password-<?= $this->username; ?>"><?= _i('key') ?></a>
                </div>
                <?= _i('help'); ?> <?= _t('admin.user.password_format') ?>
            </div>
        </div>

        <div class="form-group form-actions">
            <noscript><b><?= _t('gen.js.should_be_activated'); ?></b></noscript>
            <div class="group-controls">
                <button type="submit" class="btn btn-important" name="action" value="update"><?= _t('gen.action.update') ?></button>
                <button type="submit" class="btn btn-attention confirm" name="action" value="purge"><?= _t('gen.action.purge') ?></button>
                <button type="submit" class="btn btn-attention confirm" name="action" value="delete"><?= _t('gen.action.remove') ?></button>
                <?php if ($isAdmin && !$this->isDefaultUser): ?>
                    <button type="submit" class="btn btn-attention confirm" name="action" value="demote"><?= _t('gen.action.demote') ?></button>
                <?php elseif (!$isAdmin): ?>
                    <button type="submit" class="btn btn-attention confirm" name="action" value="promote"><?= _t('gen.action.promote') ?></button>
                <?php endif; ?>
            <div>
        </div>
    </form>
</div>