mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Split mission and world name in missions list
This commit is contained in:
parent
a9f49bbbcf
commit
cd9f9f82f5
@ -43,12 +43,19 @@ Missions.prototype.updateMissions = function (cb) {
|
||||
return cb(err)
|
||||
}
|
||||
|
||||
var filenameWithoutPbo = path.basename(filename, '.pbo')
|
||||
var worldName = path.extname(filenameWithoutPbo)
|
||||
var missionName = path.basename(filenameWithoutPbo, worldName)
|
||||
worldName = worldName.replace('.', '')
|
||||
|
||||
cb(null, {
|
||||
dateCreated: new Date(stat.ctime),
|
||||
dateModified: new Date(stat.mtime),
|
||||
missionName: missionName,
|
||||
name: filename,
|
||||
size: stat.size,
|
||||
sizeFormatted: filesize(stat.size)
|
||||
sizeFormatted: filesize(stat.size),
|
||||
worldName: worldName
|
||||
})
|
||||
})
|
||||
}, function (err, missions) {
|
||||
|
@ -2,6 +2,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mission</th>
|
||||
<th>World</th>
|
||||
<th>Size</th>
|
||||
<th>Updated</th>
|
||||
<th></th>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<td style="width: 100%;">
|
||||
<a href='/api/missions/<%-encodeURI(name)%>'><%-name%></a>
|
||||
<a href='/api/missions/<%-encodeURI(name)%>'><%-missionName%></a>
|
||||
</td>
|
||||
<td><%-worldName%></td>
|
||||
<td class="text-nowrap"><%-sizeFormatted%></td>
|
||||
<td class="text-nowrap"><%-dateModified.substring(0, 10)%></td>
|
||||
<td>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mission</th>
|
||||
<th>World</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -1,5 +1,8 @@
|
||||
<td>
|
||||
<%-name%>
|
||||
<%-missionName%>
|
||||
</td>
|
||||
<td>
|
||||
<%-worldName%>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-xs add pull-right">
|
||||
|
Loading…
Reference in New Issue
Block a user