-
-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
509 additions
and
828 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from "react" | ||
import Avatar from "./avatar" | ||
|
||
const ThreadStarterCard = ({ thread }) => ( | ||
<div className="thread-user-card"> | ||
<div className="thread-user-card-media"> | ||
{thread.starter ? ( | ||
<a href={thread.url.starter}> | ||
<Avatar size={40} user={thread.starter} /> | ||
</a> | ||
) : ( | ||
<Avatar size={40} /> | ||
)} | ||
</div> | ||
<div className="thread-user-card-body"> | ||
<div className="thread-user-card-header"> | ||
{thread.starter ? ( | ||
<a | ||
className="item-title" | ||
href={thread.url.starter} | ||
title={gettext("Thread author")} | ||
> | ||
{thread.starter.username} | ||
</a> | ||
) : ( | ||
<span className="item-title" title={gettext("Thread author")}> | ||
{thread.starter_name} | ||
</span> | ||
)} | ||
</div> | ||
<div> | ||
<span | ||
className="text-muted" | ||
title={interpolate( | ||
gettext("Started on: %(timestamp)s"), | ||
{ | ||
timestamp: thread.started_on.format("LLL"), | ||
}, | ||
true | ||
)} | ||
> | ||
{thread.started_on.fromNow()} | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
|
||
export default ThreadStarterCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
frontend/src/components/thread/ThreadHeader/ThreadHeaderBreadcrumbs.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
import React from "react" | ||
import { Breadcrumbs, BreadcrumbsCategory, BreadcrumbsRootCategory } from "../../Breadcrumbs" | ||
import { | ||
Breadcrumbs, | ||
BreadcrumbsCategory, | ||
BreadcrumbsRootCategory, | ||
} from "../../Breadcrumbs" | ||
|
||
const ThreadHeaderBreadcrumbs = ({ breadcrumbs }) => ( | ||
<Breadcrumbs> | ||
{breadcrumbs.map(category => ( | ||
category.special_role ? <BreadcrumbsRootCategory key={category.id} category={category} /> : <BreadcrumbsCategory key={category.id} category={category} /> | ||
))} | ||
{breadcrumbs.map((category) => | ||
category.special_role ? ( | ||
<BreadcrumbsRootCategory key={category.id} category={category} /> | ||
) : ( | ||
<BreadcrumbsCategory key={category.id} category={category} /> | ||
) | ||
)} | ||
</Breadcrumbs> | ||
) | ||
|
||
export default ThreadHeaderBreadcrumbs | ||
export default ThreadHeaderBreadcrumbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import ThreadHeader from "./ThreadHeader" | ||
|
||
export default ThreadHeader | ||
export default ThreadHeader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from "react" | ||
import ThreadModerationOptions from "./moderation/thread" | ||
|
||
const ThreadModeration = ({ thread, posts, moderation }) => ( | ||
<div className="dropdown"> | ||
<button | ||
type="button" | ||
className="btn btn-default btn-outline btn-icon dropdown-toggle" | ||
title={gettext("Thread options")} | ||
data-toggle="dropdown" | ||
aria-haspopup="true" | ||
aria-expanded="false" | ||
disabled={thread.isBusy} | ||
> | ||
<span className="material-icon">settings</span> | ||
</button> | ||
<ThreadModerationOptions | ||
thread={thread} | ||
posts={posts} | ||
moderation={moderation} | ||
/> | ||
</div> | ||
) | ||
|
||
export default ThreadModeration |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.