aboutsummaryrefslogtreecommitdiff
path: root/app/views/configure/feed.phtml
blob: 138808a9f3d70298a7359eedf2227af45c586831 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php $this->partial ('aside_feed'); ?>

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

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

	<?php if ($this->flux->inError ()) { ?>
	<p class="alert alert-error"><span class="alert-head"><?php echo Minz_Translate::t ('damn'); ?></span> <?php echo Minz_Translate::t ('feed_in_error'); ?></p>
	<?php } ?>

	<form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>" autocomplete="off">
		<legend><?php echo Minz_Translate::t ('informations'); ?></legend>
		<div class="form-group">
			<label class="group-name" for="name"><?php echo Minz_Translate::t ('title'); ?></label>
			<div class="group-controls">
				<input type="text" name="name" id="name" class="extend" value="<?php echo $this->flux->name () ; ?>" />
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="description"><?php echo Minz_Translate::t ('feed_description'); ?></label>
			<div class="group-controls">
				<textarea name="description" id="description"><?php echo htmlspecialchars($this->flux->description(), ENT_NOQUOTES, 'UTF-8'); ?></textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="website"><?php echo Minz_Translate::t ('website_url'); ?></label>
			<div class="group-controls">
				<input type="text" name="website" id="website" class="extend" value="<?php echo $this->flux->website (); ?>" />
				<a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="url"><?php echo Minz_Translate::t ('feed_url'); ?></label>
			<div class="group-controls">
				<input type="text" name="url" id="url" class="extend" value="<?php echo $this->flux->url (); ?>" />
				<a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
				  <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->flux->url (); ?>"><?php echo Minz_Translate::t ('feed_validator'); ?></a>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="category"><?php echo Minz_Translate::t ('category'); ?></label>
			<div class="group-controls">
				<select name="category" id="category">
				<?php foreach ($this->categories as $cat) { ?>
				<option value="<?php echo $cat->id (); ?>"<?php echo $cat->id ()== $this->flux->category () ? ' selected="selected"' : ''; ?>>
					<?php echo $cat->name (); ?>
				</option>
				<?php } ?>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="priority"><?php echo Minz_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 Minz_Translate::t ('yes'); ?>
				</label>
			</div>
		</div>
		<div class="form-group form-actions">
			<div class="group-controls">
				<button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
				<button class="btn btn-attention confirm" formmethod="post" formaction="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Minz_Translate::t ('delete'); ?></button>
			</div>
		</div>

		<legend><?php echo Minz_Translate::t ('archiving_configuration'); ?></legend>

		<div class="form-group">
			<label class="group-name"></label>
			<div class="group-controls">
				<a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
					<?php echo FreshRSS_Themes::icon('refresh'); ?> <?php echo Minz_Translate::t('actualize'); ?>
				</a>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
			<div class="group-controls">
				<span class="control"><?php echo $this->flux->nbEntries (); ?></span>
			</div>
		</div>
		<div class="form-group">
			<label class="group-name" for="keep_history"><?php echo Minz_Translate::t ('keep_history'); ?></label>
			<div class="group-controls">
				<select class="number" name="keep_history" id="keep_history" required="required"><?php
					foreach (array('' => '', -2 => Minz_Translate::t('by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
						echo '<option value="' . $v . ($this->flux->keepHistory() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
					}
				?></select>
			</div>
		</div>
		<div class="form-group form-actions">
			<div class="group-controls">
				<button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
				<button class="btn btn-attention confirm" formmethod="post" formaction="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'truncate', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Minz_Translate::t ('truncate'); ?></button>
			</div>
		</div>

		<legend><?php echo Minz_Translate::t ('login_configuration'); ?></legend>
		<?php $auth = $this->flux->httpAuth (false); ?>
		<div class="form-group">
			<label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
			<div class="group-controls">
				<input type="text" name="http_user" id="http_user" class="extend" value="<?php echo $auth['username']; ?>" autocomplete="off" />
				<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('access_protected_feeds'); ?>
			</div>

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

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

		<legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
		<div class="form-group">
			<label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
			<div class="group-controls">
				<input type="text" name="path_entries" id="path_entries" class="extend" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
				<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
			</div>
		</div>

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

<?php } else { ?>
<div class="alert alert-warn"><span class="alert-head"><?php echo Minz_Translate::t ('no_selected_feed'); ?></span> <?php echo Minz_Translate::t ('think_to_add'); ?></div>
<?php } ?>