Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
SpacePoints
Commits
030d513d
Commit
030d513d
authored
Feb 13, 2014
by
surma Lodur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style fixes
parent
143a66d4
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
132 additions
and
86 deletions
+132
-86
app/assets/stylesheets/application.css
app/assets/stylesheets/application.css
+20
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
app/views/chronicles/_earning.html.erb
app/views/chronicles/_earning.html.erb
+1
-1
app/views/chronicles/_redemption.html.erb
app/views/chronicles/_redemption.html.erb
+2
-3
app/views/hackers/_hacker.html.erb
app/views/hackers/_hacker.html.erb
+20
-0
app/views/hackers/_quests.html.erb
app/views/hackers/_quests.html.erb
+5
-13
app/views/hackers/_rewards.html.erb
app/views/hackers/_rewards.html.erb
+5
-14
app/views/hackers/chronicle/_redemption_cancel.html.erb
app/views/hackers/chronicle/_redemption_cancel.html.erb
+1
-2
app/views/hackers/index.html.erb
app/views/hackers/index.html.erb
+11
-25
app/views/hackers/quests/_show.html.erb
app/views/hackers/quests/_show.html.erb
+14
-0
app/views/hackers/rewards/_show.html.erb
app/views/hackers/rewards/_show.html.erb
+14
-0
app/views/hackers/show.html.erb
app/views/hackers/show.html.erb
+10
-4
app/views/layouts/application.html.erb
app/views/layouts/application.html.erb
+28
-15
spec/factories/redeptions.rb
spec/factories/redeptions.rb
+0
-8
No files found.
app/assets/stylesheets/application.css
View file @
030d513d
...
@@ -12,3 +12,23 @@
...
@@ -12,3 +12,23 @@
*= require bootstrap
*= require bootstrap
*= require_tree .
*= require_tree .
*/
*/
.quest-button
,
.reward-button
{
white-space
:
normal
!important
;
}
.reward-button
{
min-height
:
91px
;
}
.hacker-flair
,
.btn
{
/* margin-left: 5px; */
}
.hacker-flair
:first
,
.btn
:first
{
margin-left
:
0px
!important
;
}
.btn-danger
a
{
color
:
#FFF
;
}
app/helpers/application_helper.rb
View file @
030d513d
...
@@ -10,7 +10,7 @@ module ApplicationHelper
...
@@ -10,7 +10,7 @@ module ApplicationHelper
if
current_hacker
.
blank?
if
current_hacker
.
blank?
link_to
'Einloggen'
,
new_hacker_session_path
link_to
'Einloggen'
,
new_hacker_session_path
else
else
current_hacker
.
nickname
link_to
current_hacker
.
nickname
,
current_hacker
end
end
end
end
end
end
app/views/chronicles/_earning.html.erb
View file @
030d513d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<%=
entry
.
chronicle_text
%>
<%=
entry
.
chronicle_text
%>
</span>
</span>
<%
if
entry
.
cancel
.
blank?
%>
<%
if
entry
.
cancel
.
blank?
%>
<span
class=
"btn btn-danger col-md-
2
"
>
<span
class=
"btn btn-danger
btn-xs
col-md-
1
"
>
<%=
link_to
'Storno'
,
cancel_earning_path
(
entry
),
:method
=>
:post
%>
<%=
link_to
'Storno'
,
cancel_earning_path
(
entry
),
:method
=>
:post
%>
</span>
</span>
<%
end
%>
<%
end
%>
...
...
app/views/chronicles/_redemption.html.erb
View file @
030d513d
<div
class=
"list-group-item list-group-item-warning row"
>
<div
class=
"list-group-item list-group-item-warning row"
>
<span
class=
"col-md-1"
></span>
<span
class=
"col-md-1 col-md-offset-1"
>
<span
class=
"col-md-1"
>
+
<%=
entry
.
points
%>
+
<%=
entry
.
points
%>
</span>
</span>
<span
class=
"col-md-2"
>
<span
class=
"col-md-2"
>
...
@@ -10,7 +9,7 @@
...
@@ -10,7 +9,7 @@
<%=
entry
.
chronicle_text
%>
<%=
entry
.
chronicle_text
%>
</span>
</span>
<%
if
entry
.
cancel
.
blank?
%>
<%
if
entry
.
cancel
.
blank?
%>
<span
class=
"btn btn-danger col-md-
2
"
>
<span
class=
"btn btn-danger
btn-xs
col-md-
1
"
>
<%=
link_to
'Storno'
,
cancel_redemption_path
(
entry
),
:method
=>
:post
%>
<%=
link_to
'Storno'
,
cancel_redemption_path
(
entry
),
:method
=>
:post
%>
</span>
</span>
<%
end
%>
<%
end
%>
...
...
app/views/hackers/_hacker.html.erb
0 → 100644
View file @
030d513d
<a
href=
"
<%=
hacker_path
(
hacker
)
%>
"
>
<div
class=
"well hacker-flair col-md-2"
>
<div
class=
"row"
>
<div
class=
"col-xs-6"
>
<%=
image_tag
gravatar_url_for
(
hacker
.
email
,
80
)
%>
</div>
<div
class=
"col-xs-6"
>
<%=
hacker
.
nickname
%>
<br/>
<span
class=
"badge points recent_earned_points"
title=
"Kürzlich verdiente Punkte"
>
<%=
hacker
.
recent_earned_points
%>
</span>
<br/>
<span
class=
"badge points all_earned_points"
title=
"Alle Punkte"
>
<%=
hacker
.
all_earned_points
%>
</span>
</div>
</div>
</div>
</a>
app/views/hackers/_quests.html.erb
View file @
030d513d
<%
quests
.
in_groups_of
(
10
)
do
|
grouped_quests
|
%>
<%
quests
.
in_groups_of
(
10
)
do
|
grouped_quests
|
%>
<div
class=
"row"
>
<div
class=
"row"
>
<%
grouped_quests
.
each
do
|
quest
|
%>
<%=
render
({
<%
if
quest
.
present?
%>
:partial
=>
'hackers/quests/show'
,
<div
class=
"well col-md-2"
>
:collection
=>
grouped_quests
.
compact
,
<h4>
:as
=>
:quest
<%=
quest
.
title
%>
})
%>
</h4>
<!-- TODO: should be replaced with paperclip gem -->
<span
class=
"glyphicon
<%=
quest
.
image_url
%>
"
>
</span>
<%=
quest
.
points
%>
</div>
<%
end
%>
<%
end
%>
</div>
</div>
<%
end
%>
<%
end
%>
app/views/hackers/_rewards.html.erb
View file @
030d513d
<%
rewards
.
in_groups_of
(
10
)
do
|
grouped_rewards
|
%>
<%
rewards
.
in_groups_of
(
10
)
do
|
grouped_rewards
|
%>
<div
class=
"row"
>
<div
class=
"row"
>
<%
grouped_rewards
.
each
do
|
reward
|
%>
<%=
render
({
<%
if
reward
.
present?
%>
:partial
=>
'hackers/rewards/show'
,
<div
class=
"well col-md-2"
>
:collection
=>
grouped_rewards
.
compact
,
<h4>
:as
=>
:reward
<%=
reward
.
title
%>
})
%>
</h4>
<!-- TODO: should be replaced with paperclip gem -->
<span
class=
"glyphicon
<%=
reward
.
image_url
%>
"
>
</span>
<%=
reward
.
points
%>
</div>
<%
end
%>
<%
end
%>
</div>
</div>
<%
end
%>
<%
end
%>
app/views/hackers/chronicle/_redemption_cancel.html.erb
View file @
030d513d
<div
class=
"list-group-item list-group-item-danger row"
>
<div
class=
"list-group-item list-group-item-danger row"
>
<span
class=
"col-md-1"
></span>
<span
class=
"col-md-1 col-md-offset-1"
>
<span
class=
"col-md-1"
>
<%=
entry
.
points
%>
<%=
entry
.
points
%>
</span>
</span>
<span
class=
"col-md-3"
>
<span
class=
"col-md-3"
>
...
...
app/views/hackers/index.html.erb
View file @
030d513d
...
@@ -4,29 +4,15 @@
...
@@ -4,29 +4,15 @@
<li><a
href=
"#"
>
nickname
</a></li>
<li><a
href=
"#"
>
nickname
</a></li>
</ul>
</ul>
<div
class=
"container-fluid"
>
<%
@hackers
.
in_groups_of
(
5
)
do
|
hackers
|
%>
<%
@hackers
.
in_groups_of
(
5
)
do
|
hackers
|
%>
<div
class=
"row"
>
<div
class=
"row"
>
<%
hackers
.
each
do
|
hacker
|
%>
<%=
render
({
<%
if
hacker
.
present?
%>
:partial
=>
'hacker'
,
<a
href=
"
<%=
hacker_path
(
hacker
)
%>
"
>
:collection
=>
hackers
.
compact
,
<div
class=
"well hacker-flair col-md-2"
>
:as
=>
:hacker
<%=
image_tag
gravatar_url_for
(
hacker
.
email
)
%>
})
%>
<%=
hacker
.
nickname
%>
<br/>
<span
class=
"badge points recent_earned_points"
title=
"Kürzlich verdiente Punkte"
>
<%=
hacker
.
recent_earned_points
%>
</span>
<br/>
<span
class=
"badge points all_earned_points"
title=
"Alle Punkte"
>
<%=
hacker
.
all_earned_points
%>
</span>
</div>
</div>
</a>
<%
else
%>
<!-- CSS platzhalter -->
<%
end
%>
<%
end
%>
<%
end
%>
</div>
</div>
<%
end
%>
app/views/hackers/quests/_show.html.erb
0 → 100644
View file @
030d513d
<div
class=
"btn btn-default btn-lg col-md-2 quest-button"
>
<div
class=
"row"
>
<div
class=
"col-xs-2"
>
<!-- TODO: should be replaced with paperclip gem -->
<span
class=
"glyphicon
<%=
quest
.
image_url
%>
"
>
</span>
</div>
<div
class=
"col-xs-7"
>
<%=
quest
.
title
%>
</div>
<div
class=
"col-xs-2"
>
<%=
quest
.
points
%>
</div>
</div>
</div>
app/views/hackers/rewards/_show.html.erb
0 → 100644
View file @
030d513d
<div
class=
"btn btn-default col-md-3 reward-button"
>
<div
class=
"row"
>
<div
class=
"col-xs-2"
>
<!-- TODO: should be replaced with paperclip gem -->
<span
class=
"glyphicon
<%=
reward
.
image_url
%>
"
>
</span>
</div>
<div
class=
"col-xs-7"
>
<%=
reward
.
title
%>
</div>
<div
class=
"col-xs-2"
>
<%=
reward
.
points
%>
</div>
</div>
</div>
app/views/hackers/show.html.erb
View file @
030d513d
<div
class=
"page-header"
>
<div
class=
"page-header"
>
<%=
image_tag
(
gravatar_url_for
(
@hacker
.
email
))
%>
<%=
@hacker
.
nickname
%>
<h1>
<%=
image_tag
(
gravatar_url_for
(
@hacker
.
email
))
%>
<%=
@hacker
.
nickname
%>
</h1>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -32,10 +32,16 @@
...
@@ -32,10 +32,16 @@
</div>
</div>
<h2>
Punkte erarbeitet
</h2>
<h2>
Punkte erarbeitet
</h2>
<%=
render
:partial
=>
'quests'
,
:locals
=>
{
:quests
=>
@quests
}
%>
<div
class=
"container-fluid"
>
<%=
render
:partial
=>
'quests'
,
:locals
=>
{
:quests
=>
@quests
}
%>
</div>
<h2>
Punkte einlösen
</h2>
<h2>
Punkte einlösen
</h2>
<%=
render
:partial
=>
'rewards'
,
:locals
=>
{
:rewards
=>
@rewards
}
%>
<div
class=
"container-fluid"
>
<%=
render
:partial
=>
'rewards'
,
:locals
=>
{
:rewards
=>
@rewards
}
%>
</div>
<h2>
Verlauf
</h2>
<h2>
Verlauf
</h2>
<%=
render
:partial
=>
'chronicle'
,
:locals
=>
{
:chronicle
=>
@chronicle
}
%>
<div
class=
"container-fluid"
>
<%=
render
:partial
=>
'chronicle'
,
:locals
=>
{
:chronicle
=>
@chronicle
}
%>
</div>
app/views/layouts/application.html.erb
View file @
030d513d
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<title>
SpacePoints
</title>
<title>
SpacePoints
</title>
<%=
stylesheet_link_tag
"application"
,
media:
"all"
,
"data-turbolinks-track"
=>
true
%>
<%=
stylesheet_link_tag
"application"
,
media:
"all"
,
"data-turbolinks-track"
=>
true
%>
<%=
javascript_include_tag
"application"
,
"data-turbolinks-track"
=>
true
%>
<%=
javascript_include_tag
"application"
,
"data-turbolinks-track"
=>
true
%>
<%=
csrf_meta_tags
%>
<%=
csrf_meta_tags
%>
</head>
</head>
<body>
<body>
<nav
class=
"navbar navbar-inverse"
role=
"navigation"
>
<nav
class=
"navbar navbar-inverse"
role=
"navigation"
>
<div
class=
"container-fluid"
>
<a
class=
"navbar-brand"
href=
"/"
>
SpacePoints
</a>
<a
class=
"navbar-brand"
href=
"/"
>
SpacePoints
</a>
</div>
</nav>
</nav>
<div
class=
"container"
>
<div
class=
"container"
>
<%=
yield
%>
<%=
yield
%>
</div>
</div>
<%=
login_or_username
%>
|
<%=
link_to
'Historie'
,
chronicle_path
%>
<p>
</p>
</body>
<nav
class=
"navbar navbar-default navbar-fixed-bottom"
role=
"navigation"
>
<div
class=
"container"
>
<ul
class=
"nav navbar-nav"
>
<li>
<%=
login_or_username
%>
</li>
<li
class=
"divider"
></li>
<li>
<%=
link_to
'Historie'
,
chronicle_path
%>
</li>
</ul>
</div>
</div>
</nav>
</body>
</html>
</html>
spec/factories/redeptions.rb
deleted
100644 → 0
View file @
143a66d4
FactoryGirl
.
define
do
factory
:redemption
do
points
{
[
1
,
10
,
50
,
150
].
shuffle
.
first
}
association
:hacker
,
:factory
=>
:hacker
association
:user
,
:factory
=>
:hacker
association
:reward
,
:factory
=>
:reward
end
end
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