Browse Source

Overhaul request form and support medical imaging

pjc 5 years ago
parent
commit
c5053dcec0

+ 20
- 18
classes/torrent_form.class.php View File

@@ -10,7 +10,7 @@ class TorrentForm
10 10
     #var $Formats = [];
11 11
     #var $Bitrates = [];
12 12
     public $Media = [];
13
-    #var $MediaManga = [];
13
+    var $MediaManga = [];
14 14
     public $Containers = [];
15 15
     #var $ContainersGames = [];
16 16
     public $Codecs = [];
@@ -32,7 +32,7 @@ class TorrentForm
32 32
         $this->Torrent = $Torrent;
33 33
         $this->Error = $Error;
34 34
 
35
-        global $UploadForm, $Categories, $Media, $TorrentID, $Containers, $Codecs, $Resolutions, $Archives;
35
+        global $UploadForm, $Categories, $Media,  $MediaManga, $TorrentID, $Containers, $Codecs, $Resolutions, $Archives;
36 36
         #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
37 37
 
38 38
         $this->UploadForm = $UploadForm;
@@ -40,7 +40,7 @@ class TorrentForm
40 40
         #$this->Formats = $Formats;
41 41
         #$this->Bitrates = $Bitrates;
42 42
         $this->Media = $Media;
43
-        #$this->MediaManga = $MediaManga;
43
+        $this->MediaManga = $MediaManga;
44 44
         $this->Containers = $Containers;
45 45
         #$this->ContainersGames = $ContainersGames;
46 46
         $this->Codecs = $Codecs;
@@ -212,14 +212,17 @@ class TorrentForm
212 212
         </td>
213 213
       </tr>
214 214
       <?php
215
-            }
216
-        } ?>
215
+          }
216
+        }
217
+      ?>
217 218
 
218 219
       <!-- Rules notice and submit button -->
219 220
       <tr>
220 221
         <td colspan="2" style="text-align: center;">
221
-          <p>Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>.
222
-          Not doing this will result in a <strong class="important_text">warning</strong> or <strong class="important_text">worse</strong>.</p>
222
+          <p>
223
+            Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>.
224
+            Not doing this will result in a <strong class="important_text">warning</strong> or <strong class="important_text">worse</strong>.
225
+          </p>
223 226
           <?php if ($this->NewTorrent) { ?>
224 227
           <p>
225 228
             After uploading the torrent, you will have a one hour grace period during which no one other than you can fill requests with this torrent.
@@ -291,7 +294,7 @@ class TorrentForm
291 294
 
292 295
   <!-- Three title fields -->
293 296
   <tr id="title_tr">
294
-    <td class="label">Sequence Name</td>
297
+    <td class="label">Torrent Title</td>
295 298
     <td>
296 299
       <input type="text" id="title" name="title" size="60"
297 300
         value="<?= display_str($Torrent['Title']) ?>"
@@ -301,13 +304,12 @@ class TorrentForm
301 304
   </tr>
302 305
 
303 306
   <tr id="title_rj_tr">
304
-    <td class="label tooltip" title="">Organism
305
-    </td>
307
+    <td class="label" title="">Organism</td>
306 308
     <td>
307 309
       <input type="text" id="title_rj" name="title_rj" size="60"
308 310
         value="<?= display_str($Torrent['TitleRJ']) ?>"
309 311
         <?= $this->Disabled ?>/><br />
310
-      Organism line binomial nomenclature, e.g., <em>Saccharomyces cerevisiae</em>
312
+      Organism line binomial, e.g., <em>Saccharomyces cerevisiae</em>
311 313
     </td>
312 314
   </tr>
313 315
 
@@ -317,7 +319,7 @@ class TorrentForm
317 319
       <input type="text" id="title_jp" name="title_jp" size="60"
318 320
         value="<?= display_str($Torrent['TitleJP']) ?>"
319 321
         <?= $this->Disabled ?>/><br />
320
-      Organism line if applicable, e.g., S288C
322
+      Organism line if any, e.g., S288C
321 323
     </td>
322 324
   </tr>
323 325
 
@@ -325,7 +327,7 @@ class TorrentForm
325 327
   <tr id="idols_tr">
326 328
     <td class="label tooltip" title="">Authors(s)</td>
327 329
     <td id="idolfields">
328
-      One author per field, e.g., Robert K. Mortimer [+] David Schild<br />
330
+      One per field, e.g., Robert K. Mortimer [+] David Schild<br />
329 331
       <?php
330 332
         if (!empty($Torrent['Artists'])) {
331 333
           foreach ($Torrent['Artists'] as $Num => $Artist) {
@@ -367,7 +369,7 @@ class TorrentForm
367 369
       <input type="text" id="series" name="series" size="60"
368 370
         value="<?= display_str($Torrent['Series']) ?>"
369 371
         <?= $this->Disabled ?>/><br />
370
-      Its physical location, e.g., Berkeley, CA
372
+      Physical location, e.g., Berkeley, CA
371 373
     </td>
372 374
   </tr>
373 375
 
@@ -417,7 +419,7 @@ class TorrentForm
417 419
               echo ">$Cont</option>\n";
418 420
           } ?>
419 421
       </select><br />
420
-      The data's file format
422
+      Data file format
421 423
     </td>
422 424
   </tr>
423 425
 
@@ -450,7 +452,7 @@ class TorrentForm
450 452
           $('#resolution').gshow()
451 453
         }
452 454
       </script><br />
453
-      How complete the sequence is
455
+      How complete the data is
454 456
     </td>
455 457
   </tr>
456 458
 
@@ -469,7 +471,7 @@ class TorrentForm
469 471
               echo ">$Archive</option>\n";
470 472
           } ?>
471 473
       </select><br />
472
-      Its compression algorithm
474
+      Compression algorithm
473 475
     </td>
474 476
   </tr>
475 477
 
@@ -530,7 +532,7 @@ class TorrentForm
530 532
       <input type="text" id="image" name="image" size="60"
531 533
         value="<?= display_str($Torrent['Image']) ?>"
532 534
         <?= $this->Disabled ?> /><br />
533
-      A meaningful picture, e.g., of the specimen
535
+      A meaningful picture, e.g., the specimen or a thumbnail
534 536
     </td>
535 537
   </tr>
536 538
 

+ 195
- 166
sections/requests/new_edit.php View File

@@ -1,5 +1,7 @@
1 1
 <?php
2 2
 
3
+# @todo Fix multiple authors and bounty preview
4
+
3 5
 /*
4 6
  * Yeah, that's right, edit and new are the same place again.
5 7
  * It makes the page uglier to read but ultimately better as the alternative means
@@ -18,7 +20,7 @@ if (!$NewRequest) {
18 20
 $Disabled = "";
19 21
 
20 22
 if ($NewRequest && ($LoggedUser['BytesUploaded'] < 250 * 1024 * 1024 || !check_perms('site_submit_requests'))) {
21
-    error('You do not have enough uploaded to make a request.');
23
+    error('You do not have enough uploaded to make a request');
22 24
 }
23 25
 
24 26
 if (!$NewRequest) {
@@ -52,292 +54,319 @@ if (!$NewRequest) {
52 54
         }
53 55
 
54 56
         $ArtistForm = Requests::get_artists($RequestID);
55
-
56 57
         $Tags = implode(', ', $Request['Tags']);
57 58
     }
58 59
 }
59 60
 
60
-if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
61
-    $DB->query("
62
-    SELECT Name
63
-    FROM artists_group
64
-    WHERE artistid = ".$_GET['artistid']."
65
-    LIMIT 1");
66
-    list($ArtistName) = $DB->next_record();
67
-    $ArtistForm = array(
68
-    1 => array(array('name' => trim($ArtistName))),
69
-  );
70
-} elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
71
-    $ArtistForm = Artists::get_artist($_GET['groupid']);
72
-    $DB->query("
73
-    SELECT
74
-      tg.Name,
75
-      tg.NameRJ,
76
-      tg.NameJP,
77
-      tg.Year,
78
-      tg.Studio,
79
-      tg.Series,
80
-      tg.CatalogueNumber,
81
-      tg.DLsiteID,
82
-      tg.WikiImage,
83
-      GROUP_CONCAT(t.Name SEPARATOR ', '),
84
-      tg.CategoryID
85
-    FROM torrents_group AS tg
86
-      JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
87
-      JOIN tags AS t ON t.ID = tt.TagID
88
-    WHERE tg.ID = ".$_GET['groupid']);
89
-    if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
90
-        $GroupID = trim($_REQUEST['groupid']);
91
-        $CategoryName = $Categories[$CategoryID - 1];
92
-        $Disabled = 'readonly="readonly"';
93
-    }
94
-}
61
+  if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
62
+      $DB->query("
63
+        SELECT Name
64
+        FROM artists_group
65
+        WHERE artistid = ".$_GET['artistid']."
66
+        LIMIT 1");
67
+      list($ArtistName) = $DB->next_record();
68
+      $ArtistForm = array(
69
+      1 => array(array('name' => trim($ArtistName))),
70
+    );
71
+  } elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
72
+      $ArtistForm = Artists::get_artist($_GET['groupid']);
73
+      $DB->query("
74
+        SELECT
75
+        tg.Name,
76
+        tg.NameRJ,
77
+        tg.NameJP,
78
+        tg.Year,
79
+        tg.Studio,
80
+        tg.Series,
81
+        tg.CatalogueNumber,
82
+        tg.DLsiteID,
83
+        tg.WikiImage,
84
+        GROUP_CONCAT(t.Name SEPARATOR ', '),
85
+        tg.CategoryID
86
+        FROM torrents_group AS tg
87
+        JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
88
+        JOIN tags AS t ON t.ID = tt.TagID
89
+        WHERE tg.ID = ".$_GET['groupid']);
90
+      if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
91
+          $GroupID = trim($_REQUEST['groupid']);
92
+          $CategoryName = $Categories[$CategoryID - 1];
93
+          $Disabled = 'readonly="readonly"';
94
+      }
95
+  }
95 96
 
96
-View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'bbcode,requests,form_validate');
97
+View::show_header(($NewRequest ? 'Create Request' : 'Edit Request'), 'bbcode,requests,form_validate');
97 98
 ?>
99
+
100
+<!-- HTML title -->
98 101
 <div class="thin">
99 102
   <div class="header">
100
-    <h2><?=($NewRequest ? 'Create a request' : 'Edit a request')?>
101
-    </h2>
103
+    <h2><?= ($NewRequest ? 'Create Request' : 'Edit Request') ?></h2>
102 104
   </div>
103 105
 
106
+  <!-- New request hidden fields -->
104 107
   <div class="box pad">
105 108
     <form action="" method="post" id="request_form" onsubmit="Calculate();">
106 109
       <div>
107 110
         <?php  if (!$NewRequest) { ?>
108 111
         <input type="hidden" name="requestid"
109
-          value="<?=$RequestID?>" />
112
+          value="<?= $RequestID ?>" />
110 113
         <?php  } ?>
111 114
         <input type="hidden" name="auth"
112
-          value="<?=$LoggedUser['AuthKey']?>" />
115
+          value="<?= $LoggedUser['AuthKey'] ?>" />
113 116
         <input type="hidden" name="action"
114
-          value="<?=($NewRequest ? 'takenew' : 'takeedit')?>" />
117
+          value="<?= ($NewRequest ? 'takenew' : 'takeedit') ?>" />
115 118
       </div>
116 119
 
120
+      <!-- Main table -->
117 121
       <table class="layout">
118 122
         <tr>
119
-          <td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the
120
-              request rules</a>!</td>
123
+          <td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the request rules</a>!</td>
121 124
         </tr>
122 125
         <?php  if ($NewRequest || $CanEdit) { ?>
126
+
127
+        <!-- Category -->
123 128
         <tr>
124
-          <td class="label tooltip" title="What alphabet the sequence uses, n.b., plasmids fit in the Other category">
125
-            Type</td>
129
+          <td class="label">Type</td>
126 130
           <td>
127 131
             <?php if (!empty($Disabled)) { ?>
128 132
             <input type="hidden" name="type"
129
-              value="<?=$CategoryName?>" />
133
+              value="<?= $CategoryName ?>" />
130 134
             <select id="categories" name="type" onchange="Categories();" disabled="disabled">
131 135
               <?php } else { ?>
132 136
               <select id="categories" name="type" onchange="Categories();">
133 137
                 <?php } ?>
134
-                <?php    foreach (Misc::display_array($Categories) as $Cat) { ?>
135
-                <option value="<?=$Cat?>" <?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?>
138
+                <?php foreach (Misc::display_array($Categories) as $Cat) { ?>
139
+                <option value="<?= $Cat ?>" <?= (!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '') ?>><?=$Cat?>
136 140
                 </option>
137 141
                 <?php    } ?>
138 142
               </select>
139 143
           </td>
140 144
         </tr>
145
+
146
+        <!-- Catalogue number -->
141 147
         <tr id="cataloguenumber_tr">
142 148
           <td class="label">Accession Number</td>
143 149
           <td>
144 150
             <input type="text" id="catalogue" name="cataloguenumber" size="15"
145
-              value="<?=(isset($CatalogueNumber)?$CatalogueNumber:'') ?>"
146
-              <?=$Disabled?>/>
151
+              value="<?= (isset($CatalogueNumber)?$CatalogueNumber:'') ?>"
152
+              <?= $Disabled ?>/>
147 153
             <?php if (empty($Disabled)) { ?>
148 154
             <input type="button" autofill="jav" value="Autofill"></input>
149 155
             <?php } ?>
150 156
           </td>
151 157
         </tr>
152
-        <tr id="artist_tr">
153
-          <td class="label">Collaborator(s)</td>
154
-          <td id="artistfields">
155
-            <p id="vawarning" class="hidden">Please use the multiple artists feature rather than adding "Various
156
-              Artists" as an artist; read <a href="wiki.php?action=article&amp;id=369">this</a> for more information.
157
-            </p>
158
-            <?php
159
-    if (!empty($ArtistForm)) {
160
-        $First = true;
161
-        foreach ($ArtistForm as $Artist) {
162
-            ?>
163
-            <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
164
-            size="45" value="<?=display_str($Artist['name']) ?>" <?=$Disabled?>/>
165
-            <?php if (empty($Disabled)) {
166
-                if ($First) { ?><a class="add_artist_button brackets">+</a> <a
167
-              class="remove_artist_button brackets">&minus;</a><?php }
168
-                $First = false;
169
-            } ?>
170
-            <br />
171
-            <?php
172
-        }
173
-    } else {
174
-        ?> <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
175
-            size="45" <?=$Disabled?>/>
176
-            <?php if (empty($Disabled)) { ?>
177
-            <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
178
-            <?php } ?>
179
-            <?php
180
-    }
181
-?>
182
-          </td>
183
-        </tr>
158
+
159
+        <!-- Three titles -->
184 160
         <tr>
185
-          <td class="label tooltip" title="FASTA definition line, e.g., Alcohol dehydrogenase ADH1">Sequence Name</td>
161
+          <td class="label">Torrent Title</td>
186 162
           <td>
187 163
             <input type="text" id="title" name="title" size="45"
188
-              value="<?=(!empty($Title) ? $Title : '')?>"
189
-              <?=$Disabled?>/>
164
+              value="<?= (!empty($Title) ? $Title : '') ?>"
165
+              <?= $Disabled ?>/>
190 166
           </td>
191 167
         </tr>
168
+
192 169
         <tr>
193
-          <td class="label tooltip" title="FASTA organism line binomial nomenclature, e.g., Saccharomyces cerevisiae">
194
-            Organism</td>
170
+          <td class="label">Organism</td>
195 171
           <td>
196 172
             <input type="text" id="title_rj" name="title_rj" size="45"
197
-              value="<?=(!empty($TitleRJ) ? $TitleRJ : '')?>"
198
-              <?=$Disabled?>/>
173
+              value="<?= (!empty($TitleRJ) ? $TitleRJ : '') ?>"
174
+              <?= $Disabled ?>/>
199 175
           </td>
200 176
         </tr>
177
+
201 178
         <tr>
202
-          <td class="label tooltip" title="FASTA organism line if applicable, e.g., S288C">Strain/Variety</td>
179
+          <td class="label">Strain/Variety</td>
203 180
           <td>
204 181
             <input type="text" id="title_jp" name="title_jp" size="45"
205
-              value="<?=!empty($TitleJP)?$TitleJP:''?>"
206
-              <?=$Disabled?>/>
182
+              value="<?= !empty($TitleJP)?$TitleJP:'' ?>"
183
+              <?= $Disabled ?>/>
207 184
           </td>
208 185
         </tr>
209
-        <?php  } ?>
210
-        <?php  if ($NewRequest || $CanEdit) { ?>
186
+        <?php  } # Ends if NewRequest line 123 ?>
187
+
188
+        <!-- Multiple artists -->
189
+        <tr id="artist_tr">
190
+          <td class="label">Author(s)</td>
191
+          <td id="artistfields">
192
+            <?php
193
+              if (!empty($ArtistForm)) {
194
+                $First = true;
195
+                foreach ($ArtistForm as $Artist) {
196
+                  # Cycle autocomplete
197
+            ?>
198
+            <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
199
+            size="45" value="<?= display_str($Artist['name']) ?>" <?= $Disabled ?>/>
200
+            <?php
201
+              if (empty($Disabled)) {
202
+                if ($First) { ?>
203
+            <a class="add_artist_button brackets">+</a>
204
+            <a class="remove_artist_button brackets">&minus;</a>
205
+            <?php
206
+                }
207
+                $First = false;
208
+              }
209
+            ?>
210
+            <br />
211
+            <?php
212
+                }
213
+              } else {
214
+            ?>
215
+            <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
216
+            size="45" <?= $Disabled ?>/>
217
+            <?php if (empty($Disabled)) { ?>
218
+            <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
219
+            <?php
220
+                } 
221
+              }
222
+            ?>
223
+          </td>
224
+        </tr>
225
+
226
+        <!-- Picture -->
227
+        <?php if ($NewRequest || $CanEdit) { ?>
211 228
         <tr id="image_tr">
212
-          <td class="label tooltip" title="A meaningful picture, e.g., of the specimen">Picture</td>
229
+          <td class="label">Picture</td>
213 230
           <td>
214 231
             <input type="text" id="image" name="image" size="45"
215
-              value="<?=(!empty($Image) ? $Image : '')?>"
216
-              <?=$Disabled?>/>
232
+              value="<?= (!empty($Image) ? $Image : '') ?>"
233
+              <?= $Disabled ?>/>
217 234
           </td>
218 235
         </tr>
219 236
         <?php  } ?>
237
+
238
+        <!-- Tags -->
220 239
         <tr>
221
-          <td class="label tooltip" title="Comma-seperated list of tags, n.b., use vanity.house for data you produced">
222
-            Tags</td>
240
+          <td class="label">Tags</td>
223 241
           <td>
224 242
             <?php
225
-  $GenreTags = $Cache->get_value('genre_tags');
226
-  if (!$GenreTags) {
227
-      $DB->query('
228
-      SELECT Name
229
-      FROM tags
230
-      WHERE TagType = \'genre\'
231
-      ORDER BY Name');
232
-      $GenreTags = $DB->collect('Name');
233
-      $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
234
-  }
243
+              $GenreTags = $Cache->get_value('genre_tags');
244
+                if (!$GenreTags) {
245
+                  $DB->query('
246
+                    SELECT Name
247
+                    FROM tags
248
+                    WHERE TagType = \'genre\'
249
+                    ORDER BY Name');
250
+                  $GenreTags = $DB->collect('Name');
251
+                  $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
252
+                }
235 253
 
236
-  if (!empty($Disabled)) {
237
-      ?>
254
+                if (!empty($Disabled)) {
255
+            ?>
238 256
             <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" disabled="disabled">
239
-              <?php
240
-  } else { ?>
241
-              <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
242
-                <?php } ?>
243
-                <option>---</option>
244
-                <?php  foreach (Misc::display_array($GenreTags) as $Genre) { ?>
245
-                <option value="<?=$Genre?>"><?=$Genre?>
246
-                </option>
247
-                <?php  } ?>
248
-              </select>
249
-              <input type="text" id="tags" name="tags" size="45"
250
-                value="<?=(!empty($Tags) ? display_str($Tags) : '')?>"
251
-                <?php Users::has_autocomplete_enabled('other'); ?>
252
-              <?=$Disabled?>/>
257
+            <?php } else { ?>
258
+            <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
259
+              <?php } ?>
260
+              <option>---</option>
261
+              <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
262
+              <option value="<?= $Genre ?>"><?= $Genre ?>
263
+              </option>
264
+              <?php  } ?>
265
+            </select>
266
+            <input type="text" id="tags" name="tags" size="45"
267
+              value="<?= (!empty($Tags) ? display_str($Tags) : '') ?>"
268
+              <?php Users::has_autocomplete_enabled('other'); ?>
269
+              <?= $Disabled ?>/>
253 270
           </td>
254 271
         </tr>
255
-        <?php  if ($NewRequest || $CanEdit) { ?>
256
-        <?php  } ?>
272
+
273
+        <!-- Description -->
257 274
         <tr>
258 275
           <td class="label">Description</td>
259 276
           <td>
260
-            <?php          new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
277
+            <?php new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
261 278
           </td>
262 279
         </tr>
280
+
281
+        <!-- Existing torrent groups -->
263 282
         <?php  if (check_perms('site_moderate_requests')) { ?>
264 283
         <tr>
265 284
           <td class="label">Torrent Group</td>
266 285
           <td>
267
-            <?=site_url()?>torrents.php?id=<input type="text"
286
+            If this request matches a torrent group <strong>already existing</strong> on the site, please indicate that here.<br />
287
+            <?= site_url() ?>torrents.php?id=<input type="text"
268 288
               name="groupid"
269
-              value="<?=isset($GroupID)?$GroupID:''?>"
270
-              size="15" /><br />
271
-            If this request matches a torrent group <strong>already existing</strong> on the site, please indicate that
272
-            here.
289
+              value="<?= isset($GroupID)?$GroupID:'' ?>"
290
+              size="15" />
273 291
           </td>
274 292
         </tr>
275
-        <?php  } elseif (!empty($GroupID) && ($CategoryID !== 5) && ($CategoryID !== 0)) { ?>
293
+        <?php
294
+          } elseif (!empty($GroupID)
295
+            #&& ($CategoryID !== 5) # ?
296
+            #&& ($CategoryID !== 0) # ?
297
+            ) {
298
+        ?>
299
+
300
+        <!-- Torrent group admin -->
276 301
         <tr>
277 302
           <td class="label">Torrent Group</td>
278 303
           <td>
279
-            <a href="torrents.php?id=<?=$GroupID?>"><?=site_url()?>torrents.php?id=<?=$GroupID?></a><br />
280
-            This request <?=($NewRequest ? 'will be' : 'is')?>
281
-            associated with the above torrent group.
282
-            <?php    if (!$NewRequest) { ?>
283
-            If this is incorrect, please <a
284
-              href="reports.php?action=report&amp;type=request&amp;id=<?=$RequestID?>">report
285
-              this request</a> so that staff can fix it.
286
-            <?php    } ?>
304
+            <a href="torrents.php?id=<?= $GroupID ?>"><?= site_url() ?>torrents.php?id=<?= $GroupID ?></a><br />
305
+            This request <?= ($NewRequest ? 'will be' : 'is') ?> associated with the above torrent group.
306
+            <?php if (!$NewRequest) { ?>
307
+            If this is incorrect, please
308
+            <a href="reports.php?action=report&amp;type=request&amp;id=<?= $RequestID ?>">report this request</a>
309
+            so that staff can fix it.
310
+            <?php } ?>
287 311
             <input type="hidden" name="groupid"
288
-              value="<?=$GroupID?>" />
312
+              value="<?= $GroupID ?>" />
289 313
           </td>
290 314
         </tr>
291
-        <?php  }
292
-  if ($NewRequest) { ?>
315
+
316
+        <!-- Bounty -->
317
+        <?php  } if ($NewRequest) { ?>
293 318
         <tr id="voting">
294
-          <td class="label tooltip" title="How much upload credit the fulfiller wins">Bounty</td>
319
+          <td class="label">Bounty</td>
295 320
           <td>
296 321
             <input type="text" id="amount_box" size="8"
297
-              value="<?=(!empty($Bounty) ? $Bounty : '100')?>"
322
+              value="<?= (!empty($Bounty) ? $Bounty : '100') ?>"
298 323
               onchange="Calculate();" />
299 324
             <select id="unit" name="unit" onchange="Calculate();">
300
-              <option value="mb" <?=(!empty($_POST['unit']) && $_POST['unit'] === 'mb' ? ' selected="selected"' : '') ?>>MB
325
+              <option value="mb" <?= (!empty($_POST['unit']) && $_POST['unit'] === 'mb' ? ' selected="selected"' : '') ?>>MB
301 326
               </option>
302
-              <option value="gb" <?=(!empty($_POST['unit']) && $_POST['unit'] === 'gb' ? ' selected="selected"' : '') ?>>GB
327
+              <option value="gb" <?= (!empty($_POST['unit']) && $_POST['unit'] === 'gb' ? ' selected="selected"' : '') ?>>GB
303 328
               </option>
304 329
             </select>
305 330
             <input type="button" value="Preview" onclick="Calculate();" />
306
-            <strong><?=($RequestTax * 100)?>% of this is deducted as
307
-              tax by the system.</strong>
331
+            <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax</strong>
308 332
           </td>
309 333
         </tr>
334
+
335
+        <!-- New stats -->
310 336
         <tr>
311
-          <td class="label">Post-Request Information</td>
337
+          <td class="label">New Stats</td>
312 338
           <td>
313 339
             <input type="hidden" id="amount" name="amount"
314
-              value="<?=(!empty($Bounty) ? $Bounty : '100')?>" />
340
+              value="<?= (!empty($Bounty) ? $Bounty : '100') ?>" />
315 341
             <input type="hidden" id="current_uploaded"
316
-              value="<?=$LoggedUser['BytesUploaded']?>" />
342
+              value="<?= $LoggedUser['BytesUploaded'] ?>" />
317 343
             <input type="hidden" id="current_downloaded"
318
-              value="<?=$LoggedUser['BytesDownloaded']?>" />
319
-            Bounty after tax: <strong><span id="bounty_after_tax">90.00 MB</span></strong><br />
320
-            If you add the entered <strong><span id="new_bounty">100.00 MB</span></strong> of bounty, your new stats
321
-            will be: <br />
322
-            Uploaded: <span id="new_uploaded"><?=Format::get_size($LoggedUser['BytesUploaded'])?></span><br />
323
-            Ratio: <span id="new_ratio"><?=Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded'])?></span>
344
+              value="<?= $LoggedUser['BytesDownloaded'] ?>" />
345
+            <ul>
346
+              <!-- <li>Bounty: <span id="bounty_after_tax">90.00 MB</span></li> -->
347
+              <li>Uploaded: <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
348
+              <li>Ratio: <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded']) ?></span></li>
349
+            </ul>
324 350
           </td>
325 351
         </tr>
352
+
353
+        <!-- Submit -->
326 354
         <tr>
327 355
           <td colspan="2" class="center">
328
-            <input type="submit" id="button" value="Create request" disabled="disabled" />
356
+            <input type="submit" id="button" value="Create" disabled="disabled" />
329 357
           </td>
330 358
         </tr>
331
-        <?php  } else { ?>
359
+        <?php } else { ?>
332 360
         <tr>
333 361
           <td colspan="2" class="center">
334
-            <input type="submit" id="button" value="Edit request" />
362
+            <input type="submit" id="button" value="Edit" />
335 363
           </td>
336 364
         </tr>
337
-        <?php  } ?>
365
+        <?php } ?>
338 366
       </table>
339 367
     </form>
340 368
   </div>
341 369
 </div>
370
+
342 371
 <?php
343 372
 View::show_footer();

+ 2
- 2
sections/rules/tag.php View File

@@ -1,11 +1,11 @@
1 1
 <?
2 2
 //Include the header
3
-View::show_header('Tagging rules');
3
+View::show_header('Tagging Rules');
4 4
 ?>
5 5
 <!-- General Rules -->
6 6
 <div class="thin">
7 7
   <div class="header">
8
-    <h3 id="general">Tagging rules</h3>
8
+    <h3 id="general">Tagging Rules</h3>
9 9
   </div>
10 10
   <div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
11 11
 <?    Rules::display_site_tag_rules(false) ?>

+ 2
- 2
sections/torrents/browse.php View File

@@ -166,13 +166,13 @@ View::show_header('Browse Torrents', 'browse');
166 166
         <tr id="artist_name" class="ftr_advanced<?=$HideAdvanced?>">
167 167
           <td class="label"><!--Artist name:--></td>
168 168
           <td class="ft_artistname">
169
-            <input type="search" spellcheck="false" size="65" name="artistname" class="inputtext smaller fti_advanced" placeholder="Collaborator Name" value="<?Format::form('artistname')?>" />
169
+            <input type="search" spellcheck="false" size="65" name="artistname" class="inputtext smaller fti_advanced" placeholder="Author Name" value="<?Format::form('artistname')?>" />
170 170
           </td>
171 171
         </tr>
172 172
         <tr id="album_torrent_name" class="ftr_advanced<?=$HideAdvanced?>">
173 173
           <td class="label"><!--Torrent name:--></td>
174 174
           <td class="ft_groupname">
175
-            <input type="search" spellcheck="false" size="65" name="advgroupname" class="inputtext smaller fti_advanced" placeholder="Sequence Name" value="<?Format::form('advgroupname')?>" />
175
+            <input type="search" spellcheck="false" size="65" name="advgroupname" class="inputtext smaller fti_advanced" placeholder="Torrent Title" value="<?Format::form('advgroupname')?>" />
176 176
           </td>
177 177
         </tr>
178 178
         <tr id="catalogue_number" class="ftr_advanced<?=$HideAdvanced?>">

+ 3
- 1
sections/upload/upload_handle.php View File

@@ -752,11 +752,13 @@ if (!empty($ArtistsUnescaped)) {
752 752
         $ArtistNameList[] = "Artists LIKE '%|".db_string(str_replace('\\', '\\\\', $Artist['name']), true)."|%'";
753 753
     }
754 754
     // Don't add notification if >2 main artists or if tracked artist isn't a main artist
755
+    /*
755 756
     if (count($ArtistNameList) > 2 || $Artist['name'] === 'Various Artists') {
756 757
         $SQL .= " AND (ExcludeVA = '0' AND (";
757 758
         $SQL .= implode(' OR ', array_merge($ArtistNameList, $GuestArtistNameList));
758 759
         $SQL .= " OR Artists = '')) AND (";
759 760
     } else {
761
+    */
760 762
         $SQL .= " AND (";
761 763
         if (!empty($GuestArtistNameList)) {
762 764
             $SQL .= "(ExcludeVA = '0' AND (";
@@ -768,7 +770,7 @@ if (!empty($ArtistsUnescaped)) {
768 770
             $SQL .= " OR ";
769 771
         }
770 772
         $SQL .= "Artists = '') AND (";
771
-    }
773
+    #}
772 774
 } else {
773 775
     $SQL .= "AND (Artists = '') AND (";
774 776
 }

static/common/bioicons/med_img.png → static/common/bioicons/imaging.png View File


+ 31
- 19
static/styles/beluga/style.css View File

@@ -18,16 +18,17 @@
18 18
   padding: 0
19 19
 }
20 20
 
21
-.cats_dna, .cats_mrna, .cats_rrna, .cats_trna, .cats_protein, .cats_other {
21
+.cats_dna, .cats_rna, .cats_protein, .cats_imaging, .cats_other {
22 22
   /* width: 36px!important; */
23 23
   height: 36px!important;
24 24
   line-height: 36px;
25 25
 }
26
-.group .cats_dna:after, .group .cats_mrna:after,
27
-.group .cats_rrna:after, .group .cats_trna:after,
28
-.group .cats_protein:after, .group .cats_other:after {
26
+.group .cats_dna:after, .group .cats_rna:after, .group .cats_protein:after,
27
+.group .cats_imaging:after, .group .cats_other:after {
29 28
   color: black!important;
30 29
 }
30
+
31
+/* DNA */
31 32
 .cats_dna:after {
32 33
   content: "DNA";
33 34
   color: #3EACA7;
@@ -35,41 +36,52 @@
35 36
   letter-spacing: -2px;
36 37
 }
37 38
 .group .cats_dna { background-color: #3EACA7; }
38
-.cats_mrna:after {
39
-  content: "mRNA";
39
+
40
+/* RNA */
41
+.cats_rna:after {
42
+  content: "RNA";
40 43
   color: #1D818E;
41 44
   font-size: 18px;
42 45
   letter-spacing: -2px;
43 46
 }
44
-.group .cats_mrna { background-color: #1D818E; }
45
-.cats_rrna:after {
46
-  content: "rRNA";
47
+.group .cats_rna { background-color: #1D818E; }
48
+
49
+/* Protein */
50
+.cats_protein:after {
51
+  content: "PROT";
47 52
   color: #88C796;
48 53
   font-size: 18px;
49 54
   letter-spacing: -2px;
50 55
 }
51
-.group .cats_rrna { background-color: #88C796; }
52
-.cats_trna:after {
53
-  content: "tRNA";
56
+.group .cats_protein { background-color: #88C796; }
57
+
58
+/* Imaging */
59
+.cats_imaging:after {
60
+  content: "IMG";
54 61
   color: #4DC593;
55 62
   font-size: 18px;
56 63
   letter-spacing: -2px;
57 64
 }
58
-.group .cats_trna { background-color: #4DC593; }
59
-.cats_protein:after {
60
-  content: "PROT";
65
+.group .cats_imaging { background-color: #4DC593; }
66
+
67
+/* Other */
68
+.cats_other:after {
69
+  content: "MISC";
61 70
   color: #77C5D4;
62 71
   font-size: 18px;
63 72
   letter-spacing: -2px;
64 73
 }
65
-.group .cats_protein { background-color: #77C5D4; }
66
-.cats_other:after {
67
-  content: "MISC";
74
+.group .cats_other { background-color: #77C5D4; }
75
+
76
+/* Unused
77
+.cats_unused:after {
78
+  content: "NIL";
68 79
   color: #0D5968;
69 80
   font-size: 18px;
70 81
   letter-spacing: -2px;
71 82
 }
72
-.group .cats_other { background-color: #0D5968; }
83
+.group .cats_unused { background-color: #0D5968; }
84
+*/
73 85
 
74 86
 body {
75 87
   width: 100%;

+ 2
- 3
static/styles/oppai/style.css View File

@@ -6,10 +6,9 @@
6 6
 
7 7
 /* We're going to opt for the category icon method for now, tags_* is also available */
8 8
 .cats_dna { width: 36px; height: 36px; background: url('/static/common/bioicons/dna.png') no-repeat center center; }
9
-.cats_mrna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
10
-.cats_rrna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
11
-.cats_trna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
9
+.cats_rna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
12 10
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/bioicons/protein.png') no-repeat center center; }
11
+.cats_imaging { width: 36px; height: 36px; background: url('/static/common/bioicons/imaging.png') no-repeat center center; }
13 12
 .cats_other { width: 36px; height: 36px; background: url('/static/common/bioicons/other.png') no-repeat center center; }
14 13
 
15 14
 /* Global */

Loading…
Cancel
Save