Barış Soner Uşaklı 6 years ago
parent 3baee00da5
commit dd2c767cc3

@ -38,6 +38,9 @@ define('persona/quickreply', ['components'], function(components) {
if (err) { if (err) {
app.alertError(err.message); app.alertError(err.message);
} }
if (data && data.queued) {
app.alertSuccess(data.message);
}
components.get('topic/quickreply/text').val(''); components.get('topic/quickreply/text').val('');
}); });
}); });

@ -111,6 +111,13 @@ library.addUserToTopic = function(data, callback) {
callback(null, data); callback(null, data);
}); });
} else { } else {
data.templateData.loggedInUser = {
uid: 0,
username: '[[global:guest]]',
picture: user.getDefaultAvatar(),
'icon:text': '?',
'icon:bgColor': '#aaa',
};
callback(null, data); callback(null, data);
} }
}; };

@ -1,4 +1,4 @@
<!-- IF loggedIn --> <!-- IF privileges.topics:reply -->
<div class="clearfix quick-reply"> <div class="clearfix quick-reply">
<div class="icon pull-left hidden-xs"> <div class="icon pull-left hidden-xs">
<a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->"> <a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->">
@ -21,4 +21,4 @@
<button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">Post quick reply</button> <button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">Post quick reply</button>
</form> </form>
</div> </div>
<!-- ENDIF loggedIn --> <!-- ENDIF privileges.topics:reply -->

Loading…
Cancel
Save