Skip to content

Commit

Permalink
Merge pull request #68 from weseek/master
Browse files Browse the repository at this point in the history
release 1.1.5
  • Loading branch information
yuki-takei authored May 22, 2017
2 parents a8d184e + 0ceaf2f commit 6cee1c6
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 72 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGES
========

## 1.1.5

* Fix: crowi-plus Enhanced Layout
* Support: Merge official Crowi v1.6.1 master branch [573144b]

## 1.1.4

* Feature: Ensure to select layout type from Admin Page
Expand Down
4 changes: 1 addition & 3 deletions lib/views/crowi-plus/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@
{% endblock %}

{% block content_main_after %}
{% if not page.isDeleted() %}
{% include 'widget/comments.html' %}
{% endif %}
{% include 'widget/comments.html' %}
{% endblock %}
4 changes: 1 addition & 3 deletions lib/views/crowi-plus/page_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@
{% endblock %}

{% block content_main_after %}
{% if not page.isDeleted() %}
{% include 'widget/comments.html' %}
{% endif %}
{% include 'widget/comments.html' %}
{% endblock %}
2 changes: 2 additions & 0 deletions lib/views/crowi-plus/widget/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ <h4><i class="fa fa-comments"></i> Comments</h4>
<div class="page-comments-list-older collapse in" id="page-comments-list-older"></div>
</div>

{% if page and not page.isDeleted() %}
<form class="form page-comment-form" id="page-comment-form" onsubmit="return false;">
<div class="comment-form">
<div class="comment-form-user">
Expand All @@ -40,6 +41,7 @@ <h4><i class="fa fa-comments"></i> Comments</h4>
</div>
</div>
</form>
{% endif %}

</div>

Expand Down
7 changes: 7 additions & 0 deletions lib/views/crowi-plus/widget/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ <h1 class="title flex-item-title" id="revision-path"></h1>
</ul>
{% endif %}

{% if not page and not isUserPageList(path) and !isTrashPage() %}
<div class="portal-form-button">
<button class="btn btn-primary" id="create-portal-button">Create Portal</button>
<p class="help-block"><a href="#" data-target="#help-portal" data-toggle="modal"><i class="fa fa-question-circle"></i> What is Portal?</a></p>
</div>
{% endif %}

</div>

</header>
Expand Down
15 changes: 6 additions & 9 deletions lib/views/me/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,14 @@ <h1 class="title" id="">{{ t('User Settings') }}</h1>
</p>
{% endif %}
</div>
<div class="form-group {% if not user.lang %}has-error{% endif %}">
<label for="userForm[lang]" class="col-sm-2 control-label">{{ t('Language') }}</label>
<div class="col-sm-4 radio">
<label><input type="radio" name="userForm[lang]" value="{{ consts.language.LANG_EN_US }}" {% if user.lang == consts.language.LANG_EN_US %}checked="checked"{% endif %}>{{ t('English') }}</label>
<label><input type="radio" name="userForm[lang]" value="{{ consts.language.LANG_JA }}" {% if user.lang == consts.language.LANG_JA %}checked="checked"{% endif %}>{{ t('Japanese') }}</label>
</div>
<div class="col-sm-offset-2 col-sm-10">
</div>
</div>
<div class="form-group {% if not user.lang %}has-error{% endif %}">
<label for="userForm[lang]" class="col-sm-2 control-label">{{ t('Language') }}</label>
<div class="col-sm-4">
<label class="radio-inline"><input type="radio" name="userForm[lang]" value="{{ consts.language.LANG_EN_US }}" {% if user.lang == consts.language.LANG_EN_US %}checked="checked"{% endif %}>{{ t('English') }}</label>
<label class="radio-inline"><input type="radio" name="userForm[lang]" value="{{ consts.language.LANG_JA }}" {% if user.lang == consts.language.LANG_JA %}checked="checked"{% endif %}>{{ t('Japanese') }}</label>
</div>
</div>

<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">{{ t('Update') }}</button>
Expand Down
1 change: 1 addition & 0 deletions lib/views/page_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ <h1 class="title flex-item-title">
data-page-revision-created="{% if revision %}{{ revision.createdAt|datetz('U') }}{% endif %}"
data-page-is-seen="{% if page and page.isSeenUser(user) %}1{% else %}0{% endif %}"
data-linebreaks-enabled="{{ isEnabledLinebreaks() }}"
data-csrftoken="{{ csrf() }}"
>

<div class="portal {% if not page or req.query.offset > 0 %}hide{% endif %}">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crowi-plus",
"version": "1.1.4-RC",
"version": "1.1.5-RC",
"description": "Enhanced Crowi",
"tags": [
"wiki",
Expand Down
80 changes: 31 additions & 49 deletions resource/css/_comment_crowi-plus.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
.crowi-plus.main-container {

%comment-section {
background: #f5f5f5;
padding: 1em;
position: relative;
margin-left: 4.5em;
margin-bottom: 1em;
border-radius: 3px;
&:before {
border: 1em solid transparent;
border-right-color:#f5f5f5;
border-left-width: 0;
left: -1em;
content: "";
display: block;
top: 1.5em;
position: absolute;
width: 0;
}
}

%picture-rounded {
position: absolute;
top: 1em;
width: 3em;
height: 3em;
}

.page-comments-row {
border-top: 5px solid #f0f0f0;
margin: 30px 16px;
Expand All @@ -16,31 +43,12 @@

// ユーザーアイコン
.picture.picture-rounded {
position: absolute;
top: 1em;
width: 3em;
height: 3em;
@extend %picture-rounded;
}

// コメントセクション
.page-comment-main {
background: #f5f5f5;
padding: 1em;
position: relative;
margin-left: 4.5em;
margin-bottom: 1em;
border-radius: 3px;
&:before {
border: 2em solid transparent;
border-right-color:#f5f5f5;
border-left-width: 0;
left: -1em;
content: "";
display: block;
top: 0.5em;
position: absolute;
width: 0;
}
@extend %comment-section;
}

// コメント本文
Expand All @@ -59,38 +67,12 @@
margin-top: 2em;
// ユーザーアイコン
.picture.picture-rounded {
position: absolute;
top: 1em;
width: 3em;
height: 3em;
@extend %picture-rounded;
}

// コメントフォームセクション
.comment-form-main {
margin-left: 4.5em;
margin-bottom: 1em;
background: #f5f5f5;
padding: 1em;
position: relative;
border-radius: 3px;
&:before {
border: 2em solid transparent;
border-right-color:#f5f5f5;
border-left-width: 0;
left: -1em;
content: "";
display: block;
top: 0.5em;
position: absolute;
width: 0;
}
}

// コメントの吹き出しアイコン
.comment-ico {
font-size: 1.2em;
margin-right: 0.3em;
opacity: 0.6;
@extend %comment-section;
}

// コメント入力フォーム
Expand Down
2 changes: 1 addition & 1 deletion resource/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const componentMappings = {
};
if (pagePath) {
componentMappings['revision-path'] = <RevisionPath pagePath={pagePath} />;
componentMappings['revision-url'] = <RevisionUrl pagePath={pagePath} url={location.href} />;
componentMappings['revision-url'] = <RevisionUrl pageId={pageId} pagePath={pagePath} />;
}

Object.keys(componentMappings).forEach((key) => {
Expand Down
8 changes: 6 additions & 2 deletions resource/js/components/HeaderSearchBox/SearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export default class SearchForm extends React.Component {
}

render() {
const emptyLabel = (this.state.searchError !== null) ? 'Error on searching.' : 'No matches found.';
const emptyLabel = (this.state.searchError !== null)
? 'Error on searching.'
: 'No matches found on title... Hit [Enter] key so that search on contents.';
const formClear = this.getFormClearComponent();

return (
Expand All @@ -116,7 +118,9 @@ export default class SearchForm extends React.Component {
labelKey="path"
minLength={2}
options={this.state.pages}
placeholder="Search ... Page Title (Path) and Content"
placeholder="Search ..."
emptyLabel={emptyLabel}
align='left'
submitFormOnEnter={true}
onSearch={this.search}
onInputChange={this.onInputChange}
Expand Down
11 changes: 7 additions & 4 deletions resource/js/components/Page/RevisionUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ export default class RevisionUrl extends React.Component {
fontSize: "1em"
}

const urlText = decodeURIComponent(this.props.url);
const copiedText = this.props.pagePath + '\n' + this.props.url;
const url = (this.props.pageId === '')
? decodeURIComponent(location.href)
: `${location.origin}/${this.props.pageId}`;
const copiedText = this.props.pagePath + '\n' + url;

return (
<span>
{urlText}
{url}
<CopyButton buttonId="btnCopyRevisionUrl" text={copiedText}
buttonClassName="btn btn-default" buttonStyle={buttonStyle} iconClassName="fa fa-link text-muted" />
</span>
Expand All @@ -28,6 +31,6 @@ export default class RevisionUrl extends React.Component {
}

RevisionUrl.propTypes = {
pageId: React.PropTypes.string.isRequired,
pagePath: React.PropTypes.string.isRequired,
url: React.PropTypes.string.isRequired,
};

0 comments on commit 6cee1c6

Please sign in to comment.