Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion add card style coherence #1884

Merged
merged 3 commits into from Sep 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -16,6 +16,7 @@
- Improved upload error handling: deduplicate notifications, localized generic error message, sentry identifier... [#1842](https://github.com/opendatateam/udata/pull/1842)
- Allows to filter datasets on resource `type` (needs reindexing) [#1848](https://github.com/opendatateam/udata/pull/1848)
- Switch the admin sidebar collapse icon from "hamburger"to left and right arrows [#1855](https://github.com/opendatateam/udata/pull/1855)
- Discussion add card style coherence [#1884](https://github.com/opendatateam/udata/pull/1884)

### Breaking changes

Expand Down
46 changes: 27 additions & 19 deletions js/components/discussions/threads.vue
@@ -1,25 +1,31 @@
<style scoped lang="less">
.sort {
margin-top: -32px;
margin-bottom: 1em;
text-align: right;
}

.loading {
margin: 2em;
text-align: center;
}

.sort {
margin-bottom: 1em;
text-align: right;
}

.add {
h4 {
line-height: 30px;
margin-top: 9px;
margin-left: 60px;
font-size: 14px;
font-weight: bold;
.discussion-card.add {
cursor: pointer;
.card-logo {
background-color: #eeeeee;
font-size: 2em;
display: flex;
justify-content: center;
align-items: center;
height: 60px;
}
.card-body {
min-height: auto;
justify-content: left;
h4 {
margin-bottom: 0;
}
}
}

Expand Down Expand Up @@ -64,7 +70,7 @@
</ul>
</div>
</div>

<discussion-thread
v-ref:threads
v-for="discussion in discussions"
Expand All @@ -74,9 +80,11 @@
</discussion-thread>

<!-- New discussion -->
<a class="list-group-item add new-discussion" @click="displayForm" v-show="!formDisplayed">
<div class="format-label pull-left">+</div>
<h4 class="list-group-item-heading">{{ _('Start a new discussion') }}</h4>
<a class="card discussion-card add" @click="displayForm" v-show="!formDisplayed">
<div class="card-logo"><span>+</span></div>
<div class="card-body">
<h4>{{ _('Start a new discussion') }}</h4>
</div>
</a>

<div v-el:form id="discussion-create" v-show="formDisplayed" v-if="currentUser"
Expand All @@ -95,7 +103,7 @@
<h4 class="list-group-item-heading">
{{ _('Starting a new discussion thread') }}
</h4>

<p class="list-group-item-text">
{{ _("You're about to start a new discussion thread. Make sure that a thread about the same topic doesn't exist yet just above.") }}
</p>
Expand Down Expand Up @@ -159,7 +167,7 @@ export default {
},
ready() {
this.$api.get('discussions/', {for: this.subjectId}).then(response => {

this.loading = false;
this.discussions = response.data;

Expand Down Expand Up @@ -244,7 +252,7 @@ export default {
.discussion-threads {
.list-group-form {
height: inherit;

form {
padding: 1em;
}
Expand Down
4 changes: 2 additions & 2 deletions udata/templates/dataset/display.html
Expand Up @@ -196,7 +196,7 @@ <h3 class="text-left">{{ _('Producer') }}</h3>
<div class="panel panel-default text-center">
<div class="panel-body">
<h3 class="text-left">{{ _('Author') }}</h3>

{% with user=dataset.owner %}
{% include theme('user/sidebar-user.html') %}
{% endwith %}
Expand Down Expand Up @@ -395,7 +395,7 @@ <h3 id="community-resources">{{ _('Community resources') }}</h3>
href="{{ url_for('admin.index', path='community-resource/new/', **{'dataset_id': dataset.id}) }}">
<div class="card-logo"><span>+</span></div>
<div class="card-body">
<h4>{{ _('New community resource') }}</h4>
<h4>{{ _('Add a community resource') }}</h4>
</div>
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions udata/translations/udata.pot
Expand Up @@ -8,16 +8,16 @@ msgid ""
msgstr ""
"Project-Id-Version: udata 1.6.0.dev0\n"
"Report-Msgid-Bugs-To: i18n@opendata.team\n"
"POT-Creation-Date: 2018-09-07 11:01+0200\n"
"PO-Revision-Date: 2018-09-07 11:01+0200\n"
"POT-Creation-Date: 2018-09-11 11:57+0200\n"
"PO-Revision-Date: 2018-09-11 11:57+0200\n"
"Last-Translator: Open Data Team <i18n@opendata.team>\n"
"Language: en\n"
"Language-Team: Open Data Team <i18n@opendata.team>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.5.0\n"
"Generated-By: Babel 2.5.3\n"

#: udata/settings.py:93
msgid "Welcome"
Expand Down Expand Up @@ -1929,7 +1929,7 @@ msgid "Community resources"
msgstr ""

#: udata/templates/dataset/display.html:398
msgid "New community resource"
msgid "Add a community resource"
msgstr ""

#: udata/templates/dataset/display.html:405
Expand Down