droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 1 | <div id="maincontent"> |
| 2 | <div id="midcolumn"> |
| 3 | |
| 4 | <h1><?= $pageTitle ?></h1> |
droy | 4e8fc0e | 2008-02-04 14:42:30 +0000 | [diff] [blame] | 5 | <p>Use this form to define the map files for your project. The map files are read nightly, and any .properties files (except build.properties) contained in the plugins they reference will be parsed and imported into Babel, allowing the community to translate the externalized strings.</p> |
| 6 | <p>This page is only accessible by Eclipse committers.</p> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 7 | <form name="form1" method="post"> |
| 8 | <table cellspacing=4 cellpadding=0 border=0 width="950"> |
| 9 | <tr><td></td><td colspan=2 style="color:red;"><?= $GLOBALS['g_ERRSTRS'][0] ?></td></tr> |
| 10 | <tr> |
| 11 | <td>Project:</td><td><select name="project_id" onchange="fnSetVersionList();"> |
| 12 | <?php |
| 13 | while($myrow = mysql_fetch_assoc($rs_project_list)) { |
| 14 | $selected = ""; |
| 15 | if($myrow['project_id'] == $PROJECT_ID) { |
| 16 | $selected = 'selected="selected"'; |
| 17 | } |
| 18 | echo "<option value='" . $myrow['project_id'] . "' $selected>" . $myrow['project_id'] . "</option>"; |
| 19 | } |
| 20 | ?></select></td> |
| 21 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][1] ?></td> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td>Release Version</td><td><select name="version" onchange="fnUpdateFileList();"> |
| 25 | </select></td> |
| 26 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][4] ?></td> |
| 27 | </tr> |
| 28 | <tr> |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame^] | 29 | <td>Release Train</td><td><select name="train_id"> |
| 30 | <?php |
| 31 | while($myrow = mysql_fetch_assoc($rs_train_list)) { |
| 32 | $selected = ""; |
| 33 | if($myrow['train_id'] == $TRAIN_ID) { |
| 34 | $selected = 'selected="selected"'; |
| 35 | } |
| 36 | echo "<option value='" . $myrow['train_id'] . "' $selected>" . $myrow['train_id'] . "</option>"; |
| 37 | } |
| 38 | ?> |
| 39 | </select></td> |
| 40 | <td></td> |
| 41 | </tr> |
| 42 | <tr> |
| 43 | <td></td><td>Babel builds one update site per Train. Even if your project does not participate in the actual train, please pick the Train that your project is targetting.</td> |
| 44 | </tr> |
| 45 | <tr> |
| 46 | <td> </td><td></td> |
| 47 | </tr> |
| 48 | |
| 49 | <tr> |
atoulme | e9ec6d8 | 2008-11-19 14:41:30 +0000 | [diff] [blame] | 50 | <td><a href="<?php echo imageRoot() ?>/viewcvs/index.cgi">ViewCVS</a> download URL to map file:</td><td><input type="text" name="location" value="<?= $LOCATION ?>" size="80" onchange="fnCheckUrl();" /></td> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 51 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][2] ?></td> |
| 52 | </tr> |
| 53 | <tr> |
atoulme | e9ec6d8 | 2008-11-19 14:41:30 +0000 | [diff] [blame] | 54 | <td> </td><td>e.g. <a href="<?php echo imageRoot() ?>/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co</a></td> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 55 | </tr> |
| 56 | <tr> |
droy | 0cf9cb7 | 2008-07-23 20:55:02 +0000 | [diff] [blame] | 57 | <td> </td><td><b>NOTE: </b>If you're defining map files for a Release, you must use the download link to the CVS TAG of that release. This is the pathrev=R3_4 parameter in this example:<br /> |
| 58 | <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co&pathrev=R3_4">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co&pathrev=R3_4</a> |
| 59 | </td> |
| 60 | </tr> |
| 61 | <tr> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 62 | <td>File name: </td><td><input type="text" name="filename" value="<?= $FILENAME ?>" size="32" /></td> |
| 63 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][5] ?></td> |
| 64 | </tr> |
| 65 | |
| 66 | <tr> |
| 67 | <td></td><td><input type="submit" name="submit" value="Save" style="font-size:14px;" /></td></tr> |
| 68 | <tr> |
| 69 | <td colspan="2"><iframe id="fileShow" name="somefiles" width="100%" height="200" |
| 70 | style="border: 1px black solid" |
| 71 | src=""> |
| 72 | </iframe> |
| 73 | </td> |
| 74 | </tr> |
| 75 | </table> |
| 76 | </form> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 77 | <script language="javascript"> |
| 78 | function fnSetVersionList() { |
| 79 | document.form1.version.options.length = 0; |
| 80 | |
droy | 80e86bc | 2008-02-04 16:05:41 +0000 | [diff] [blame] | 81 | if(typeof(versions[document.form1.project_id.value]) != "undefined") { |
| 82 | for(i = 0; i < versions[document.form1.project_id.value].length; i++) { |
| 83 | var opt = document.createElement("OPTION"); |
| 84 | document.form1.version.options.add(opt); |
| 85 | document.form1.version.options[i].text = versions[document.form1.project_id.value][i]; |
| 86 | document.form1.version.options[i].value = versions[document.form1.project_id.value][i]; |
| 87 | if(versions[document.form1.project_id.value][i] == "<?= $VERSION ?>") { |
| 88 | document.form1.version.options[i].selected = "selected"; |
| 89 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 90 | } |
| 91 | } |
droy | 80e86bc | 2008-02-04 16:05:41 +0000 | [diff] [blame] | 92 | else { |
| 93 | var opt = document.createElement("OPTION"); |
| 94 | document.form1.version.options.add(opt); |
| 95 | document.form1.version.options[0].text = "unspecified"; |
| 96 | document.form1.version.options[0].value = "unspecified"; |
| 97 | } |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame^] | 98 | |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 99 | fnUpdateFileList(); |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | function fnUpdateFileList() { |
| 103 | source = "map_files.php?submit=showfiles&project_id=" + document.form1.project_id.value + "&version=" + document.form1.version.options[document.form1.version.selectedIndex].value; |
| 104 | document.getElementById("fileShow").src = source; |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame^] | 105 | fnSetTrain(); |
| 106 | } |
| 107 | |
| 108 | function fnSetTrain() { |
| 109 | <?# Update train according to selected project/version ?> |
| 110 | if(typeof(project_trains[document.form1.project_id.value][document.form1.version.options[document.form1.version.selectedIndex].value]) != "undefined") { |
| 111 | for(i = 0; i < document.form1.train_id.length; i++) { |
| 112 | document.form1.train_id.options[i].selected = ""; |
| 113 | if(document.form1.train_id.options[i].value == project_trains[document.form1.project_id.value][document.form1.version.options[document.form1.version.selectedIndex].value]) { |
| 114 | document.form1.train_id.options[i].selected = "selected"; |
| 115 | } |
| 116 | } |
| 117 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 118 | } |
| 119 | |
| 120 | function fnCheckUrl() { |
| 121 | if(!document.form1.location.value.match(/view=co/)) { |
gobrien | 1a8e02f | 2008-01-30 01:46:26 +0000 | [diff] [blame] | 122 | alert("The ViewCVS URL must contain view=co"); |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 123 | document.form1.submit.disabled = "disabled"; |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 124 | } |
| 125 | else { |
| 126 | document.form1.submit.disabled = ""; |
| 127 | |
| 128 | var re = /\/([A-Za-z0-9_-]+\.map)/; |
| 129 | var match = re.exec(document.form1.location.value) |
| 130 | document.form1.filename.value = match[1]; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | var versions = new Array(); |
| 135 | |
| 136 | <?php |
| 137 | $prev_project = ""; |
| 138 | $count = 0; |
| 139 | while($myrow = mysql_fetch_assoc($rs_version_list)) { |
| 140 | if($prev_project != $myrow['project_id']) { |
| 141 | if($count > 0) { |
| 142 | echo "]; |
| 143 | "; |
| 144 | } |
| 145 | echo "versions['" . $myrow['project_id'] . "'] = ["; |
| 146 | $count = 0; |
| 147 | } |
| 148 | if($count > 0) { |
| 149 | echo ","; |
| 150 | } |
| 151 | echo "\"" . $myrow['version'] . "\""; |
| 152 | $count++; |
| 153 | $prev_project = $myrow['project_id']; |
| 154 | } |
| 155 | echo "];"; |
| 156 | ?> |
| 157 | |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame^] | 158 | |
| 159 | var project_trains = new Array(); |
| 160 | |
| 161 | <?php |
| 162 | $prev_project = ""; |
| 163 | $count = 0; |
| 164 | while($myrow = mysql_fetch_assoc($rs_train_project_list)) { |
| 165 | if($prev_project != $myrow['project_id']) { |
| 166 | if($count > 0) { |
| 167 | echo "}; |
| 168 | "; |
| 169 | } |
| 170 | echo "project_trains['" . $myrow['project_id'] . "'] = {"; |
| 171 | $count = 0; |
| 172 | } |
| 173 | if($count > 0) { |
| 174 | echo ","; |
| 175 | } |
| 176 | echo "'" . $myrow['version'] . "' : '" . $myrow['train_id'] . "'"; |
| 177 | $count++; |
| 178 | $prev_project = $myrow['project_id']; |
| 179 | } |
| 180 | echo "};"; |
| 181 | ?> |
| 182 | fnSetVersionList(); |
| 183 | |
| 184 | document.form1.submit.disabled = "disabled"; |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 185 | |
| 186 | </script> |