aboutsummaryrefslogtreecommitdiff
path: root/app/views/configure/categorize.phtml
blob: 95951247e518d340c4874c5e6bc2bd7dc15a4358 (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
<?php $this->partial ('aside_feed'); ?>

<div class="post">
	<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>

	<form method="post" action="<?php echo _url ('configure', 'categorize'); ?>">
		<legend><?php echo Translate::t ('categories_management'); ?></legend>

		<p class="alert alert-warn"><?php echo Translate::t ('feeds_moved_category_deleted', $this->defaultCategory->name ()); ?></p>

		<?php $i = 0; foreach ($this->categories as $cat) { $i++; ?>
		<div class="form-group">
			<label class="group-name" for="cat_<?php echo $cat->id (); ?>">
				<?php echo Translate::t ('category_number', $i); ?>
			</label>
			<div class="group-controls">
				<input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />

				<?php if ($cat->nbFeed () > 0) { ?>
				<a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Translate::t ('ask_empty'); ?></a>
				<?php } ?>
				(<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)

				<?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
				<i class="icon i_help"></i> <?php echo Translate::t ('can_not_be_deleted'); ?>
				<?php } ?>

				<input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
			</div>
		</div>
		<?php } ?>

		<div class="form-group">
			<label class="group-name" for="new_category"><?php echo Translate::t ('add_category'); ?></label>
			<div class="group-controls">
				<input type="text" id="new_category" name="new_category" placeholder="<?php echo Translate::t ('new_category'); ?>" />
			</div>
		</div>

		<div class="form-group form-actions">
			<div class="group-controls">
				<button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
				<button type="reset" class="btn"><?php echo Translate::t ('cancel'); ?></button>
			</div>
		</div>
	</form>
</div>