summaryrefslogtreecommitdiff
path: root/app/views/configure/feed.phtml
blob: 33483f72dbd6deb5c284499a7c86c7f69ed08be7 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php $this->partial ('aside_feed'); ?>

<?php if ($this->flux) { ?>
<div class="post">
	<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a> <?php echo Translate::t ('or'); ?> <a href="<?php echo _url ('index', 'index', 'get', 'f_' . $this->flux->id ()); ?>"><?php echo Translate::t ('filter'); ?></a>

	<h1><?php echo $this->flux->name (); ?></h1>
	<?php echo $this->flux->description (); ?>

	<form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>">
		<legend><?php echo Translate::t ('informations'); ?></legend>
		<div class="form-group">
			<label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
			<div class="group-controls">
				<span class="control"><a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo $this->flux->website (); ?></a></span>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
			<div class="group-controls">
				<span class="control"><a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo $this->flux->url (); ?></a></span>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name"><?php echo Translate::t ('number_articles'); ?></label>
			<div class="group-controls">
				<span class="control"><?php echo $this->flux->nbEntries (); ?></span>
			</div>
		</div>

		<legend><?php echo Translate::t ('category'); ?> - <a href="<?php echo _url ('configure', 'categorize'); ?>"><?php echo Translate::t ('categories_management'); ?></a></legend>
		<div class="form-group">
			<label class="group-name"><?php echo Translate::t ('categorize'); ?></label>
			<div class="group-controls">
				<?php foreach ($this->categories as $cat) { ?>
				<label class="radio" for="cat_<?php echo $cat->id (); ?>">
					<input type="radio" name="category" id="cat_<?php echo $cat->id (); ?>" value="<?php echo $cat->id (); ?>"<?php echo $cat->id () == $this->flux->category () ? ' checked="checked"' : ''; ?> />
					<?php echo $cat->name (); ?>
				</label>
				<?php } ?>
			</div>
		</div>

		<legend><?php echo Translate::t ('advanced'); ?></legend>
		<div class="form-group">
			<label class="group-name" for="priority"><?php echo Translate::t ('show_in_all_flux'); ?></label>
			<div class="group-controls">
				<label class="checkbox" for="priority">
					<input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
					<?php echo Translate::t ('yes'); ?>
				</label>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
			<div class="group-controls">
				<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
				<i class="icon i_help"></i> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
			</div>
		</div>

		<?php $auth = $this->flux->httpAuth (false); ?>
		<div class="form-group">
			<label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
			<div class="group-controls">
				<input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" />
				<i class="icon i_help"></i> <?php echo Translate::t ('access_protected_feeds'); ?>
			</div>

			<label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>
			<div class="group-controls">
				<input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" />
			</div>
		</div>


		<div class="form-group form-actions">
			<div class="group-controls">
				<button class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
				<button class="btn btn-attention" formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Translate::t ('delete'); ?></button>
			</div>
		</div>
	</form>
</div>
<?php } else { ?>
<div class="alert alert-warn"><span class="alert-head"><?php echo Translate::t ('no_selected_feed'); ?></span> <?php echo Translate::t ('think_to_add'); ?></div>
<?php } ?>