Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
79670397
Commit
79670397
authored
Aug 05, 2014
by
tady (Masato TADA)
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #129 from tadyjp/fix-bug-and-style
[WIP] バグ修正、スタイル修正
parents
2b94977d
f2cee638
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
12 deletions
+41
-12
app/assets/javascripts/modules/mod-image-style.js.coffee
+12
-0
app/assets/stylesheets/lib/mod-github.css.scss
+0
-0
app/assets/stylesheets/modules/mod-image-style.css.scss
+16
-0
app/assets/stylesheets/watchings.css.scss
+0
-3
app/controllers/posts_controller.rb
+1
-0
app/decorators/tag_decorator.rb
+3
-3
app/views/partials/_app_header.html.slim
+8
-5
app/views/posts/show.html.slim
+1
-1
No files found.
app/assets/javascripts/modules/mod-image-style.js.coffee
0 → 100644
View file @
79670397
# Desc
# .mod-image-style以下のimgタグにstyle用のclassをつける
# Usage:
# Example:
$
->
$
(
'.mod-image-style'
).
find
(
'img'
).
addClass
(
'img-thumbnail'
)
$
(
'.mod-image-style'
).
find
(
'img'
).
parent
(
'a'
)
.
append
(
"""<button type="button" class="btn btn-info btn-lg">
<span class="glyphicon glyphicon-share"></span> Open in New Tab
</button>"""
)
app/assets/stylesheets/github.css.scss
→
app/assets/stylesheets/
lib/mod-
github.css.scss
View file @
79670397
File moved
app/assets/stylesheets/modules/mod-image-style.css.scss
0 → 100644
View file @
79670397
.mod-image-style
{
a
{
position
:
relative
;
}
a
button
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
margin-left
:
-105px
;
margin-top
:
-23px
;
background
:
white
;
}
}
app/assets/stylesheets/watchings.css.scss
deleted
100644 → 0
View file @
2b94977d
// Place all the styles related to the watchings controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
app/controllers/posts_controller.rb
View file @
79670397
...
@@ -23,6 +23,7 @@ class PostsController < ApplicationController
...
@@ -23,6 +23,7 @@ class PostsController < ApplicationController
def
fork
def
fork
@post
=
set_post
.
generate_fork
(
current_user
)
@post
=
set_post
.
generate_fork
(
current_user
)
@post
.
tags
.
destroy
Tag
.
find_by
(
name:
'template'
)
render
action:
'new'
render
action:
'new'
end
end
...
...
app/decorators/tag_decorator.rb
View file @
79670397
...
@@ -15,15 +15,15 @@ class TagDecorator < Draper::Decorator
...
@@ -15,15 +15,15 @@ class TagDecorator < Draper::Decorator
# tagページのURL
# tagページのURL
# urlエンコードを施す
# urlエンコードを施す
def
show_path
def
show_path
h
.
tag_path
(
name:
h
.
url_encode
(
model
.
name
)
)
h
.
tag_path
(
name:
model
.
name
)
end
end
def
edit_path
def
edit_path
h
.
edit_tag_path
(
name:
h
.
url_encode
(
model
.
name
)
)
h
.
edit_tag_path
(
name:
model
.
name
)
end
end
def
event_tag_path
def
event_tag_path
h
.
event_tag_path
(
name:
h
.
url_encode
(
model
.
name
)
)
h
.
event_tag_path
(
name:
model
.
name
)
end
end
# tagをtree viewで表示する
# tagをtree viewで表示する
...
...
app/views/partials/_app_header.html.slim
View file @
79670397
...
@@ -31,11 +31,14 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation"
...
@@ -31,11 +31,14 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation"
span
.glyphicon.glyphicon-flag
span
.glyphicon.glyphicon-flag
-
if
current_user
.
notifications
.
unread
.
any?
-
if
current_user
.
notifications
.
unread
.
any?
span
.badge
=
current_user
.
notifications
.
unread
.
recent
.
count
span
.badge
=
current_user
.
notifications
.
unread
.
recent
.
count
li
.new-post-btn
form
-
unless
params
[
:action
]
==
'new'
&&
params
[
:controller
]
==
'posts'
a
.btn.navbar-btn
href
=
new_post_path
li
.new-post-btn
|
投稿する
form
=
image_tag
'write.png'
,
class:
"write"
a
.btn.navbar-btn
href
=
new_post_path
|
投稿する
=
image_tag
'write.png'
,
class:
"write"
li
.dropdown
li
.dropdown
a
.dropdown-toggle
data-toggle
=
"dropdown"
a
.dropdown-toggle
data-toggle
=
"dropdown"
=
current_user
.
name
=
current_user
.
name
...
...
app/views/posts/show.html.slim
View file @
79670397
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
.panel-heading
.panel-heading
h3
.panel-title
h3
.panel-title
a
href
=
post_path
(
@post
)
=
@post
.
title
a
href
=
post_path
(
@post
)
=
@post
.
title
.panel-body.viewer.github
.panel-body.viewer.github
.mod-image-style
=
MarkdownRenderer
.
new
(
@post
.
body
).
render
=
MarkdownRenderer
.
new
(
@post
.
body
).
render
.col-xs-3
.col-xs-3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment